26 #ifndef OOMPH_GENERIC_REFINEABLE_QUAD_MESH_HEADER
27 #define OOMPH_GENERIC_REFINEABLE_QUAD_MESH_HEADER
50 template<
class ELEMENT>
99 unsigned local_min_ref = 0;
100 unsigned local_max_ref = 0;
108 int int_local_min_ref = local_min_ref;
112 int_local_min_ref = INT_MAX;
116 MPI_Allreduce(&int_local_min_ref,
121 Comm_pt->mpi_comm());
123 unsigned min_ref =
unsigned(int_min_ref);
127 unsigned min_ref = local_min_ref;
153 unsigned n_tree_nodes = all_tree_nodes_pt.size();
154 for (
unsigned e = 0;
e < n_tree_nodes;
e++)
156 Tree* tree_pt = all_tree_nodes_pt[
e];
179 else if (level == min_ref)
182 unsigned n_sons = tree_pt->
nsons();
184 for (
unsigned i_son = 0; i_son < n_sons; i_son++)
186 backed_up_sons[i_son] = tree_pt->
son_pt(i_son);
196 for (
unsigned i_son = 0; i_son < n_sons; i_son++)
198 Tree* son_pt = backed_up_sons[i_son];
202 son_pt->
root_pt() = tree_root_pt;
207 unsigned n = all_sons_pt.size();
208 for (
unsigned i = 0;
i <
n;
i++)
210 all_sons_pt[
i]->root_pt() = tree_root_pt;
215 trees_pt.push_back(tree_root_pt);
252 unsigned n_element = this->
nelement();
253 for (
unsigned e = 0;
e < n_element;
e++)
256 ELEMENT* el_pt =
dynamic_cast<ELEMENT*
>(this->
element_pt(
e));
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.)
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
Base class for quad meshes (meshes made of 2D quad elements).
Definition: quad_mesh.h:57
Definition: quadtree.h:409
Definition: quadtree.h:293
static void setup_static_data()
Setup the static data, rotation and reflection schemes, etc.
Definition: quadtree.cc:120
Definition: refineable_elements.h:97
unsigned refinement_level() const
Return the Refinement level.
Definition: refineable_elements.h:314
Definition: refineable_quad_mesh.h:53
virtual ~RefineableQuadMesh()
Broken assignment operator.
Definition: refineable_quad_mesh.h:75
RefineableQuadMesh(const RefineableQuadMesh &dummy)=delete
Broken copy constructor.
RefineableQuadMesh()
Constructor: Setup static quadtree data.
Definition: refineable_quad_mesh.h:56
void setup_quadtree_forest()
Definition: refineable_quad_mesh.h:88
virtual void setup_tree_forest()
Definition: refineable_quad_mesh.h:80
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