42 namespace Missing_masters_functions
47#ifdef ANNOTATE_MISSING_MASTERS_COMMUNICATION
109 Mesh*
const& mesh_pt,
122#ifdef ANNOTATE_MISSING_MASTERS_COMMUNICATION
133#ifdef ANNOTATE_MISSING_MASTERS_COMMUNICATION
164#ifdef ANNOTATE_MISSING_MASTERS_COMMUNICATION
176 Mesh*
const& mesh_pt,
192 std::find(shared_node_pt.begin(), shared_node_pt.end(),
nod_pt);
195 if (
it != shared_node_pt.end())
222#ifdef ANNOTATE_MISSING_MASTERS_COMMUNICATION
223 std::stringstream
junk;
233#ifdef ANNOTATE_MISSING_MASTERS_COMMUNICATION
237#ifdef ANNOTATE_MISSING_MASTERS_COMMUNICATION
256#ifdef ANNOTATE_MISSING_MASTERS_COMMUNICATION
257 std::stringstream
junk;
279#ifdef ANNOTATE_MISSING_MASTERS_COMMUNICATION
280 std::stringstream
junk;
291#ifdef ANNOTATE_MISSING_MASTERS_COMMUNICATION
293 "haloed node found externally");
296#ifdef ANNOTATE_MISSING_MASTERS_COMMUNICATION
310 Mesh*
const& mesh_pt,
326 std::find(shared_node_pt.begin(), shared_node_pt.end(),
master_nod_pt);
329 if (
it != shared_node_pt.end())
356#ifdef ANNOTATE_MISSING_MASTERS_COMMUNICATION
357 std::stringstream
junk;
367#ifdef ANNOTATE_MISSING_MASTERS_COMMUNICATION
371#ifdef ANNOTATE_MISSING_MASTERS_COMMUNICATION
390#ifdef ANNOTATE_MISSING_MASTERS_COMMUNICATION
392 "Node needs to be constructed[2]");
410#ifdef ANNOTATE_MISSING_MASTERS_COMMUNICATION
417#ifdef ANNOTATE_MISSING_MASTERS_COMMUNICATION
419 "haloed node found externally");
422#ifdef ANNOTATE_MISSING_MASTERS_COMMUNICATION
424 "external haloed node index[2]");
438 Mesh*
const& mesh_pt,
448#ifdef ANNOTATE_MISSING_MASTERS_COMMUNICATION
457 if (time_stepper_pt != 0)
464 if (
nod_pt->is_on_boundary())
467#ifdef ANNOTATE_MISSING_MASTERS_COMMUNICATION
484#ifdef ANNOTATE_MISSING_MASTERS_COMMUNICATION
485 std::stringstream
junk;
486 junk <<
"Node is on " <<
nb <<
" boundaries";
489 for (
unsigned i = 0;
i <
nb;
i++)
492#ifdef ANNOTATE_MISSING_MASTERS_COMMUNICATION
493 std::stringstream
junk;
505 throw OomphLibError(
"Failed to cast new node to boundary node\n",
510 std::map<unsigned, unsigned>*
map_pt =
511 bnod_pt->index_of_first_value_assigned_by_face_element_pt();
517#ifdef ANNOTATE_MISSING_MASTERS_COMMUNICATION
518 std::stringstream
junk;
520 "No additional values were created by face element");
528#ifdef ANNOTATE_MISSING_MASTERS_COMMUNICATION
529 std::stringstream
junk;
534 for (std::map<unsigned, unsigned>::iterator
p =
map_pt->begin();
539#ifdef ANNOTATE_MISSING_MASTERS_COMMUNICATION
540 std::stringstream
junk;
544#ifdef ANNOTATE_MISSING_MASTERS_COMMUNICATION
554#ifdef ANNOTATE_MISSING_MASTERS_COMMUNICATION
571#ifdef ANNOTATE_MISSING_MASTERS_COMMUNICATION
578#ifdef ANNOTATE_MISSING_MASTERS_COMMUNICATION
589#ifdef ANNOTATE_MISSING_MASTERS_COMMUNICATION
609#ifdef ANNOTATE_MISSING_MASTERS_COMMUNICATION
661 Mesh*
const& mesh_pt,
668#ifdef ANNOTATE_MISSING_MASTERS_COMMUNICATION
672#ifdef ANNOTATE_MISSING_MASTERS_COMMUNICATION
676#ifdef ANNOTATE_MISSING_MASTERS_COMMUNICATION
687#ifdef ANNOTATE_MISSING_MASTERS_COMMUNICATION
689 "Master node non-halo processor ID");
697#ifdef ANNOTATE_MISSING_MASTERS_COMMUNICATION
701#ifdef ANNOTATE_MISSING_MASTERS_COMMUNICATION
711 if (time_stepper_pt != 0)
721#ifdef ANNOTATE_MISSING_MASTERS_COMMUNICATION
737#ifdef ANNOTATE_MISSING_MASTERS_COMMUNICATION
738 std::stringstream
junk;
739 junk <<
"Master node is on " <<
nb <<
" boundaries";
742 for (
unsigned i = 0;
i <
nb;
i++)
745#ifdef ANNOTATE_MISSING_MASTERS_COMMUNICATION
746 std::stringstream
junk;
760 throw OomphLibError(
"Failed to cast new node to boundary node\n",
765 std::map<unsigned, unsigned>*
map_pt =
766 bnod_pt->index_of_first_value_assigned_by_face_element_pt();
772#ifdef ANNOTATE_MISSING_MASTERS_COMMUNICATION
773 std::stringstream
junk;
775 "No additional values were created by face element for this master "
784#ifdef ANNOTATE_MISSING_MASTERS_COMMUNICATION
785 std::stringstream
junk;
790 for (std::map<unsigned, unsigned>::iterator
p =
map_pt->begin();
795#ifdef ANNOTATE_MISSING_MASTERS_COMMUNICATION
796 std::stringstream
junk;
798 "Key of map entry for master node");
801#ifdef ANNOTATE_MISSING_MASTERS_COMMUNICATION
803 "Value of map entry for master node");
812#ifdef ANNOTATE_MISSING_MASTERS_COMMUNICATION
814 "Master node is not on any boundary");
830#ifdef ANNOTATE_MISSING_MASTERS_COMMUNICATION
837#ifdef ANNOTATE_MISSING_MASTERS_COMMUNICATION
848#ifdef ANNOTATE_MISSING_MASTERS_COMMUNICATION
850 "Master Alg Node n geom objects");
867#ifdef ANNOTATE_MISSING_MASTERS_COMMUNICATION
869 "Master node Found geom object");
889 oomph_info <<
"Master node's macro update element:" << std::endl;
906 oomph_info <<
"This is REALLY BAD! The master node is not part of "
907 "its own update element..."
929 oomph_info <<
"Found wrong index!!!" << std::endl;
934 oomph_info <<
"index and proc are correct in internal storage."
945#ifdef ANNOTATE_MISSING_MASTERS_COMMUNICATION
947 "External haloed element already exists");
951#ifdef ANNOTATE_MISSING_MASTERS_COMMUNICATION
953 "Haloed element found internally");
957#ifdef ANNOTATE_MISSING_MASTERS_COMMUNICATION
959 "Index of existing internal haloed element");
965 <<
") already exists..." << std::endl;
1038#ifdef ANNOTATE_MISSING_MASTERS_COMMUNICATION
1040 "Master Node needs to be constructed");
1052#ifdef ANNOTATE_MISSING_MASTERS_COMMUNICATION
1054 "Mesh is macro element mesh");
1061#ifdef ANNOTATE_MISSING_MASTERS_COMMUNICATION
1083 error_stream <<
"You are using a MacroElement node update\n"
1084 <<
"in a case with non-QElements. This has not\n"
1085 <<
"yet been implemented.\n";
1096#ifdef ANNOTATE_MISSING_MASTERS_COMMUNICATION
1098 "Mesh is not a macro element mesh");
1109#ifdef ANNOTATE_MISSING_MASTERS_COMMUNICATION
1115#ifdef ANNOTATE_MISSING_MASTERS_COMMUNICATION
1122#ifdef ANNOTATE_MISSING_MASTERS_COMMUNICATION
1124 "Element is not p-refineable");
1146#ifdef ANNOTATE_MISSING_MASTERS_COMMUNICATION
1148 "External haloed element already exists");
1152#ifdef ANNOTATE_MISSING_MASTERS_COMMUNICATION
1154 "Haloed element found externally");
1157#ifdef ANNOTATE_MISSING_MASTERS_COMMUNICATION
1159 "Index of existing external haloed element");
1162 oomph_info <<
"External haloed element already exists..."
1221 Mesh*
const& mesh_pt,
1233#ifdef ANNOTATE_MISSING_MASTERS_COMMUNICATION
1235 <<
" Bool: New node needs to be constructed "
1254#ifdef ANNOTATE_MISSING_MASTERS_COMMUNICATION
1256 <<
" Existing external halo node was found externally (0) "
1257 "or internally (1): "
1264#ifdef ANNOTATE_MISSING_MASTERS_COMMUNICATION
1266 <<
" index of existing (internal) halo master node "
1278#ifdef ANNOTATE_MISSING_MASTERS_COMMUNICATION
1280 <<
" Index of existing external halo node "
1303 Mesh*
const& mesh_pt,
1312#ifdef ANNOTATE_MISSING_MASTERS_COMMUNICATION
1314 <<
" Number of values of external halo node "
1331#ifdef ANNOTATE_MISSING_MASTERS_COMMUNICATION
1333 <<
" Is node on boundary? "
1339 if (time_stepper_pt != 0)
1350#ifdef ANNOTATE_MISSING_MASTERS_COMMUNICATION
1352 <<
" Number of boundaries the node is on: "
1356 for (
unsigned i = 0;
i <
nb;
i++)
1359#ifdef ANNOTATE_MISSING_MASTERS_COMMUNICATION
1361 <<
" Node is on boundary "
1369#ifdef ANNOTATE_MISSING_MASTERS_COMMUNICATION
1371 <<
" Number of additional values created by face element "
1385 throw OomphLibError(
"Failed to cast new node to boundary node\n",
1390 if (
bnew_nod_pt->index_of_first_value_assigned_by_face_element_pt() ==
1393 bnew_nod_pt->index_of_first_value_assigned_by_face_element_pt() =
1394 new std::map<unsigned, unsigned>;
1399 std::map<unsigned, unsigned>*
map_pt =
1400 bnew_nod_pt->index_of_first_value_assigned_by_face_element_pt();
1407#ifdef ANNOTATE_MISSING_MASTERS_COMMUNICATION
1409 <<
" Key of map entry"
1415#ifdef ANNOTATE_MISSING_MASTERS_COMMUNICATION
1417 <<
" Value of map entry"
1431 if (time_stepper_pt != 0)
1458#ifdef ANNOTATE_MISSING_MASTERS_COMMUNICATION
1460 <<
" Alg node update id "
1470#ifdef ANNOTATE_MISSING_MASTERS_COMMUNICATION
1472 <<
" Alg node # of ref values "
1492#ifdef ANNOTATE_MISSING_MASTERS_COMMUNICATION
1494 <<
" Alg node # of geom objects "
1504#ifdef ANNOTATE_MISSING_MASTERS_COMMUNICATION
1506 <<
" Alg node: geom object index "
1542 geom_object_vector_pt =
macro_mesh_pt->geom_object_vector_pt();
////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////
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.
/////////////////////////////////////////////////////////////////////
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...
////////////////////////////////////////////////////////////////////
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....
/////////////////////////////////////////////////////////////////// /////////////////////////////////...
/////////////////////////////////////////////////////////////////// /////////////////////////////////...
A Class for nodes that deform elastically (i.e. position is an unknown in the problem)....
//////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////// //////////////////////////////...
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
//////////////////////////////////////////////////////////////////// ////////////////////////////////...
OomphInfo oomph_info
Single (global) instantiation of the OomphInfo object – this is used throughout the library as a "rep...