26 #ifndef QMESH3OOMPH_D_HEADER
27 #define QMESH3OOMPH_D_HEADER
32 #include <oomph-lib-config.h>
58 template<
class ELEMENT>
97 unsigned local_min_ref = 0;
98 unsigned local_max_ref = 0;
101 unsigned min_ref = local_min_ref;
109 int int_local_min_ref = local_min_ref;
112 int_local_min_ref = INT_MAX;
115 MPI_Allreduce(&int_local_min_ref,
121 min_ref = int_min_ref;
149 unsigned n_tree_nodes = all_tree_nodes_pt.size();
150 for (
unsigned e = 0;
e < n_tree_nodes;
e++)
152 Tree* tree_pt = all_tree_nodes_pt[
e];
175 else if (level == min_ref)
178 unsigned n_sons = tree_pt->
nsons();
180 for (
unsigned i_son = 0; i_son < n_sons; i_son++)
182 backed_up_sons[i_son] = tree_pt->
son_pt(i_son);
193 for (
unsigned i_son = 0; i_son < n_sons; i_son++)
195 Tree* son_pt = backed_up_sons[i_son];
199 son_pt->
root_pt() = tree_root_pt;
204 unsigned n = all_sons_pt.size();
205 for (
unsigned i = 0;
i < n;
i++)
207 all_sons_pt[
i]->root_pt() = tree_root_pt;
212 trees_pt.push_back(tree_root_pt);
246 for (
unsigned iel = 0; iel < nel; iel++)
249 ELEMENT* el_pt =
dynamic_cast<ELEMENT*
>(
element_pt(iel));
254 trees_pt.push_back(octree_root_pt);
//////////////////////////////////////////////////////////////////////// ////////////////////////////...
OomphCommunicator * Comm_pt
Pointer to communicator – set to NULL if mesh is not distributed.
const Vector< GeneralisedElement * > & element_pt() const
Return reference to the Vector of elements.
unsigned long nelement() const
Return number of elements in the mesh.
/////////////////////////////////////////////////////////////////////// /////////////////////////////...
OcTreeRoot is a OcTree that forms the root of a (recursive) octree. The "root node" is special as it ...
static void setup_static_data()
Setup the static data, rotation and reflection schemes, etc.
Intermediate mesh class that implements the mesh adaptation functions specified in the TreeBasedRefin...
virtual ~RefineableBrickMesh()
Destructor:
RefineableBrickMesh(const RefineableBrickMesh &dummy)=delete
Broken copy constructor.
void setup_octree_forest()
Do what it says...
RefineableBrickMesh()
Constructor: Setup static octree data.
void operator=(const RefineableBrickMesh &)=delete
Broken assignment operator.
virtual void setup_tree_forest()
Set up the tree forest associated with the Mesh. Forwards call to setup_octree_forest()
RefineableElements are FiniteElements that may be subdivided into children to provide a better local ...
unsigned refinement_level() const
Return the Refinement level.
virtual void get_refinement_levels(unsigned &min_refinement_level, unsigned &max_refinement_level)
Get max/min refinement levels in mesh.
TreeForest * Forest_pt
Forest representation of the 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.
A generalised tree base class that abstracts the common functionality between the quad- and octrees u...
void stick_all_tree_nodes_into_vector(Vector< Tree * > &)
Traverse and stick pointers to all "nodes" into Vector.
RefineableElement * object_pt() const
Return the pointer to the object (RefineableElement) represented by the tree.
unsigned nsons() const
Return number of sons (zero if it's a leaf node)
void flush_sons()
Flush the sons.
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...
void set_son_pt(const Vector< Tree * > &son_pt)
Set vector of pointers to sons, indexed by the appropriate enum that identies son types....
void set_father_pt(Tree *const &father_pt)
Set the father.
TreeRoot *& root_pt()
Return pointer to root of the tree.
A slight extension to the standard template vector class so that we can include "graceful" array rang...
//////////////////////////////////////////////////////////////////// ////////////////////////////////...