30 #ifndef QMESH3OOMPH_D_HEADER 31 #define QMESH3OOMPH_D_HEADER 36 #include <oomph-lib-config.h> 63 template <
class ELEMENT>
111 unsigned local_min_ref=0;
112 unsigned local_max_ref=0;
115 unsigned min_ref=local_min_ref;
122 int int_local_min_ref=local_min_ref;
125 int_local_min_ref=INT_MAX;
128 MPI_Allreduce(&int_local_min_ref,&int_min_ref,1,
159 unsigned n_tree_nodes=all_tree_nodes_pt.size();
160 for (
unsigned e=0;
e<n_tree_nodes;
e++)
162 Tree* tree_pt=all_tree_nodes_pt[
e];
185 else if (level==min_ref)
188 unsigned n_sons=tree_pt->
nsons();
190 for (
unsigned i_son=0;i_son<n_sons;i_son++)
192 backed_up_sons[i_son]=tree_pt->
son_pt(i_son);
203 for (
unsigned i_son=0;i_son<n_sons;i_son++)
205 Tree* son_pt=backed_up_sons[i_son];
209 son_pt->
root_pt()=tree_root_pt;
214 unsigned n=all_sons_pt.size();
215 for (
unsigned i=0;
i<n;
i++)
217 all_sons_pt[
i]->root_pt()=tree_root_pt;
222 trees_pt.push_back(tree_root_pt);
256 for (
unsigned iel=0;iel<nel;iel++)
259 ELEMENT* el_pt=
dynamic_cast<ELEMENT*
>(
element_pt(iel));
264 trees_pt.push_back(octree_root_pt);
unsigned nsons() const
Return number of sons (zero if it's a leaf node)
void broken_copy(const std::string &class_name)
Issue error message and terminate execution.
static void setup_static_data()
Setup the static data, rotation and reflection schemes, etc.
void operator=(const RefineableBrickMesh &)
Broken assignment operator.
Base class for brick meshes (meshes made of 3D brick elements).
void flush_sons()
Flush the sons.
virtual void get_refinement_levels(unsigned &min_refinement_level, unsigned &max_refinement_level)
Get max/min refinement levels in mesh.
void flush_trees()
Flush trees from forest.
void stick_all_tree_nodes_into_vector(Vector< Tree * > &all_forest_nodes)
Traverse forest and stick pointers to all "nodes" into Vector.
TreeForest * Forest_pt
Forest representation of the mesh.
unsigned long nelement() const
Return number of elements in the mesh.
void set_father_pt(Tree *const &father_pt)
Set the father.
virtual ~RefineableBrickMesh()
Destructor:
RefineableBrickMesh(const RefineableBrickMesh &dummy)
Broken copy constructor.
unsigned refinement_level() const
Return the Refinement level.
void broken_assign(const std::string &class_name)
Issue error message and terminate execution.
void stick_all_tree_nodes_into_vector(Vector< Tree * > &)
Traverse and stick pointers to all "nodes" into Vector.
void setup_octree_forest()
Do what it says...
void set_son_pt(const Vector< Tree *> &son_pt)
Set vector of pointers to sons, indexed by the appropriate enum that identies son types...
Tree * son_pt(const int &son_index) const
Return pointer to the son for a given index. Note that to aid code readability specific enums have be...
RefineableBrickMesh()
Constructor: Setup static octree data.
const Vector< GeneralisedElement * > & element_pt() const
Return reference to the Vector of elements.
RefineableElement * object_pt() const
Return the pointer to the object (RefineableElement) represented by the tree.
virtual void setup_tree_forest()
Set up the tree forest associated with the Mesh. Forwards call to setup_octree_forest() ...
OomphCommunicator * Comm_pt
Pointer to communicator – set to NULL if mesh is not distributed.
TreeRoot *& root_pt()
Return pointer to root of the tree.