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,
120 Comm_pt->mpi_comm());
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);
int i
Definition: BiCGSTAB_step_by_step.cpp:9
const unsigned n
Definition: CG3DPackingUnitTest.cpp:11
Array< double, 1, 3 > e(1./3., 0.5, 2.)
Base class for brick meshes (meshes made of 3D brick elements).
Definition: brick_mesh.h:178
const Vector< GeneralisedElement * > & element_pt() const
Return reference to the Vector of elements.
Definition: mesh.h:460
unsigned long nelement() const
Return number of elements in the mesh.
Definition: mesh.h:590
static void setup_static_data()
Setup the static data, rotation and reflection schemes, etc.
Definition: octree.cc:1040
Definition: refineable_brick_mesh.h:61
virtual ~RefineableBrickMesh()
Destructor:
Definition: refineable_brick_mesh.h:78
RefineableBrickMesh(const RefineableBrickMesh &dummy)=delete
Broken copy constructor.
void setup_octree_forest()
Do what it says...
Definition: refineable_brick_mesh.h:88
RefineableBrickMesh()
Constructor: Setup static octree data.
Definition: refineable_brick_mesh.h:64
void operator=(const RefineableBrickMesh &)=delete
Broken assignment operator.
virtual void setup_tree_forest()
Definition: refineable_brick_mesh.h:82
Definition: refineable_elements.h:97
unsigned refinement_level() const
Return the Refinement level.
Definition: refineable_elements.h:314
virtual void get_refinement_levels(unsigned &min_refinement_level, unsigned &max_refinement_level)
Get max/min refinement levels in mesh.
Definition: refineable_mesh.cc:830
TreeForest * Forest_pt
Forest representation of the mesh.
Definition: refineable_mesh.h:768
Definition: refineable_mesh.h:809
void flush_trees()
Flush trees from forest.
Definition: tree.h:472
void stick_all_tree_nodes_into_vector(Vector< Tree * > &all_forest_nodes)
Traverse forest and stick pointers to all "nodes" into Vector.
Definition: tree.cc:405
void stick_all_tree_nodes_into_vector(Vector< Tree * > &)
Traverse and stick pointers to all "nodes" into Vector.
Definition: tree.cc:277
RefineableElement * object_pt() const
Definition: tree.h:88
unsigned nsons() const
Return number of sons (zero if it's a leaf node)
Definition: tree.h:129
void flush_sons()
Flush the sons.
Definition: tree.h:135
Tree * son_pt(const int &son_index) const
Definition: tree.h:103
void set_son_pt(const Vector< Tree * > &son_pt)
Definition: tree.h:123
void set_father_pt(Tree *const &father_pt)
Set the father.
Definition: tree.h:241
TreeRoot *& root_pt()
Return pointer to root of the tree.
Definition: tree.h:141
Definition: oomph-lib/src/generic/Vector.h:58
DRAIG: Change all instances of (SPATIAL_DIM) to (DIM-1).
Definition: AnisotropicHookean.h:10