41 namespace Missing_masters_functions
46#ifdef ANNOTATE_MISSING_MASTERS_COMMUNICATION
108 Mesh*
const& mesh_pt,
121#ifdef ANNOTATE_MISSING_MASTERS_COMMUNICATION
132#ifdef ANNOTATE_MISSING_MASTERS_COMMUNICATION
163#ifdef ANNOTATE_MISSING_MASTERS_COMMUNICATION
175 Mesh*
const& mesh_pt,
191 std::find(shared_node_pt.begin(), shared_node_pt.end(),
nod_pt);
194 if (
it != shared_node_pt.end())
221#ifdef ANNOTATE_MISSING_MASTERS_COMMUNICATION
222 std::stringstream
junk;
232#ifdef ANNOTATE_MISSING_MASTERS_COMMUNICATION
236#ifdef ANNOTATE_MISSING_MASTERS_COMMUNICATION
255#ifdef ANNOTATE_MISSING_MASTERS_COMMUNICATION
256 std::stringstream
junk;
278#ifdef ANNOTATE_MISSING_MASTERS_COMMUNICATION
279 std::stringstream
junk;
290#ifdef ANNOTATE_MISSING_MASTERS_COMMUNICATION
292 "haloed node found externally");
295#ifdef ANNOTATE_MISSING_MASTERS_COMMUNICATION
309 Mesh*
const& mesh_pt,
325 std::find(shared_node_pt.begin(), shared_node_pt.end(),
master_nod_pt);
328 if (
it != shared_node_pt.end())
355#ifdef ANNOTATE_MISSING_MASTERS_COMMUNICATION
356 std::stringstream
junk;
366#ifdef ANNOTATE_MISSING_MASTERS_COMMUNICATION
370#ifdef ANNOTATE_MISSING_MASTERS_COMMUNICATION
389#ifdef ANNOTATE_MISSING_MASTERS_COMMUNICATION
391 "Node needs to be constructed[2]");
409#ifdef ANNOTATE_MISSING_MASTERS_COMMUNICATION
416#ifdef ANNOTATE_MISSING_MASTERS_COMMUNICATION
418 "haloed node found externally");
421#ifdef ANNOTATE_MISSING_MASTERS_COMMUNICATION
423 "external haloed node index[2]");
437 Mesh*
const& mesh_pt,
447#ifdef ANNOTATE_MISSING_MASTERS_COMMUNICATION
456 if (time_stepper_pt != 0)
463 if (
nod_pt->is_on_boundary())
466#ifdef ANNOTATE_MISSING_MASTERS_COMMUNICATION
483#ifdef ANNOTATE_MISSING_MASTERS_COMMUNICATION
484 std::stringstream
junk;
485 junk <<
"Node is on " <<
nb <<
" boundaries";
488 for (
unsigned i = 0;
i <
nb;
i++)
491#ifdef ANNOTATE_MISSING_MASTERS_COMMUNICATION
492 std::stringstream
junk;
504 throw OomphLibError(
"Failed to cast new node to boundary node\n",
509 std::map<unsigned, unsigned>*
map_pt =
510 bnod_pt->index_of_first_value_assigned_by_face_element_pt();
516#ifdef ANNOTATE_MISSING_MASTERS_COMMUNICATION
517 std::stringstream
junk;
519 "No additional values were created by face element");
527#ifdef ANNOTATE_MISSING_MASTERS_COMMUNICATION
528 std::stringstream
junk;
533 for (std::map<unsigned, unsigned>::iterator
p =
map_pt->begin();
538#ifdef ANNOTATE_MISSING_MASTERS_COMMUNICATION
539 std::stringstream
junk;
543#ifdef ANNOTATE_MISSING_MASTERS_COMMUNICATION
553#ifdef ANNOTATE_MISSING_MASTERS_COMMUNICATION
570#ifdef ANNOTATE_MISSING_MASTERS_COMMUNICATION
577#ifdef ANNOTATE_MISSING_MASTERS_COMMUNICATION
588#ifdef ANNOTATE_MISSING_MASTERS_COMMUNICATION
608#ifdef ANNOTATE_MISSING_MASTERS_COMMUNICATION
660 Mesh*
const& mesh_pt,
667#ifdef ANNOTATE_MISSING_MASTERS_COMMUNICATION
671#ifdef ANNOTATE_MISSING_MASTERS_COMMUNICATION
675#ifdef ANNOTATE_MISSING_MASTERS_COMMUNICATION
686#ifdef ANNOTATE_MISSING_MASTERS_COMMUNICATION
688 "Master node non-halo processor ID");
696#ifdef ANNOTATE_MISSING_MASTERS_COMMUNICATION
700#ifdef ANNOTATE_MISSING_MASTERS_COMMUNICATION
710 if (time_stepper_pt != 0)
720#ifdef ANNOTATE_MISSING_MASTERS_COMMUNICATION
736#ifdef ANNOTATE_MISSING_MASTERS_COMMUNICATION
737 std::stringstream
junk;
738 junk <<
"Master node is on " <<
nb <<
" boundaries";
741 for (
unsigned i = 0;
i <
nb;
i++)
744#ifdef ANNOTATE_MISSING_MASTERS_COMMUNICATION
745 std::stringstream
junk;
759 throw OomphLibError(
"Failed to cast new node to boundary node\n",
764 std::map<unsigned, unsigned>*
map_pt =
765 bnod_pt->index_of_first_value_assigned_by_face_element_pt();
771#ifdef ANNOTATE_MISSING_MASTERS_COMMUNICATION
772 std::stringstream
junk;
774 "No additional values were created by face element for this master "
783#ifdef ANNOTATE_MISSING_MASTERS_COMMUNICATION
784 std::stringstream
junk;
789 for (std::map<unsigned, unsigned>::iterator
p =
map_pt->begin();
794#ifdef ANNOTATE_MISSING_MASTERS_COMMUNICATION
795 std::stringstream
junk;
797 "Key of map entry for master node");
800#ifdef ANNOTATE_MISSING_MASTERS_COMMUNICATION
802 "Value of map entry for master node");
811#ifdef ANNOTATE_MISSING_MASTERS_COMMUNICATION
813 "Master node is not on any boundary");
829#ifdef ANNOTATE_MISSING_MASTERS_COMMUNICATION
836#ifdef ANNOTATE_MISSING_MASTERS_COMMUNICATION
847#ifdef ANNOTATE_MISSING_MASTERS_COMMUNICATION
849 "Master Alg Node n geom objects");
866#ifdef ANNOTATE_MISSING_MASTERS_COMMUNICATION
868 "Master node Found geom object");
888 oomph_info <<
"Master node's macro update element:" << std::endl;
905 oomph_info <<
"This is REALLY BAD! The master node is not part of "
906 "its own update element..."
928 oomph_info <<
"Found wrong index!!!" << std::endl;
933 oomph_info <<
"index and proc are correct in internal storage."
944#ifdef ANNOTATE_MISSING_MASTERS_COMMUNICATION
946 "External haloed element already exists");
950#ifdef ANNOTATE_MISSING_MASTERS_COMMUNICATION
952 "Haloed element found internally");
956#ifdef ANNOTATE_MISSING_MASTERS_COMMUNICATION
958 "Index of existing internal haloed element");
964 <<
") already exists..." << std::endl;
1037#ifdef ANNOTATE_MISSING_MASTERS_COMMUNICATION
1039 "Master Node needs to be constructed");
1051#ifdef ANNOTATE_MISSING_MASTERS_COMMUNICATION
1053 "Mesh is macro element mesh");
1060#ifdef ANNOTATE_MISSING_MASTERS_COMMUNICATION
1082 error_stream <<
"You are using a MacroElement node update\n"
1083 <<
"in a case with non-QElements. This has not\n"
1084 <<
"yet been implemented.\n";
1095#ifdef ANNOTATE_MISSING_MASTERS_COMMUNICATION
1097 "Mesh is not a macro element mesh");
1108#ifdef ANNOTATE_MISSING_MASTERS_COMMUNICATION
1114#ifdef ANNOTATE_MISSING_MASTERS_COMMUNICATION
1121#ifdef ANNOTATE_MISSING_MASTERS_COMMUNICATION
1123 "Element is not p-refineable");
1145#ifdef ANNOTATE_MISSING_MASTERS_COMMUNICATION
1147 "External haloed element already exists");
1151#ifdef ANNOTATE_MISSING_MASTERS_COMMUNICATION
1153 "Haloed element found externally");
1156#ifdef ANNOTATE_MISSING_MASTERS_COMMUNICATION
1158 "Index of existing external haloed element");
1161 oomph_info <<
"External haloed element already exists..."
1220 Mesh*
const& mesh_pt,
1232#ifdef ANNOTATE_MISSING_MASTERS_COMMUNICATION
1234 <<
" Bool: New node needs to be constructed "
1253#ifdef ANNOTATE_MISSING_MASTERS_COMMUNICATION
1255 <<
" Existing external halo node was found externally (0) "
1256 "or internally (1): "
1263#ifdef ANNOTATE_MISSING_MASTERS_COMMUNICATION
1265 <<
" index of existing (internal) halo master node "
1277#ifdef ANNOTATE_MISSING_MASTERS_COMMUNICATION
1279 <<
" Index of existing external halo node "
1302 Mesh*
const& mesh_pt,
1311#ifdef ANNOTATE_MISSING_MASTERS_COMMUNICATION
1313 <<
" Number of values of external halo node "
1330#ifdef ANNOTATE_MISSING_MASTERS_COMMUNICATION
1332 <<
" Is node on boundary? "
1338 if (time_stepper_pt != 0)
1349#ifdef ANNOTATE_MISSING_MASTERS_COMMUNICATION
1351 <<
" Number of boundaries the node is on: "
1355 for (
unsigned i = 0;
i <
nb;
i++)
1358#ifdef ANNOTATE_MISSING_MASTERS_COMMUNICATION
1360 <<
" Node is on boundary "
1368#ifdef ANNOTATE_MISSING_MASTERS_COMMUNICATION
1370 <<
" Number of additional values created by face element "
1384 throw OomphLibError(
"Failed to cast new node to boundary node\n",
1389 if (
bnew_nod_pt->index_of_first_value_assigned_by_face_element_pt() ==
1392 bnew_nod_pt->index_of_first_value_assigned_by_face_element_pt() =
1393 new std::map<unsigned, unsigned>;
1398 std::map<unsigned, unsigned>*
map_pt =
1399 bnew_nod_pt->index_of_first_value_assigned_by_face_element_pt();
1406#ifdef ANNOTATE_MISSING_MASTERS_COMMUNICATION
1408 <<
" Key of map entry"
1414#ifdef ANNOTATE_MISSING_MASTERS_COMMUNICATION
1416 <<
" Value of map entry"
1430 if (time_stepper_pt != 0)
1457#ifdef ANNOTATE_MISSING_MASTERS_COMMUNICATION
1459 <<
" Alg node update id "
1469#ifdef ANNOTATE_MISSING_MASTERS_COMMUNICATION
1471 <<
" Alg node # of ref values "
1491#ifdef ANNOTATE_MISSING_MASTERS_COMMUNICATION
1493 <<
" Alg node # of geom objects "
1503#ifdef ANNOTATE_MISSING_MASTERS_COMMUNICATION
1505 <<
" Alg node: geom object index "
1541 geom_object_vector_pt =
macro_mesh_pt->geom_object_vector_pt();
Algebraic meshes contain AlgebraicElements and AlgebraicNodes. They implement the node update functio...
Algebraic nodes are nodes with an algebraic positional update function.
A class that contains the information required by Nodes that are located on Mesh boundaries....
TimeStepper *& time_stepper_pt()
Return the pointer to the timestepper.
A general Finite Element class.
virtual void local_coordinate_of_node(const unsigned &j, Vector< double > &s) const
Get local coordinates of node j in the element; vector sets its own size (broken virtual)
double size() const
Calculate the size of the element (length, area, volume,...) in Eulerian computational coordinates....
virtual Node * construct_node(const unsigned &n)
Construct the local node n and return a pointer to the newly created node object.
unsigned dim() const
Return the spatial dimension of the element, i.e. the number of local coordinates required to paramet...
unsigned nnode() const
Return the number of nodes.
MacroElement * macro_elem_pt()
Access function to pointer to macro element.
virtual Node * construct_boundary_node(const unsigned &n)
Construct the local node n as a boundary node; that is a node that MAY be placed on a mesh boundary a...
Node *& node_pt(const unsigned &n)
Return a pointer to the local node n.
A Generalised Element class.
bool is_halo() const
Is this element a halo?
int non_halo_proc_ID()
ID of processor ID that holds non-halo counterpart of halo element; negative if not a halo.
A geometric object is an object that provides a parametrised description of its shape via the functio...
unsigned ndim() const
Access function to # of Eulerian coordinates.
TimeStepper *& time_stepper_pt()
Access function for pointer to time stepper: Null if object is not time-dependent.
unsigned nlagrangian() const
Access function to # of Lagrangian coordinates.
Class that contains data for hanging nodes.
MacroElementNodeUpdateMeshes contain MacroElementNodeUpdateNodes which have their own node update fun...
MacroElementNodeUpdate nodes are nodes with a positional update function, based on their element's Ma...
Base class for MacroElement s that are used during mesh refinement in domains with curvlinear and/or ...
void add_boundary_node(const unsigned &b, Node *const &node_pt)
Add a (pointer to) a node to the b-th boundary.
Node *& external_halo_node_pt(const unsigned &p, const unsigned &j)
Access fct to the j-th external halo node in this Mesh whose non-halo external counterpart is held on...
unsigned nexternal_haloed_element()
Total number of external haloed elements in this Mesh.
unsigned add_external_haloed_node_pt(const unsigned &p, Node *&nod_pt)
Add external haloed node whose halo (external) counterpart is held on processor p to the storage sche...
GeneralisedElement *& external_haloed_element_pt(const unsigned &p, const unsigned &e)
Access fct to the e-th external haloed element in this Mesh whose non-halo counterpart is held on pro...
FiniteElement * finite_element_pt(const unsigned &e) const
Upcast (downcast?) to FiniteElement (needed to access FiniteElement member functions).
unsigned nboundary() const
Return number of boundaries.
unsigned add_external_haloed_element_pt(const unsigned &p, GeneralisedElement *&el_pt)
Add external haloed element whose non-halo counterpart is held on processor p to the storage scheme f...
void add_external_halo_node_pt(const unsigned &p, Node *&nod_pt)
Add external halo node whose non-halo (external) counterpart is held on processor p to the storage sc...
void get_shared_node_pt(const unsigned &p, Vector< Node * > &shared_node_pt)
Get vector of pointers to shared nodes with processor p. Required for faster search in Missing_master...
OomphCommunicator * communicator_pt() const
Read-only access fct to communicator (Null if mesh is not distributed, i.e. if we don't have mpi).
unsigned nexternal_haloed_node()
Total number of external haloed nodes in this Mesh.
Vector< GeneralisedElement * > haloed_element_pt(const unsigned &p)
Return vector of haloed elements in this Mesh whose haloing counterpart is held on processor p.
Node * shared_node_pt(const unsigned &p, const unsigned &j)
Access fct to the j-th shared node in this Mesh who has a counterpart on processor p.
Nodes are derived from Data, but, in addition, have a definite (Eulerian) position in a space of a gi...
double & x(const unsigned &i)
Return the i-th nodal coordinate.
An OomphLibError object which should be thrown when an run-time error is encountered....
p-refineable version of RefineableElement
Base class for Qelements.
A Class for nodes that deform elastically (i.e. position is an unknown in the problem)....
TAdvectionDiffusionReactionElement<NREAGENT,DIM,NNODE_1D> elements are isoparametric triangular DIM-d...
Base class for time-stepping schemes. Timestepper provides an approximation of the temporal derivativ...
unsigned ntstorage() const
Return the number of doubles required to represent history (one for steady)
A slight extension to the standard template vector class so that we can include "graceful" array rang...
bool Doc_full_stats
Boolean to indicate whether to output further info during setup_multi_domain_interaction() routines.
void add_external_halo_node_helper(Node *&new_nod_pt, Mesh *const &mesh_pt, unsigned &loc_p, unsigned &node_index, FiniteElement *const &new_el_pt, int &n_cont_inter_values, unsigned &counter_for_recv_unsigneds, Vector< unsigned > &recv_unsigneds, unsigned &counter_for_recv_doubles, Vector< double > &recv_doubles)
Helper functiono to add external halo node that is not a master.
void get_required_master_nodal_information_helper(int &iproc, Node *master_nod_pt, Mesh *const &mesh_pt, int &n_cont_inter_values, Vector< unsigned > &send_unsigneds, Vector< double > &send_doubles)
Helper function to get the required master nodal information from an external haloed master node so t...
void add_external_haloed_node_helper(int &iproc, Node *nod_pt, Mesh *const &mesh_pt, int &n_cont_inter_values, Vector< unsigned > &send_unsigneds, Vector< double > &send_doubles)
Helper to add external haloed node that is not a master.
bool Doc_stats
Boolean to indicate whether to output basic info during setup_multi_domain_interaction() routines.
void add_external_haloed_node_to_storage(int &iproc, Node *nod_pt, Mesh *const &mesh_pt, int &n_cont_inter_values, Vector< unsigned > &send_unsigneds, Vector< double > &send_doubles)
Helper function to add external haloed nodes, including any masters.
void recursively_add_masters_of_external_haloed_node(int &iproc, Node *nod_pt, Mesh *const &mesh_pt, int &n_cont_inter_values, Vector< unsigned > &send_unsigneds, Vector< double > &send_doubles)
Recursively add any master nodes (and their master nodes etc) of external nodes.
void get_required_nodal_information_helper(int &iproc, Node *nod_pt, Mesh *const &mesh_pt, int &n_cont_inter_values, Vector< unsigned > &send_unsigneds, Vector< double > &send_doubles)
Helper function to get the required nodal information from an external haloed node so that a fully-fu...
void add_external_haloed_master_node_helper(int &iproc, Node *master_nod_pt, Mesh *const &mesh_pt, int &n_cont_inter_values, Vector< unsigned > &send_unsigneds, Vector< double > &send_doubles)
Helper function to add external haloed node that is a master.
bool Doc_timings
Boolean to indicate whether to doc timings or not.
void construct_new_external_halo_node_helper(Node *&new_nod_pt, unsigned &loc_p, unsigned &node_index, FiniteElement *const &new_el_pt, Mesh *const &mesh_pt, unsigned &counter_for_recv_unsigneds, Vector< unsigned > &recv_unsigneds, unsigned &counter_for_recv_doubles, Vector< double > &recv_doubles)
Helper function which constructs a new external halo node (on new element) with the required informat...
Vector< std::string > Flat_packed_unsigneds_string
DRAIG: Change all instances of (SPATIAL_DIM) to (DIM-1).
OomphInfo oomph_info
Single (global) instantiation of the OomphInfo object – this is used throughout the library as a "rep...