35 #ifndef OOMPH_MULTI_DOMAIN_HEADER
36 #define OOMPH_MULTI_DOMAIN_HEADER
40 #include <oomph-lib-config.h>
61 namespace Multi_domain_functions
131 #ifdef ANNOTATE_MULTI_DOMAIN_COMMUNICATION
200 template<
class BULK_ELEMENT,
unsigned DIM>
204 Mesh*
const& bulk_mesh_pt,
206 const unsigned& interaction = 0);
215 template<
class BULK_ELEMENT,
unsigned DIM>
218 const unsigned& boundary_in_bulk_mesh,
219 Mesh*
const& bulk_mesh_pt,
220 Mesh*
const& face_mesh_pt,
221 const unsigned& interaction = 0);
234 template<
class ELEMENT_0,
class ELEMENT_1>
237 Mesh*
const& first_mesh_pt,
238 Mesh*
const& second_mesh_pt,
239 const unsigned& first_interaction = 0,
240 const unsigned& second_interaction = 0);
255 template<
class EXT_ELEMENT>
257 Mesh*
const& mesh_pt,
258 Mesh*
const& external_mesh_pt,
259 const unsigned& interaction_index = 0);
285 template<
class EXT_ELEMENT,
class FACE_ELEMENT_GEOM_OBJECT>
287 Mesh*
const& mesh_pt,
288 Mesh*
const& external_mesh_pt,
289 Mesh*
const& external_face_mesh_pt,
290 const unsigned& interaction_index = 0);
320 template<
class EXT_ELEMENT,
class FACE_ELEMENT_GEOM_OBJECT>
324 Mesh*
const& external_mesh_pt,
326 const unsigned& interaction_index = 0);
330 template<
class EXT_ELEMENT,
class GEOM_OBJECT>
333 Mesh*
const& mesh_pt,
334 Mesh*
const& external_mesh_pt,
335 const unsigned& interaction_index,
336 Mesh*
const& external_face_mesh_pt = 0);
339 template<
class EXT_ELEMENT,
class GEOM_OBJECT>
343 Mesh*
const& external_mesh_pt,
344 const unsigned& interaction_index,
352 Mesh*
const& external_mesh_pt,
354 const unsigned& interaction_index);
368 Mesh*
const& external_mesh_pt,
375 Mesh*
const& external_mesh_pt,
382 template<
class EXT_ELEMENT>
385 Mesh*
const& external_mesh_pt,
387 const unsigned& interaction_index);
396 Mesh*
const& external_mesh_pt,
397 int& n_cont_inter_values);
406 Mesh*
const& external_mesh_pt,
407 int& n_cont_inter_values);
414 Mesh*
const& external_mesh_pt,
415 int& n_cont_inter_values);
421 Mesh*
const& external_mesh_pt,
422 int& n_cont_inter_values);
430 Mesh*
const& external_mesh_pt,
431 int& n_cont_inter_values);
440 Mesh*
const& external_mesh_pt,
441 int& n_cont_inter_values);
447 template<
class EXT_ELEMENT>
449 Mesh*
const& external_mesh_pt,
451 unsigned& node_index,
453 int& n_cont_inter_values,
458 template<
class EXT_ELEMENT>
461 Mesh*
const& external_mesh_pt,
463 unsigned& node_index,
465 int& n_cont_inter_values,
471 Mesh*
const& external_mesh_pt,
473 unsigned& node_index,
475 int& n_cont_inter_values,
479 template<
class EXT_ELEMENT>
482 Mesh*
const& external_mesh_pt,
484 int& n_cont_inter_values,
493 unsigned& node_index,
495 Mesh*
const& external_mesh_pt,
500 template<
class EXT_ELEMENT>
502 Node*& new_master_nod_pt,
505 Mesh*
const& external_mesh_pt,
514 Mesh*
const& mesh_pt,
515 Mesh*
const& external_mesh_pt);
A general Finite Element class.
Nodes are derived from Data, but, in addition, have a definite (Eulerian) position in a space of a gi...
////////////////////////////////////////////////////////////////// //////////////////////////////////...
Vector< int > Proc_id_plus_one_of_external_element
Proc_id_plus_one_of_external_element[i] contains the processor id (plus one) of the processor on whic...
Vector< double > Flat_packed_located_coordinates
Vector of flat-packed local coordinates for zeta tuples that have been located.
void send_and_receive_located_info(int &iproc, Mesh *const &external_mesh_pt, Problem *problem_pt)
Send location information from current process; Received location information from (current process +...
unsigned Counter_for_flat_packed_unsigneds
Counter used when processing vector of flat-packed unsigneds – this is really "private" data,...
Vector< Vector< unsigned > > External_element_located
Lookup scheme for whether a local element's integration point has had an external element assigned to...
unsigned Dim
Dimension of zeta tuples (set by get_dim_helper) – needed because we store the scalar coordinates in ...
Vector< double > Flat_packed_doubles
Vector of flat-packed doubles to be communicated with other processors.
void send_and_receive_missing_zetas(Problem *problem_pt)
Send the zeta coordinates from the current process to the next process; receive from the previous pro...
void setup_bulk_elements_adjacent_to_face_mesh(Problem *problem_pt, Vector< unsigned > &boundary_in_bulk_mesh, Mesh *const &bulk_mesh_pt, Vector< Mesh * > &face_mesh_pt, const unsigned &interaction=0)
Identify the FaceElements (stored in the mesh pointed to by face_mesh_pt) that are adjacent to the bu...
void get_required_master_nodal_information_helper(int &iproc, Node *master_nod_pt, Problem *problem_pt, Mesh *const &external_mesh_pt, int &n_cont_inter_values)
Helper function to get the required master nodal information from an external haloed master node so t...
void clean_up()
Helper function that clears all the information used during the external storage creation.
void setup_multi_domain_interactions(Problem *problem_pt, Mesh *const &first_mesh_pt, Mesh *const &second_mesh_pt, const unsigned &first_interaction=0, const unsigned &second_interaction=0)
Set up the two-way multi-domain interactions for the problem pointed to by problem_pt....
Vector< unsigned > Flat_packed_unsigneds
Vector of flat-packed unsigneds to be communicated with other processors – this is really "private" d...
void add_external_halo_node_to_storage(Node *&new_nod_pt, Mesh *const &external_mesh_pt, unsigned &loc_p, unsigned &node_index, FiniteElement *const &new_el_pt, int &n_cont_inter_values, Problem *problem_pt)
Helper function to add external halo nodes, including any masters, based on information received from...
bool Doc_timings
Boolean to indicate whether to doc timings or not.
void add_external_haloed_master_node_helper(int &iproc, Node *master_nod_pt, Problem *problem_pt, Mesh *const &external_mesh_pt, int &n_cont_inter_values)
Helper function to add external haloed node that is a master.
void get_dim_helper(Problem *problem_pt, Mesh *const &mesh_pt, Mesh *const &external_mesh_pt)
Helper function that computes the dimension of the elements within each of the specified meshes (and ...
std::ofstream Doc_boundary_coordinate_file
Output file to document the boundary coordinate along the mesh boundary of the bulk mesh during call ...
Vector< double > Flat_packed_zetas_not_found_locally
Vector of flat-packed zeta coordinates for which the external element could not be found during curre...
void recursively_add_masters_of_external_halo_node_to_storage(Node *&new_nod_pt, Mesh *const &external_mesh_pt, unsigned &loc_p, unsigned &node_index, FiniteElement *const &new_el_pt, int &n_cont_inter_values, Problem *problem_pt)
Recursively add masters of external halo nodes (and their masters, etc) based on information received...
Vector< std::string > Flat_packed_unsigneds_string
void locate_zeta_for_local_coordinates(const Vector< Mesh * > &mesh_pt, Mesh *const &external_mesh_pt, Vector< MeshAsGeomObject * > &mesh_geom_obj_pt, const unsigned &interaction_index)
locate zeta for current set of "local" coordinates vector-based version
void construct_new_external_halo_node_helper(Node *&new_nod_pt, unsigned &loc_p, unsigned &node_index, FiniteElement *const &new_el_pt, Mesh *const &external_mesh_pt, Problem *problem_pt)
Helper function which constructs a new external halo node (on new element) with the required informat...
bool Allow_use_of_halo_elements_as_external_elements
Boolean to indicate if we're allowed to use halo elements as external elements. Can drastically reduc...
bool Allow_use_of_halo_elements_as_external_elements_for_projection
Indicate whether we are allowed to use halo elements as external elements for projection,...
bool Doc_stats
Boolean to indicate whether to output basic info during setup_multi_domain_interaction() routines.
void construct_new_external_halo_master_node_helper(Node *&new_master_nod_pt, Node *&nod_pt, unsigned &loc_p, Mesh *const &external_mesh_pt, Problem *problem_pt)
Helper function which constructs a new external halo master node with the information sent from the h...
bool Doc_full_stats
Boolean to indicate whether to output further info during setup_multi_domain_interaction() routines.
Vector< double > Received_flat_packed_zetas_to_be_found
Vector of flat-packed zeta coordinates for which the external element could not be found on another p...
void create_external_halo_elements(int &iproc, const Vector< Mesh * > &mesh_pt, Mesh *const &external_mesh_pt, Problem *problem_pt, const unsigned &interaction_index)
Create external (halo) elements on the loop process based on the information received from each locat...
void add_external_haloed_node_helper(int &iproc, Node *nod_pt, Problem *problem_pt, Mesh *const &external_mesh_pt, int &n_cont_inter_values)
Helper to add external haloed node that is not a master.
void get_required_nodal_information_helper(int &iproc, Node *nod_pt, Problem *problem_pt, Mesh *const &external_mesh_pt, int &n_cont_inter_values)
Helper function to get the required nodal information from an external haloed node so that a fully-fu...
void add_external_halo_master_node_helper(Node *&new_master_nod_pt, Node *&new_nod_pt, Mesh *const &external_mesh_pt, unsigned &loc_p, int &n_cont_inter_values, Problem *problem_pt)
Helper function to add external halo node that is a master.
void recursively_add_masters_of_external_haloed_node(int &iproc, Node *nod_pt, Problem *problem_pt, Mesh *const &external_mesh_pt, int &n_cont_inter_values)
Recursively add any master nodes (and their master nodes etc) of external nodes.
void add_external_halo_node_helper(Node *&new_nod_pt, Mesh *const &external_mesh_pt, unsigned &loc_p, unsigned &node_index, FiniteElement *const &new_el_pt, int &n_cont_inter_values, Problem *problem_pt)
Helper functiono to add external halo node that is not a master.
bool Use_bulk_element_as_external
Boolean to indicate when to use the bulk element as the external element. Defaults to false,...
void setup_multi_domain_interaction(Problem *problem_pt, Mesh *const &mesh_pt, Mesh *const &external_mesh_pt, const unsigned &interaction_index=0)
Function to set up the one-way multi-domain interaction for problems where the meshes pointed to by m...
void aux_setup_multi_domain_interaction(Problem *problem_pt, Mesh *const &mesh_pt, Mesh *const &external_mesh_pt, const unsigned &interaction_index, Mesh *const &external_face_mesh_pt=0)
Auxiliary helper function.
Vector< unsigned > Located_element_status
Vector to indicate (to another processor) whether a located element (that will have to represented as...
void add_external_haloed_node_to_storage(int &iproc, Node *nod_pt, Problem *problem_pt, Mesh *const &external_mesh_pt, int &n_cont_inter_values)
Helper function to add external haloed nodes, including any masters.
unsigned Counter_for_flat_packed_doubles
Counter used when processing vector of flat-packed doubles – this is really "private" data,...
void locate_zeta_for_missing_coordinates(int &iproc, Mesh *const &external_mesh_pt, Problem *problem_pt, Vector< MeshAsGeomObject * > &mesh_geom_obj_pt)
Locate zeta for current set of missing coordinates; vector-based version.
bool Accept_failed_locate_zeta_in_setup_multi_domain_interaction
Boolean to indicate that failure in setup multi domain functions is acceptable; defaults to false....
//////////////////////////////////////////////////////////////////// ////////////////////////////////...