39 #ifdef LIBMESH_ENABLE_AMR 44 libmesh_assert (this->
active());
53 unsigned int parent_p_level = this->
p_level();
54 for (
unsigned int c = 0; c != nc; c++)
63 for (
unsigned int cnode=0; cnode != current_child->
n_nodes(); ++cnode)
66 mesh_refinement.
add_node(*
this, c, cnode,
72 mesh_refinement.
add_elem (current_child);
78 unsigned int parent_p_level = this->
p_level();
79 for (
unsigned int c = 0; c != nc; c++)
82 libmesh_assert(current_child->
subactive());
96 for (
unsigned int c = 0; c != nc; c++)
109 libmesh_assert (!this->
active());
115 unsigned int parent_p_level = 0;
118 for (
unsigned int c = 0, nc = this->
n_children(); c != nc; ++c)
123 for (
unsigned int cnode=0; cnode != mychild->
n_nodes(); ++cnode)
126 bool calculated_new_pos =
false;
128 for (
unsigned int n=0; n<this->
n_nodes(); n++)
134 if ((em_val != 0.) && (em_val != 1.))
137 calculated_new_pos =
true;
141 if (calculated_new_pos)
144 for (
unsigned int i=0; i<LIBMESH_DIM; i++)
147 child_node(i)=new_pos(i);
157 libmesh_assert_equal_to (mychild.refinement_flag(),
Elem::COARSEN);
159 if (mychild.p_level() > parent_p_level)
160 parent_p_level = mychild.p_level();
166 libmesh_assert (this->
active());
174 libmesh_assert (this->
active());
184 #endif // #ifdef LIBMESH_ENABLE_AMR void set_p_level(const unsigned int p)
RefinementState refinement_flag() const
const Elem * parent() const
virtual Node *& set_node(const unsigned int i)
A geometric point in (x,y,z) space associated with a DOF.
void add_scaled(const TypeVector< T2 > &, const T)
RefinementState p_refinement_flag() const
The base class for all geometric element types.
void set_refinement_flag(const RefinementState rflag)
virtual float embedding_matrix(const unsigned int child_num, const unsigned int child_node_num, const unsigned int parent_node_num) const =0
virtual unsigned int n_children() const =0
unsigned int p_level() const
dof_id_type node(const unsigned int i) const
SimpleRange< ChildRefIter > child_ref_range()
virtual void refine(MeshRefinement &mesh_refinement)
Responsible for mesh refinement algorithms and data.
virtual unsigned int n_nodes() const =0
static std::unique_ptr< Elem > build(const ElemType type, Elem *p=nullptr)
unsigned int n_systems() const
void set_n_systems(const unsigned int s)
Node * add_node(Elem &parent, unsigned int child, unsigned int node, processor_id_type proc_id)
Elem * add_elem(Elem *elem)
void set_p_refinement_flag(const RefinementState pflag)
processor_id_type processor_id() const
virtual ElemType type() const =0
A geometric point in (x,y,z) space.
const Point & point(const unsigned int i) const
const Elem * child_ptr(unsigned int i) const
const RemoteElem * remote_elem