Enumerations | Functions | Variables
oomph::Multi_domain_functions Namespace Reference

Enumerations

enum  { New, Exists, Not_found }
 Enumerators for element status in location procedure. More...
 

Functions

void send_and_receive_missing_zetas (Problem *problem_pt)
 Helper function to send any "missing" zeta coordinates to the next process and receive any coordinates from previous process. More...
 
void send_and_receive_located_info (int &iproc, Mesh *const &external_mesh_pt, Problem *problem_pt)
 Helper function to send back any located information. More...
 
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. More...
 
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 haloed nodes. More...
 
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. More...
 
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. More...
 
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-functional external halo node (and therefore element) can be created on the receiving process. More...
 
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 that a fully-functional external halo master node (and possible element) can be created on the receiving proc. More...
 
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. More...
 
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 an element) with the information sent from the haloed process. More...
 
void locate_zeta_for_missing_coordinates (int &iproc, Mesh *const &external_mesh_pt, Problem *problem_pt, MeshAsGeomObject *&mesh_geom_obj_pt)
 Locate zeta for current set of missing coordinates. More...
 
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. More...
 
void locate_zeta_for_local_coordinates (Mesh *const &mesh_pt, Mesh *const &external_mesh_pt, MeshAsGeomObject *&mesh_geom_obj_pt, const unsigned &interaction_index)
 locate zeta for current set of "local" coordinates More...
 
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)
 Helper function to locate "local" zeta coordinates This is the vector-based version which operates simultaenously on the meshes contained in the Vectors. More...
 
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 checks they are the same) Stores result in Dim. More...
 
void clean_up ()
 Helper function that clears all the intermediate information used during the external storage creation at the end of the procedure. More...
 
bool first_closer_than_second (const std::pair< FiniteElement *, Vector< double > > &p1, const std::pair< FiniteElement *, Vector< double > > &p2)
 Comparison function for sorting entries in bin: Returns true if point identified by p1 (comprising pointer to finite element and vector of local coordinates within that element) is closer to Zeta_coords_for_further_away_comparison than p2. More...
 
template<class BULK_ELEMENT , unsigned DIM>
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 bulk elements next to the boundary_in_bulk_mesh -th boundary of the mesh pointed to by bulk_mesh_pt. The FaceElements must be derived from the ElementWithExternalElement base class and the adjacent bulk elements are stored as their external elements. More...
 
template<class BULK_ELEMENT , unsigned DIM>
void setup_bulk_elements_adjacent_to_face_mesh (Problem *problem_pt, const unsigned &boundary_in_bulk_mesh, Mesh *const &bulk_mesh_pt, Mesh *const &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 bulk elements next to the boundary_in_bulk_mesh -th boundary of the mesh pointed to by bulk_mesh_pt. The FaceElements must be derived from the ElementWithExternalElement base class and the adjacent bulk elements are stored as their external elements. More...
 
template<class ELEMENT_0 , class ELEMENT_1 >
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. Use this for cases where first_mesh_pt and second_mesh_pt occupy the same physical space and are populated by ELEMENT_0 and ELEMENT_1 respectively, and are combined to solve a single problem. The elements in two meshes interact both ways the elements in each mesh act as "external elements" for the elements in the "other" mesh. The interaction indices allow the specification of which interaction we're setting up in the two meshes. They default to zero, which is appropriate if there's only a single interaction. More...
 
template<class EXT_ELEMENT >
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 mesh_pt and external_mesh_pt occupy the same physical space, and the elements in external_mesh_pt act as "external elements" for the ElementWithExternalElements in mesh_pt (but not vice versa): More...
 
template<class EXT_ELEMENT , class FACE_ELEMENT_GEOM_OBJECT >
void setup_multi_domain_interaction (Problem *problem_pt, Mesh *const &mesh_pt, Mesh *const &external_mesh_pt, Mesh *const &external_face_mesh_pt, const unsigned &interaction_index=0)
 Function to set up the one-way multi-domain interaction for FSI-like problems. More...
 
template<class EXT_ELEMENT , class FACE_ELEMENT_GEOM_OBJECT >
void setup_multi_domain_interaction (Problem *problem_pt, const Vector< Mesh * > &mesh_pt, Mesh *const &external_mesh_pt, const Vector< Mesh * > &external_face_mesh_pt, const unsigned &interaction_index=0)
 Function to set up the one-way multi-domain interaction for FSI-like problems. More...
 
template<class EXT_ELEMENT , class GEOM_OBJECT >
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. More...
 
template<class EXT_ELEMENT , class GEOM_OBJECT >
void aux_setup_multi_domain_interaction (Problem *problem_pt, const Vector< Mesh * > &mesh_pt, Mesh *const &external_mesh_pt, const unsigned &interaction_index, const Vector< Mesh * > &external_face_mesh_pt)
 Auxiliary helper function. More...
 
template<class EXT_ELEMENT >
void create_external_halo_elements (int &iproc, Mesh *const &mesh_pt, Mesh *const &external_mesh_pt, Problem *problem_pt, const unsigned &interaction_index)
 Helper function to create external (halo) elements on the loop process based on the info received in send_and_received_located_info. More...
 
template<class EXT_ELEMENT >
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 locate_zeta call on other processes This is the vector-based function which operates simultaneously on the meshes contained in the vectors. More...
 
template<class EXT_ELEMENT >
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 the haloed process. More...
 
template<class EXT_ELEMENT >
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 from the haloed process. More...
 
template<class EXT_ELEMENT >
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. More...
 
template<class EXT_ELEMENT >
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 haloed process. More...
 

Variables

std::ofstream Doc_boundary_coordinate_file
 Output file to document the boundary coordinate along the mesh boundary of the bulk mesh during call to setup_bulk_elements_adjacent_to_face_mesh(...) More...
 
bool Accept_failed_locate_zeta_in_setup_multi_domain_interaction =false
 Boolean to indicate that failure in setup multi domain functions is acceptable; defaults to false. If set to true external element pointers are set to null for those elements for which external elements couldn't be located. More...
 
unsigned Dim
 Dimension of zeta tuples (set by get_dim_helper) – needed because we store the scalar coordinates in flat-packed form. More...
 
Vector< Vector< unsigned > > External_element_located
 Lookup scheme for whether a local element's integration point has had an external element assigned to it – essentially boolean. External_element_located[e][ipt] = {0,1} if external element for ipt-th integration in local element e {has not, has} been found. Used locally to ensure that we're not searching for the same elements over and over again when we go around the spirals. More...
 
Vector< double > Flat_packed_zetas_not_found_locally
 Vector of flat-packed zeta coordinates for which the external element could not be found during current local search. These will be sent to the next processor in the ring-like parallel search. The zeta coordinates come in groups of Dim (scalar) coordinates. More...
 
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 processor and for which we're currently searching here. Whatever can't be found here, gets written into Flat_packed_zetas_not_found_locally and then passed on to the next processor during the ring-like parallel search. The zeta coordinates come in groups of Dim (scalar) coordinates. More...
 
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 which the i-th zeta coordinate tuple received from elsewhere (in the order in which these are stored in Received_flat_packed_zetas_to_be_found) was located; it's zero if it wasn't found during the current stage of the ring-like parallel search. More...
 
Vector< unsigned > Located_element_status
 Vector to indicate (to another processor) whether a located element (that will have to represented as an external halo element on that processor) should be newly created on that processor (2), already exists on that processor (1), or is not on the current processor either (0). More...
 
Vector< double > Flat_packed_located_coordinates
 Vector of flat-packed local coordinates for zeta tuples that have been located. More...
 
Vector< double > Flat_packed_doubles
 Vector of flat-packed doubles to be communicated with other processors. More...
 
unsigned Counter_for_flat_packed_doubles
 Counter used when processing vector of flat-packed doubles – this is really "private" data, declared here to avoid having to pass it (and the associated array) between the various helper functions. More...
 
Vector< unsigned > Flat_packed_unsigneds
 Vector of flat-packed unsigneds to be communicated with other processors – this is really "private" data, declared here to avoid having to pass the array between the various helper functions. More...
 
Vector< std::string > Flat_packed_unsigneds_string
 
unsigned Counter_for_flat_packed_unsigneds
 Counter used when processing vector of flat-packed unsigneds – this is really "private" data, declared here to avoid having to pass it (and the associated array) between the various helper functions. More...
 
bool Compute_extreme_bin_coordinates =true
 Bool to tell the MeshAsGeomObject whether to calculate the extreme coordinates of the bin structure. More...
 
unsigned Nx_bin =100
 Number of bins in the first dimension in binning method in setup_multi_domain_interaction(). More...
 
unsigned Ny_bin =100
 Number of bins in the second dimension in binning method in setup_multi_domain_interaction(). More...
 
unsigned Nz_bin =100
 Number of bins in the third dimension in binning method in setup_multi_domain_interaction(). More...
 
unsigned N_spiral_chunk =1
 Number of spirals to be searched in one go. More...
 
unsigned Nsample_points =5
 (Measure of) the number of sampling points within the elements when populating the bin More...
 
double X_min =1.0
 Minimum and maximum coordinates for each dimension of the external mesh used to "create" the bins in setup_multi_domain_interaction(). These can be set by user if they want to (otherwise the MeshAsGeomObject calculates these values based upon the mesh itself; see MeshAsGeomObject::get_max_and_min_coords(...)) They default to "incorrect" values initially. More...
 
double X_max =-1.0
 Maximum coordinate in first dimension. More...
 
double Y_min =1.0
 Minimum coordinate in second dimension. More...
 
double Y_max =-1.0
 Maximum coordinate in second dimension. More...
 
double Z_min =1.0
 Minimum coordinate in third dimension. More...
 
double Z_max =-1.0
 Maximum coordinate in third dimension. More...
 
double Percentage_offset =5.0
 Percentage offset to add to each extreme of the bin structure. Default value of 5 (note that this is in percent!) More...
 
bool Use_bulk_element_as_external =false
 Boolean to indicate when to use the bulk element as the external element. Defaults to false, you must have set up FaceElements properly first in order for it to work. More...
 
bool Allow_use_of_halo_elements_as_external_elements =true
 Boolean to indicate if we're allowed to use halo elements as external elements. Can drastically reduce the number of external halo elements – currently not aware of any problems therefore set to true by default but retention of this flag allows easy return to previous implementation. More...
 
double Total_time_for_sorting_elements_in_bins =0.0
 The timing for sorting the elements in the bins. More...
 
bool Setup_multi_domain_for_projection =false
 Set up multi-domain for projection. More...
 
bool Allow_use_of_halo_elements_as_external_elements_for_projection =true
 Indicate whether we are allowed to use halo elements as external elements for projection, possibly only required in parallel unstructured mesh generation during the projection stage. Default set to true. More...
 
bool Doc_timings =false
 Boolean to indicate whether to doc timings or not. More...
 
bool Doc_stats =false
 Boolean to indicate whether to output basic info during setup_multi_domain_interaction() routines. More...
 
bool Doc_full_stats =false
 Boolean to indicate whether to output further info during setup_multi_domain_interaction() routines. More...
 
bool Sort_bin_entries =false
 Bool to decide if to sort entries in bin during locate_zeta operation (default: false) More...
 
Vector< double > Zeta_coords_for_further_away_comparison
 Vector of zeta coordinates that we're currently trying to locate; used in sorting of bin entries in further_away() comparison function. More...
 

Enumeration Type Documentation

anonymous enum

Enumerators for element status in location procedure.

Enumerator
New 
Exists 
Not_found 

Definition at line 159 of file multi_domain.h.

Function Documentation

template<class EXT_ELEMENT >
void oomph::Multi_domain_functions::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.

Definition at line 2935 of file multi_domain.template.cc.

References Counter_for_flat_packed_unsigneds, oomph::Mesh::external_halo_node_pt(), Flat_packed_unsigneds, and oomph::oomph_info.

void oomph::Multi_domain_functions::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.

Helper function to add external halo node that is not a master.

Definition at line 1350 of file multi_domain.cc.

References construct_new_external_halo_node_helper(), Counter_for_flat_packed_unsigneds, oomph::Mesh::external_halo_node_pt(), Flat_packed_unsigneds, oomph::FiniteElement::node_pt(), and oomph::oomph_info.

template<class EXT_ELEMENT >
void oomph::Multi_domain_functions::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 the haloed process.

Helper function to add external halo nodes, including any masters, based on information received from the haloed process

Definition at line 2846 of file multi_domain.template.cc.

References oomph::Missing_masters_functions::add_external_halo_node_helper().

void oomph::Multi_domain_functions::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 
)
void oomph::Multi_domain_functions::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.

Helper function to add external haloed node that is not a master.

Definition at line 596 of file multi_domain.cc.

References oomph::Mesh::add_external_haloed_node_pt(), Flat_packed_unsigneds, Flat_packed_unsigneds_string, get_required_nodal_information_helper(), and oomph::Mesh::nexternal_haloed_node().

Referenced by add_external_haloed_node_to_storage().

void oomph::Multi_domain_functions::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.

Helper function to add external haloed nodes, inc. masters of external haloed nodes.

Definition at line 510 of file multi_domain.cc.

References add_external_haloed_node_helper(), and recursively_add_masters_of_external_haloed_node().

Referenced by get_required_master_nodal_information_helper(), and locate_zeta_for_missing_coordinates().

template<class EXT_ELEMENT , class GEOM_OBJECT >
void oomph::Multi_domain_functions::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.

This routine calls the locate_zeta routine (simultaneously on each processor for each individual processor's element set if necessary) and sets up the external (halo) element and node storage as necessary. The locate_zeta procedure here works for all multi-domain problems where either two meshes occupy the same physical space but have differing element types (e.g. a Boussinesq convection problem where AdvectionDiffusion elements interact with Navier-Stokes type elements) or two meshes interact along some boundary of the external mesh, represented by a "face mesh", such as an FSI problem.

If it's is now zero then break out of the spirals loop

Definition at line 589 of file multi_domain.template.cc.

References clean_up(), oomph::Mesh::communicator_pt(), Compute_extreme_bin_coordinates, oomph::MeshAsGeomObject::current_max_spiral_level(), oomph::MeshAsGeomObject::current_min_spiral_level(), oomph::FiniteElement::dim(), oomph::Missing_masters_functions::Doc_full_stats, oomph::Missing_masters_functions::Doc_stats, oomph::Missing_masters_functions::Doc_timings, e, oomph::Mesh::element_pt(), External_element_located, oomph::Mesh::finite_element_pt(), Flat_packed_zetas_not_found_locally, i, oomph::ElementWithExternalElement::initialise_external_element_storage(), oomph::FiniteElement::integral_pt(), oomph::FiniteElement::interpolated_x(), oomph::GeneralisedElement::is_halo(), oomph::Integral::knot(), locate_zeta_for_local_coordinates(), locate_zeta_for_missing_coordinates(), N_spiral_chunk, oomph::Node::ndim(), oomph::Mesh::nelement(), oomph::GeomObject::nlagrangian(), oomph::FiniteElement::node_pt(), Nsample_points, oomph::Integral::nweight(), Nx_bin, Ny_bin, Nz_bin, oomph::oomph_info, oomph::MeshAsGeomObject::output_bins(), s, send_and_receive_located_info(), send_and_receive_missing_zetas(), Sort_bin_entries, t, oomph::TimingHelpers::timer(), Total_time_for_sorting_elements_in_bins, and Use_bulk_element_as_external.

Referenced by setup_multi_domain_interaction().

template<class EXT_ELEMENT , class GEOM_OBJECT >
void oomph::Multi_domain_functions::aux_setup_multi_domain_interaction ( Problem *  problem_pt,
const Vector< Mesh * > &  mesh_pt,
Mesh *const &  external_mesh_pt,
const unsigned &  interaction_index,
const Vector< Mesh * > &  external_face_mesh_pt 
)

Auxiliary helper function.

This routine calls the locate_zeta routine (simultaneously on each processor for each individual processor's element set if necessary) and sets up the external (halo) element and node storage as necessary. The locate_zeta procedure here works for all multi-domain problems where either two meshes occupy the same physical space but have differing element types (e.g. a Boussinesq convection problem where AdvectionDiffusion elements interact with Navier-Stokes type elements) or two meshes interact along some boundary of the external mesh, represented by a "face mesh", such as an FSI problem.

Vector-based version operates simultaneously on the meshes contained in the vectors.

If it's is now zero then break out of the spirals loop

Definition at line 1413 of file multi_domain.template.cc.

References Accept_failed_locate_zeta_in_setup_multi_domain_interaction, clean_up(), oomph::Problem::communicator_pt(), Compute_extreme_bin_coordinates, Dim, oomph::FiniteElement::dim(), oomph::Missing_masters_functions::Doc_full_stats, oomph::Missing_masters_functions::Doc_stats, oomph::Missing_masters_functions::Doc_timings, e, oomph::Mesh::element_pt(), External_element_located, oomph::ElementWithExternalElement::external_element_pt(), oomph::Mesh::finite_element_pt(), Flat_packed_zetas_not_found_locally, i, oomph::ElementWithExternalElement::initialise_external_element_storage(), oomph::FiniteElement::integral_pt(), oomph::FiniteElement::interpolated_x(), oomph::GeneralisedElement::is_halo(), oomph::Integral::knot(), locate_zeta_for_local_coordinates(), locate_zeta_for_missing_coordinates(), N_spiral_chunk, oomph::Node::ndim(), oomph::Mesh::nelement(), oomph::Mesh::nexternal_halo_element(), oomph::Mesh::nexternal_halo_node(), oomph::Mesh::nexternal_haloed_element(), oomph::Mesh::nexternal_haloed_node(), oomph::Mesh::nhalo_node(), oomph::Mesh::nhaloed_node(), oomph::Mesh::nnode(), oomph::FiniteElement::node_pt(), oomph::Mesh::nroot_halo_element(), oomph::Mesh::nroot_haloed_element(), Nsample_points, oomph::Integral::nweight(), Nx_bin, Ny_bin, Nz_bin, oomph::oomph_info, oomph::FiniteElement::output(), oomph::Problem::problem_has_been_distributed(), s, send_and_receive_located_info(), send_and_receive_missing_zetas(), Sort_bin_entries, t, oomph::TimingHelpers::timer(), Total_time_for_sorting_elements_in_bins, and Use_bulk_element_as_external.

void oomph::Multi_domain_functions::clean_up ( )

Helper function that clears all the intermediate information used during the external storage creation at the end of the procedure.

Helper function that clears all the information used during the external storage creation

Definition at line 2972 of file multi_domain.cc.

References External_element_located, Flat_packed_doubles, Flat_packed_located_coordinates, Flat_packed_unsigneds, Flat_packed_zetas_not_found_locally, Located_element_status, Proc_id_plus_one_of_external_element, and Received_flat_packed_zetas_to_be_found.

Referenced by aux_setup_multi_domain_interaction().

template<class EXT_ELEMENT >
void oomph::Multi_domain_functions::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 haloed process.

Helper function which constructs a new external halo master node with the required information sent from the haloed process

The first entry of All_unsigned_values is the default node update id

... so for the specified update_id, call add_node_update_info

Now call update_node_update

Definition at line 2974 of file multi_domain.template.cc.

References oomph::Mesh::add_boundary_node(), oomph::Mesh::add_external_halo_element_pt(), oomph::Mesh::add_external_halo_node_pt(), oomph::AlgebraicNode::add_node_update_info(), Counter_for_flat_packed_doubles, Counter_for_flat_packed_unsigneds, oomph::FiniteElement::dim(), oomph::Mesh::external_halo_element_pt(), Flat_packed_doubles, Flat_packed_unsigneds, oomph::AlgebraicMesh::geom_object_list_pt(), oomph::MacroElementNodeUpdateMesh::geom_object_vector_pt(), i, oomph::BoundaryNodeBase::index_of_first_value_assigned_by_face_element_pt(), oomph::FiniteElement::local_coordinate_of_node(), oomph::MacroElementNodeUpdateMesh::macro_domain_pt(), oomph::Domain::macro_element_pt(), oomph::Node::ndim(), oomph::FiniteElement::nnode(), oomph::FiniteElement::node_pt(), oomph::MacroElementNodeUpdateNode::node_update_element_pt(), oomph::TimeStepper::ntstorage(), oomph::Data::nvalue(), oomph::oomph_info, oomph::QElementBase::s_macro_ll(), oomph::QElementBase::s_macro_ur(), oomph::FiniteElement::set_macro_elem_pt(), oomph::MacroElementNodeUpdateNode::set_node_update_info(), oomph::Data::set_value(), t, oomph::Problem::time_stepper_pt(), oomph::AlgebraicMesh::update_node_update(), oomph::SolidNode::variable_position_pt(), and oomph::Node::x().

void oomph::Multi_domain_functions::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 an element) with the information sent from the haloed process.

Helper function which constructs a new external halo node (on new element) with the required information sent from the haloed process

The first entry of All_alg_nodal_info contains the default node update id e.g. for the quarter circle there are "Upper_left_box", "Lower right box" etc...

again we need the size of this vector as it varies between meshes; we also need some indication as to which geometric object should be used...

For the received update_id, ref_value, geom_object call add_node_update_info

Now call update_node_update

Definition at line 1397 of file multi_domain.cc.

References oomph::Mesh::add_boundary_node(), oomph::Mesh::add_external_halo_node_pt(), oomph::AlgebraicNode::add_node_update_info(), oomph::FiniteElement::construct_boundary_node(), oomph::FiniteElement::construct_node(), Counter_for_flat_packed_doubles, Counter_for_flat_packed_unsigneds, Flat_packed_doubles, Flat_packed_unsigneds, oomph::MacroElementNodeUpdateMesh::geom_object_vector_pt(), i, oomph::BoundaryNodeBase::index_of_first_value_assigned_by_face_element_pt(), oomph::FiniteElement::local_coordinate_of_node(), oomph::Node::ndim(), oomph::TimeStepper::ntstorage(), oomph::Data::nvalue(), oomph::oomph_info, oomph::Node::resize(), oomph::MacroElementNodeUpdateNode::set_node_update_info(), oomph::Data::set_value(), t, oomph::Problem::time_stepper_pt(), oomph::AlgebraicMesh::update_node_update(), oomph::SolidNode::variable_position_pt(), and oomph::Node::x().

Referenced by add_external_halo_node_helper().

template<class EXT_ELEMENT >
void oomph::Multi_domain_functions::create_external_halo_elements ( int &  iproc,
Mesh *const &  mesh_pt,
Mesh *const &  external_mesh_pt,
Problem *  problem_pt,
const unsigned &  interaction_index 
)
template<class EXT_ELEMENT >
void oomph::Multi_domain_functions::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 locate_zeta call on other processes This is the vector-based function which operates simultaneously on the meshes contained in the vectors.

Creates external (halo) elements on the loop process based on the information received from each locate_zeta call on other processes

Definition at line 2596 of file multi_domain.template.cc.

References oomph::Problem::communicator_pt(), Counter_for_flat_packed_doubles, Counter_for_flat_packed_unsigneds, oomph::FiniteElement::dim(), e, External_element_located, oomph::ElementWithExternalElement::external_element_pt(), Flat_packed_doubles, Flat_packed_located_coordinates, Flat_packed_unsigneds, i, oomph::FiniteElement::integral_pt(), oomph::GeneralisedElement::is_halo(), Located_element_status, oomph::MacroElementNodeUpdateMesh::macro_domain_pt(), New, oomph::FiniteElement::nnode(), oomph::Integral::nweight(), oomph::oomph_info, Proc_id_plus_one_of_external_element, oomph::QElementBase::s_macro_ll(), oomph::QElementBase::s_macro_ur(), and oomph::FiniteElement::set_macro_elem_pt().

bool oomph::Multi_domain_functions::first_closer_than_second ( const std::pair< FiniteElement *, Vector< double > > &  p1,
const std::pair< FiniteElement *, Vector< double > > &  p2 
)

Comparison function for sorting entries in bin: Returns true if point identified by p1 (comprising pointer to finite element and vector of local coordinates within that element) is closer to Zeta_coords_for_further_away_comparison than p2.

Comparison function for sorting entries in bin: Returns true if point identified by p1 (comprising pointer to finite element and vector of local coordinates within that element) is closer to Zeta_coords_for_further_away_comparison than p2

Definition at line 2997 of file multi_domain.cc.

References Dim, i, oomph::FiniteElement::interpolated_zeta(), s, and Zeta_coords_for_further_away_comparison.

void oomph::Multi_domain_functions::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 checks they are the same) Stores result in Dim.

Helper function that computes the dimension of the elements within each of the specified meshes (and checks they are the same). Stores result in Dim.

Definition at line 2908 of file multi_domain.cc.

References oomph::Problem::communicator_pt(), Dim, oomph::Mesh::element_pt(), and oomph::Mesh::nelement().

Referenced by setup_multi_domain_interaction().

void oomph::Multi_domain_functions::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 that a fully-functional external halo master node (and possible element) can be created on the receiving proc.

Helper function to get the required master nodal information from an external haloed master node so that a fully-functional external halo master node (and possible element) can be created on the receiving process

Definition at line 963 of file multi_domain.cc.

References add_external_haloed_node_to_storage(), oomph::FiniteElement::dim(), Flat_packed_doubles, Flat_packed_unsigneds, Flat_packed_unsigneds_string, oomph::AlgebraicMesh::geom_object_list_pt(), oomph::AlgebraicNode::geom_object_pt(), i, oomph::BoundaryNodeBase::index_of_first_value_assigned_by_face_element_pt(), oomph::Node::is_on_boundary(), oomph::FiniteElement::macro_elem_pt(), oomph::MacroElement::macro_element_number(), oomph::Mesh::nboundary(), oomph::Node::ndim(), oomph::AlgebraicNode::ngeom_object(), oomph::AlgebraicMesh::ngeom_object_list_pt(), oomph::SolidNode::nlagrangian(), oomph::SolidNode::nlagrangian_type(), oomph::FiniteElement::nnode(), oomph::FiniteElement::node_pt(), oomph::MacroElementNodeUpdateNode::node_update_element_pt(), oomph::AlgebraicNode::node_update_fct_id(), oomph::Node::nposition_type(), oomph::AlgebraicNode::nref_value(), oomph::Problem::ntime_stepper(), oomph::TimeStepper::ntstorage(), oomph::Data::nvalue(), oomph::AlgebraicNode::ref_value(), oomph::QElementBase::s_macro_ll(), oomph::QElementBase::s_macro_ur(), t, oomph::Data::time_stepper_pt(), oomph::Problem::time_stepper_pt(), oomph::Node::value(), oomph::SolidNode::variable_position_pt(), and oomph::Node::x().

Referenced by add_external_haloed_master_node_helper().

void oomph::Multi_domain_functions::get_required_nodal_information_helper ( int &  iproc,
Node *  nod_pt,
Problem *  problem_pt,
Mesh *const &  external_mesh_pt,
int &  n_cont_inter_values 
)
void oomph::Multi_domain_functions::locate_zeta_for_local_coordinates ( Mesh *const &  mesh_pt,
Mesh *const &  external_mesh_pt,
MeshAsGeomObject *&  mesh_geom_obj_pt,
const unsigned &  interaction_index 
)
void oomph::Multi_domain_functions::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 
)
void oomph::Multi_domain_functions::locate_zeta_for_missing_coordinates ( int &  iproc,
Mesh *const &  external_mesh_pt,
Problem *  problem_pt,
MeshAsGeomObject *&  mesh_geom_obj_pt 
)
void oomph::Multi_domain_functions::locate_zeta_for_missing_coordinates ( int &  iproc,
Mesh *const &  external_mesh_pt,
Problem *  problem_pt,
Vector< MeshAsGeomObject * > &  mesh_geom_obj_pt 
)
template<class EXT_ELEMENT >
void oomph::Multi_domain_functions::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 from the haloed process.

Recursively add masters of external halo nodes (and their masters, etc) based on information received from the haloed process

Definition at line 2874 of file multi_domain.template.cc.

References Counter_for_flat_packed_doubles, Counter_for_flat_packed_unsigneds, Flat_packed_doubles, Flat_packed_unsigneds, oomph::oomph_info, oomph::Node::set_hanging_pt(), and oomph::HangInfo::set_master_node_pt().

void oomph::Multi_domain_functions::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 haloed nodes.

Recursively add any master nodes (and their master nodes etc) of external nodes

Definition at line 532 of file multi_domain.cc.

References add_external_haloed_master_node_helper(), Flat_packed_doubles, Flat_packed_unsigneds, Flat_packed_unsigneds_string, oomph::Node::hanging_pt(), oomph::Node::is_hanging(), oomph::HangInfo::master_node_pt(), oomph::HangInfo::master_weight(), and oomph::HangInfo::nmaster().

Referenced by add_external_haloed_node_to_storage().

void oomph::Multi_domain_functions::send_and_receive_located_info ( int &  iproc,
Mesh *const &  external_mesh_pt,
Problem *  problem_pt 
)

Helper function to send back any located information.

Send location information from current process; Received location information from (current process + iproc) modulo (nproc)

Definition at line 312 of file multi_domain.cc.

References oomph::Problem::communicator_pt(), Dim, Flat_packed_doubles, Flat_packed_located_coordinates, Flat_packed_unsigneds, Flat_packed_unsigneds_string, i, Located_element_status, oomph::oomph_info, Proc_id_plus_one_of_external_element, and Received_flat_packed_zetas_to_be_found.

Referenced by aux_setup_multi_domain_interaction().

void oomph::Multi_domain_functions::send_and_receive_missing_zetas ( Problem *  problem_pt)

Helper function to send any "missing" zeta coordinates to the next process and receive any coordinates from previous process.

Send the zeta coordinates from the current process to the next process; receive from the previous process

Definition at line 248 of file multi_domain.cc.

References oomph::Problem::communicator_pt(), Flat_packed_zetas_not_found_locally, and Received_flat_packed_zetas_to_be_found.

Referenced by aux_setup_multi_domain_interaction().

template<class BULK_ELEMENT , unsigned DIM>
void oomph::Multi_domain_functions::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 bulk elements next to the boundary_in_bulk_mesh -th boundary of the mesh pointed to by bulk_mesh_pt. The FaceElements must be derived from the ElementWithExternalElement base class and the adjacent bulk elements are stored as their external elements.

This is the vector-based version which deals with multiple bulk mesh boundaries at the same time.

Identify the FaceElements (stored in the mesh pointed to by face_mesh_pt) that are adjacent to the bulk elements next to the boundary_in_bulk_mesh -th boundary of the mesh pointed to by bulk_mesh_pt. The FaceElements must be derived from the ElementWithExternalElement base class and the adjacent bulk elements are stored as their external elements.

This is the vector-based version which deals with multiple bulk mesh boundaries at the same time.

Definition at line 78 of file multi_domain.template.cc.

References Doc_boundary_coordinate_file, e, oomph::FiniteElement::get_s_plot(), i, oomph::FaceElement::interpolated_x(), oomph::FiniteElement::interpolated_zeta(), oomph::FiniteElement::nplot_points(), s, oomph::FaceElement::set_boundary_number_in_bulk_mesh(), setup_multi_domain_interaction(), oomph::FiniteElement::tecplot_zone_string(), and oomph::FiniteElement::write_tecplot_zone_footer().

Referenced by oomph::FSI_functions::setup_fluid_load_info_for_solid_elements(), and oomph::FSI_functions::setup_solid_elements_for_displacement_bc().

template<class BULK_ELEMENT , unsigned DIM>
void oomph::Multi_domain_functions::setup_bulk_elements_adjacent_to_face_mesh ( Problem *  problem_pt,
const unsigned &  boundary_in_bulk_mesh,
Mesh *const &  bulk_mesh_pt,
Mesh *const &  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 bulk elements next to the boundary_in_bulk_mesh -th boundary of the mesh pointed to by bulk_mesh_pt. The FaceElements must be derived from the ElementWithExternalElement base class and the adjacent bulk elements are stored as their external elements.

Identify the FaceElements (stored in the mesh pointed to by face_mesh_pt) that are adjacent to the bulk elements next to the boundary_in_bulk_mesh -th boundary of the mesh pointed to by bulk_mesh_pt. The FaceElements must be derived from the ElementWithExternalElement base class and the adjacent bulk elements are stored as their external elements.

Definition at line 216 of file multi_domain.template.cc.

References Doc_boundary_coordinate_file, e, oomph::FiniteElement::get_s_plot(), i, oomph::FaceElement::interpolated_x(), oomph::FiniteElement::interpolated_zeta(), oomph::FiniteElement::nplot_points(), s, oomph::FaceElement::set_boundary_number_in_bulk_mesh(), setup_multi_domain_interaction(), oomph::FiniteElement::tecplot_zone_string(), and oomph::FiniteElement::write_tecplot_zone_footer().

template<class EXT_ELEMENT >
void oomph::Multi_domain_functions::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 mesh_pt and external_mesh_pt occupy the same physical space, and the elements in external_mesh_pt act as "external elements" for the ElementWithExternalElements in mesh_pt (but not vice versa):

  • mesh_pt points to the mesh of ElemenWithExternalElements for which the interaction is set up.
  • external_mesh_pt points to the mesh that contains the elements of type EXT_ELEMENT that act as "external elements" for the ElementWithExternalElements in \ mesh_pt.
  • The interaction_index parameter defaults to zero and must be otherwise set by the user if there is more than one mesh that provides sources for the Mesh pointed to by mesh_pt.

    Function to set up the one-way multi-domain interaction for problems where the meshes pointed to by mesh_pt and external_mesh_pt occupy the same physical space, and the elements in external_mesh_pt act as "external elements" for the ElementWithExternalElements in mesh_pt (but not vice versa):

  • mesh_pt points to the mesh of ElemenWithExternalElements for which the interaction is set up.
  • external_mesh_pt points to the mesh that contains the elements of type EXT_ELEMENT that act as "external elements" for the ElementWithExternalElements in mesh_pt.
  • The interaction_index parameter defaults to zero and must be otherwise set by the user if there is more than one mesh that provides sources for the Mesh pointed to by mesh_pt.

Definition at line 379 of file multi_domain.template.cc.

References Dim, get_dim_helper(), and Use_bulk_element_as_external.

Referenced by oomph::ProjectionProblem< PROJECTABLE_ELEMENT >::project(), and setup_bulk_elements_adjacent_to_face_mesh().

template<class EXT_ELEMENT , class FACE_ELEMENT_GEOM_OBJECT >
void oomph::Multi_domain_functions::setup_multi_domain_interaction ( Problem *  problem_pt,
Mesh *const &  mesh_pt,
Mesh *const &  external_mesh_pt,
Mesh *const &  external_face_mesh_pt,
const unsigned &  interaction_index = 0 
)

Function to set up the one-way multi-domain interaction for FSI-like problems.

  • mesh_pt points to the mesh of ElemenWithExternalElements for which the interaction is set up. In an FSI example, this mesh would contain the FSIWallElements (either beam/shell elements or the FSISolidTractionElements that apply the traction to a "bulk" solid mesh that is loaded by the fluid.)
  • external_mesh_pt points to the mesh that contains the elements of type EXT_ELEMENT that provide the "source" for the ElementWithExternalElements. In an FSI example, this mesh would contain the "bulk" fluid elements.
  • external_face_mesh_pt points to the mesh of FaceElements attached to the external_mesh_pt. The mesh pointed to by external_face_mesh_pt has the same dimension as mesh_pt. The elements contained in external_face_mesh_pt are of type FACE_ELEMENT_GEOM_OBJECT. In an FSI example, these elements are usually the FaceElementAsGeomObjects (templated by the type of the "bulk" fluid elements to which they are attached) that define the FSI boundary of the fluid domain.
  • The interaction_index parameter defaults to zero and must otherwise be set by the user if there is more than one mesh that provides "external elements" for the Mesh pointed to by mesh_pt (e.g. in the case when a beam or shell structure is loaded by fluid from both sides.)

Function to set up the one-way multi-domain interaction for FSI-like problems.

  • mesh_pt points to the mesh of ElemenWithExternalElements for which the interaction is set up. In an FSI example, this mesh would contain the FSIWallElements (either beam/shell elements or the FSISolidTractionElements that apply the traction to a "bulk" solid mesh that is loaded by the fluid.)
  • external_mesh_pt points to the mesh that contains the elements of type EXT_ELEMENT that provide the "source" for the ElementWithExternalElements. In an FSI example, this mesh would contain the "bulk" fluid elements.
  • external_face_mesh_pt points to the mesh of FaceElements attached to the external_mesh_pt. The mesh pointed to by external_face_mesh_pt has the same dimension as mesh_pt. The elements contained in external_face_mesh_pt are of type FACE_ELEMENT_GEOM_OBJECT. In an FSI example, these elements are usually the FaceElementAsGeomObjects (templated by the type of the "bulk" fluid elements to which they are attached) that define the FSI boundary of the fluid domain.
  • The interaction_index parameter defaults to zero and must otherwise be set by the user if there is more than one mesh that provides "external elements" for the Mesh pointed to by mesh_pt (e.g. in the case when a beam or shell structure is loaded by fluid from both sides.)

Definition at line 436 of file multi_domain.template.cc.

References aux_setup_multi_domain_interaction(), Dim, get_dim_helper(), and Use_bulk_element_as_external.

template<class EXT_ELEMENT , class FACE_ELEMENT_GEOM_OBJECT >
void oomph::Multi_domain_functions::setup_multi_domain_interaction ( Problem *  problem_pt,
const Vector< Mesh * > &  mesh_pt,
Mesh *const &  external_mesh_pt,
const Vector< Mesh * > &  external_face_mesh_pt,
const unsigned &  interaction_index = 0 
)

Function to set up the one-way multi-domain interaction for FSI-like problems.

  • mesh_pt points to the mesh of ElemenWithExternalElements for which the interaction is set up. In an FSI example, this mesh would contain the FSIWallElements (either beam/shell elements or the FSISolidTractionElements that apply the traction to a "bulk" solid mesh that is loaded by the fluid.)
  • external_mesh_pt points to the mesh that contains the elements of type EXT_ELEMENT that provide the "source" for the ElementWithExternalElements. In an FSI example, this mesh would contain the "bulk" fluid elements.
  • external_face_mesh_pt points to the mesh of FaceElements attached to the external_mesh_pt. The mesh pointed to by external_face_mesh_pt has the same dimension as mesh_pt. The elements contained in external_face_mesh_pt are of type FACE_ELEMENT_GEOM_OBJECT. In an FSI example, these elements are usually the FaceElementAsGeomObjects (templated by the type of the "bulk" fluid elements to which they are attached) that define the FSI boundary of the fluid domain.
  • The interaction_index parameter defaults to zero and must otherwise be set by the user if there is more than one mesh that provides "external elements" for the Mesh pointed to by mesh_pt (e.g. in the case when a beam or shell structure is loaded by fluid from both sides.)

This is the vector-based version which operates simultaneously on the meshes contained in the Vector arguments.

Function to set up the one-way multi-domain interaction for FSI-like problems.

  • mesh_pt points to the mesh of ElemenWithExternalElements for which the interaction is set up. In an FSI example, this mesh would contain the FSIWallElements (either beam/shell elements or the FSISolidTractionElements that apply the traction to a "bulk" solid mesh that is loaded by the fluid.)
  • external_mesh_pt points to the mesh that contains the elements of type EXT_ELEMENT that provide the "source" for the ElementWithExternalElements. In an FSI example, this mesh would contain the "bulk" fluid elements.
  • external_face_mesh_pt points to the mesh of FaceElements attached to the external_mesh_pt. The mesh pointed to by external_face_mesh_pt has the same dimension as mesh_pt. The elements contained in external_face_mesh_pt are of type FACE_ELEMENT_GEOM_OBJECT. In an FSI example, these elements are usually the FaceElementAsGeomObjects (templated by the type of the "bulk" fluid elements to which they are attached) that define the FSI boundary of the fluid domain.
  • The interaction_index parameter defaults to zero and must otherwise be set by the user if there is more than one mesh that provides "external elements" for the Mesh pointed to by mesh_pt (e.g. in the case when a beam or shell structure is loaded by fluid from both sides.)

Vector-based version operates simultaneously on the meshes contained in the vectors.

Definition at line 497 of file multi_domain.template.cc.

References aux_setup_multi_domain_interaction(), Dim, get_dim_helper(), i, and Use_bulk_element_as_external.

template<class ELEMENT_0 , class ELEMENT_1 >
void oomph::Multi_domain_functions::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. Use this for cases where first_mesh_pt and second_mesh_pt occupy the same physical space and are populated by ELEMENT_0 and ELEMENT_1 respectively, and are combined to solve a single problem. The elements in two meshes interact both ways the elements in each mesh act as "external elements" for the elements in the "other" mesh. The interaction indices allow the specification of which interaction we're setting up in the two meshes. They default to zero, which is appropriate if there's only a single interaction.

Set up the two-way multi-domain interactions for the problem pointed to by problem_pt. Use this for cases where first_mesh_pt and second_mesh_pt occupy the same physical space and are populated by ELEMENT_0 and ELEMENT_1 respectively, and are combined to solve a single problem. The elements in two meshes interact both ways the elements in each mesh act as "external elements" for the elements in the "other" mesh. The interaction indices allow the specification of which interaction we're setting up in the two meshes. They default to zero, which is appropriate if there's only a single interaction.

Definition at line 345 of file multi_domain.template.cc.

References oomph::Mesh::delete_all_external_storage().

Variable Documentation

bool oomph::Multi_domain_functions::Accept_failed_locate_zeta_in_setup_multi_domain_interaction =false

Boolean to indicate that failure in setup multi domain functions is acceptable; defaults to false. If set to true external element pointers are set to null for those elements for which external elements couldn't be located.

Definition at line 62 of file multi_domain.cc.

Referenced by aux_setup_multi_domain_interaction().

bool oomph::Multi_domain_functions::Allow_use_of_halo_elements_as_external_elements =true

Boolean to indicate if we're allowed to use halo elements as external elements. Can drastically reduce the number of external halo elements – currently not aware of any problems therefore set to true by default but retention of this flag allows easy return to previous implementation.

Definition at line 212 of file multi_domain.cc.

Referenced by locate_zeta_for_local_coordinates().

bool oomph::Multi_domain_functions::Allow_use_of_halo_elements_as_external_elements_for_projection =true

Indicate whether we are allowed to use halo elements as external elements for projection, possibly only required in parallel unstructured mesh generation during the projection stage. Default set to true.

Definition at line 224 of file multi_domain.cc.

Referenced by oomph::MeshAsGeomObject::my_spiraling_locate_zeta(), and oomph::MeshAsGeomObject::spiraling_locate_zeta().

bool oomph::Multi_domain_functions::Compute_extreme_bin_coordinates =true

Bool to tell the MeshAsGeomObject whether to calculate the extreme coordinates of the bin structure.

Definition at line 148 of file multi_domain.cc.

Referenced by aux_setup_multi_domain_interaction().

unsigned oomph::Multi_domain_functions::Counter_for_flat_packed_doubles
unsigned oomph::Multi_domain_functions::Counter_for_flat_packed_unsigneds
unsigned oomph::Multi_domain_functions::Dim

Dimension of zeta tuples (set by get_dim_helper) – needed because we store the scalar coordinates in flat-packed form.

Definition at line 66 of file multi_domain.cc.

Referenced by aux_setup_multi_domain_interaction(), oomph::HelmholtzDtNBoundaryElement< ELEMENT >::compute_gamma_contribution(), oomph::QSUPGAdvectionDiffusionElement< DIM, NNODE_1D >::dshape_and_dtest_eulerian_at_knot_adv_diff(), oomph::PolarNavierStokesTractionElement< ELEMENT >::fill_in_generic_residual_contribution(), oomph::AdvectionDiffusionFluxElement< ELEMENT >::fill_in_generic_residual_contribution_adv_diff_flux(), oomph::LinearisedAxisymPoroelasticBJS_FSIElement< FLUID_BULK_ELEMENT, POROELASTICITY_BULK_ELEMENT >::fill_in_generic_residual_contribution_axisym_poroelastic_fsi(), oomph::NavierStokesTractionElement< ELEMENT >::fill_in_generic_residual_contribution_fluid_traction(), oomph::LinearisedFSIAxisymmetricNStNoSlipBCElementElement< FLUID_BULK_ELEMENT, SOLID_BULK_ELEMENT >::fill_in_generic_residual_contribution_fsi_no_slip_axisym(), oomph::HelmholtzFluxElement< ELEMENT >::fill_in_generic_residual_contribution_helmholtz_flux(), oomph::PMLHelmholtzFluxElement< ELEMENT >::fill_in_generic_residual_contribution_helmholtz_flux(), oomph::FourierDecomposedHelmholtzFluxFromNormalDisplacementBCElement< HELMHOLTZ_BULK_ELEMENT, ELASTICITY_BULK_ELEMENT >::fill_in_generic_residual_contribution_helmholtz_flux_from_displacement(), oomph::HelmholtzFluxFromNormalDisplacementBCElement< HELMHOLTZ_BULK_ELEMENT, ELASTICITY_BULK_ELEMENT >::fill_in_generic_residual_contribution_helmholtz_flux_from_displacement(), oomph::PMLHelmholtzFluxFromNormalDisplacementBCElement< HELMHOLTZ_BULK_ELEMENT, ELASTICITY_BULK_ELEMENT >::fill_in_generic_residual_contribution_helmholtz_flux_from_displacement(), oomph::LinearWaveFluxElement< ELEMENT >::fill_in_generic_residual_contribution_lin_wave_flux(), oomph::PoissonFluxElement< ELEMENT >::fill_in_generic_residual_contribution_poisson_flux(), oomph::UnsteadyHeatFluxElement< ELEMENT >::fill_in_generic_residual_contribution_ust_heat_flux(), first_closer_than_second(), get_dim_helper(), oomph::PolarStressIntegralElement< ELEMENT >::get_shear_stress(), locate_zeta_for_local_coordinates(), locate_zeta_for_missing_coordinates(), oomph::StorableShapeElementBase::pre_compute_d2shape_local_at_knots(), oomph::StorableShapeElementBase::pre_compute_dshape_local_at_knots(), oomph::RefineableNavierStokesTractionElement< ELEMENT >::refineable_fill_in_generic_residual_contribution_fluid_traction(), send_and_receive_located_info(), setup_multi_domain_interaction(), and oomph::PVDEquationsWithPressure< DIM >::solid_pshape_at_knot().

std::ofstream oomph::Multi_domain_functions::Doc_boundary_coordinate_file

Output file to document the boundary coordinate along the mesh boundary of the bulk mesh during call to setup_bulk_elements_adjacent_to_face_mesh(...)

Definition at line 53 of file multi_domain.cc.

Referenced by setup_bulk_elements_adjacent_to_face_mesh().

bool oomph::Multi_domain_functions::Doc_full_stats =false

Boolean to indicate whether to output further info during setup_multi_domain_interaction() routines.

Boolean to indicate whether to document further info (to screen) during setup_multi_domain_interaction() routines.

Definition at line 235 of file multi_domain.cc.

Referenced by oomph::RefineableTriangleMesh< ELEMENT >::adapt().

bool oomph::Multi_domain_functions::Doc_stats =false

Boolean to indicate whether to output basic info during setup_multi_domain_interaction() routines.

Boolean to indicate whether to document basic info (to screen) during setup_multi_domain_interaction() routines.

Definition at line 231 of file multi_domain.cc.

Referenced by oomph::RefineableTriangleMesh< ELEMENT >::adapt(), oomph::MeshAsGeomObject::construct_it(), and oomph::MeshAsGeomObject::create_bins_of_objects().

bool oomph::Multi_domain_functions::Doc_timings =false

Boolean to indicate whether to doc timings or not.

Definition at line 227 of file multi_domain.cc.

Referenced by oomph::RefineableTriangleMesh< ELEMENT >::adapt().

Vector< Vector< unsigned > > oomph::Multi_domain_functions::External_element_located

Lookup scheme for whether a local element's integration point has had an external element assigned to it – essentially boolean. External_element_located[e][ipt] = {0,1} if external element for ipt-th integration in local element e {has not, has} been found. Used locally to ensure that we're not searching for the same elements over and over again when we go around the spirals.

Definition at line 74 of file multi_domain.cc.

Referenced by aux_setup_multi_domain_interaction(), clean_up(), create_external_halo_elements(), and locate_zeta_for_local_coordinates().

Vector< double > oomph::Multi_domain_functions::Flat_packed_doubles
Vector< double > oomph::Multi_domain_functions::Flat_packed_located_coordinates

Vector of flat-packed local coordinates for zeta tuples that have been located.

Definition at line 108 of file multi_domain.cc.

Referenced by clean_up(), create_external_halo_elements(), locate_zeta_for_missing_coordinates(), and send_and_receive_located_info().

Vector< unsigned > oomph::Multi_domain_functions::Flat_packed_unsigneds

Vector of flat-packed unsigneds to be communicated with other processors – this is really "private" data, declared here to avoid having to pass the array between the various helper functions.

Definition at line 124 of file multi_domain.cc.

Referenced by oomph::RefineableTriangleMesh< ELEMENT >::add_element_load_balance_helper(), add_external_halo_master_node_helper(), add_external_halo_node_helper(), add_external_haloed_master_node_helper(), add_external_haloed_node_helper(), oomph::RefineableTriangleMesh< ELEMENT >::add_halo_element_helper(), oomph::RefineableTriangleMesh< ELEMENT >::add_halo_node_helper(), oomph::RefineableTriangleMesh< ELEMENT >::add_haloed_node_helper(), oomph::RefineableTriangleMesh< ELEMENT >::add_node_load_balance_helper(), oomph::RefineableTriangleMesh< ELEMENT >::add_received_node_load_balance_helper(), clean_up(), construct_new_external_halo_master_node_helper(), construct_new_external_halo_node_helper(), oomph::RefineableTriangleMesh< ELEMENT >::construct_new_halo_node_helper(), oomph::RefineableTriangleMesh< ELEMENT >::construct_new_node_load_balance_helper(), oomph::RefineableTriangleMesh< ELEMENT >::create_element_load_balance_helper(), create_external_halo_elements(), oomph::RefineableTriangleMesh< ELEMENT >::create_halo_element(), oomph::RefineableTriangleMesh< ELEMENT >::get_required_elemental_information_helper(), oomph::RefineableTriangleMesh< ELEMENT >::get_required_elemental_information_load_balance_helper(), get_required_master_nodal_information_helper(), get_required_nodal_information_helper(), oomph::RefineableTriangleMesh< ELEMENT >::get_required_nodal_information_helper(), oomph::RefineableTriangleMesh< ELEMENT >::get_required_nodal_information_load_balance_helper(), oomph::RefineableTriangleMesh< ELEMENT >::load_balance(), locate_zeta_for_missing_coordinates(), recursively_add_masters_of_external_halo_node_to_storage(), recursively_add_masters_of_external_haloed_node(), oomph::RefineableTriangleMesh< ELEMENT >::reset_halo_haloed_scheme(), oomph::RefineableTriangleMesh< ELEMENT >::reset_halo_haloed_scheme_helper(), oomph::RefineableTriangleMesh< ELEMENT >::send_and_receive_elements_nodes_info(), and send_and_receive_located_info().

Vector< std::string > oomph::Multi_domain_functions::Flat_packed_unsigneds_string
Vector< double > oomph::Multi_domain_functions::Flat_packed_zetas_not_found_locally

Vector of flat-packed zeta coordinates for which the external element could not be found during current local search. These will be sent to the next processor in the ring-like parallel search. The zeta coordinates come in groups of Dim (scalar) coordinates.

Definition at line 80 of file multi_domain.cc.

Referenced by aux_setup_multi_domain_interaction(), clean_up(), locate_zeta_for_local_coordinates(), locate_zeta_for_missing_coordinates(), and send_and_receive_missing_zetas().

Vector< unsigned > oomph::Multi_domain_functions::Located_element_status

Vector to indicate (to another processor) whether a located element (that will have to represented as an external halo element on that processor) should be newly created on that processor (2), already exists on that processor (1), or is not on the current processor either (0).

Definition at line 104 of file multi_domain.cc.

Referenced by clean_up(), create_external_halo_elements(), locate_zeta_for_missing_coordinates(), and send_and_receive_located_info().

unsigned oomph::Multi_domain_functions::N_spiral_chunk =1

Number of spirals to be searched in one go.

Definition at line 163 of file multi_domain.cc.

Referenced by oomph::RefineableTriangleMesh< ELEMENT >::adapt(), and aux_setup_multi_domain_interaction().

unsigned oomph::Multi_domain_functions::Nsample_points =5

(Measure of) the number of sampling points within the elements when populating the bin

Definition at line 167 of file multi_domain.cc.

Referenced by aux_setup_multi_domain_interaction(), and oomph::MeshAsGeomObject::create_bins_of_objects().

unsigned oomph::Multi_domain_functions::Nx_bin =100
unsigned oomph::Multi_domain_functions::Ny_bin =100
unsigned oomph::Multi_domain_functions::Nz_bin =100

Number of bins in the third dimension in binning method in setup_multi_domain_interaction().

Definition at line 160 of file multi_domain.cc.

Referenced by aux_setup_multi_domain_interaction(), oomph::MeshAsGeomObject::construct_it(), and oomph::MeshAsGeomObject::create_bins_of_objects().

double oomph::Multi_domain_functions::Percentage_offset =5.0

Percentage offset to add to each extreme of the bin structure. Default value of 5 (note that this is in percent!)

Percentage offset to add to each extreme of the bin structure. Default value of 0.05.

Definition at line 196 of file multi_domain.cc.

Referenced by oomph::MeshAsGeomObject::construct_it(), oomph::MeshAsGeomObject::create_bins_of_objects(), and oomph::MeshAsGeomObject::get_min_and_max_coordinates().

Vector< int > oomph::Multi_domain_functions::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 which the i-th zeta coordinate tuple received from elsewhere (in the order in which these are stored in Received_flat_packed_zetas_to_be_found) was located; it's zero if it wasn't found during the current stage of the ring-like parallel search.

Definition at line 97 of file multi_domain.cc.

Referenced by clean_up(), create_external_halo_elements(), locate_zeta_for_missing_coordinates(), and send_and_receive_located_info().

Vector< double > oomph::Multi_domain_functions::Received_flat_packed_zetas_to_be_found

Vector of flat-packed zeta coordinates for which the external element could not be found on another processor and for which we're currently searching here. Whatever can't be found here, gets written into Flat_packed_zetas_not_found_locally and then passed on to the next processor during the ring-like parallel search. The zeta coordinates come in groups of Dim (scalar) coordinates.

Definition at line 88 of file multi_domain.cc.

Referenced by clean_up(), locate_zeta_for_missing_coordinates(), send_and_receive_located_info(), and send_and_receive_missing_zetas().

bool oomph::Multi_domain_functions::Setup_multi_domain_for_projection =false
bool oomph::Multi_domain_functions::Sort_bin_entries =false

Bool to decide if to sort entries in bin during locate_zeta operation (default: false)

Definition at line 2987 of file multi_domain.cc.

Referenced by aux_setup_multi_domain_interaction(), oomph::MeshAsGeomObject::my_spiraling_locate_zeta(), and oomph::MeshAsGeomObject::spiraling_locate_zeta().

double oomph::Multi_domain_functions::Total_time_for_sorting_elements_in_bins =0.0

The timing for sorting the elements in the bins.

The total time for sorting the elements in the bins.

Definition at line 215 of file multi_domain.cc.

Referenced by aux_setup_multi_domain_interaction().

bool oomph::Multi_domain_functions::Use_bulk_element_as_external =false

Boolean to indicate when to use the bulk element as the external element. Defaults to false, you must have set up FaceElements properly first in order for it to work.

Definition at line 205 of file multi_domain.cc.

Referenced by aux_setup_multi_domain_interaction(), locate_zeta_for_local_coordinates(), locate_zeta_for_missing_coordinates(), and setup_multi_domain_interaction().

double oomph::Multi_domain_functions::X_max =-1.0

Maximum coordinate in first dimension.

Definition at line 180 of file multi_domain.cc.

Referenced by oomph::MeshAsGeomObject::construct_it().

double oomph::Multi_domain_functions::X_min =1.0

Minimum and maximum coordinates for each dimension of the external mesh used to "create" the bins in setup_multi_domain_interaction(). These can be set by user if they want to (otherwise the MeshAsGeomObject calculates these values based upon the mesh itself; see MeshAsGeomObject::get_max_and_min_coords(...)) They default to "incorrect" values initially.

Minimum and maximum coordinates for each dimension of the bin structure used in MeshAsGeomObject::locate_zeta(...). These can be set by user if they know their mesh's extreme coordinates (or the MeshAsGeomObject calculates these values by default based upon the mesh itself; see MeshAsGeomObject::get_max_and_min_coords(...)) They default to "incorrect" values initially.

Minimum coordinate in first dimension

Definition at line 177 of file multi_domain.cc.

Referenced by oomph::MeshAsGeomObject::construct_it().

double oomph::Multi_domain_functions::Y_max =-1.0

Maximum coordinate in second dimension.

Definition at line 186 of file multi_domain.cc.

Referenced by oomph::MeshAsGeomObject::construct_it().

double oomph::Multi_domain_functions::Y_min =1.0

Minimum coordinate in second dimension.

Definition at line 183 of file multi_domain.cc.

Referenced by oomph::MeshAsGeomObject::construct_it().

double oomph::Multi_domain_functions::Z_max =-1.0

Maximum coordinate in third dimension.

Definition at line 192 of file multi_domain.cc.

Referenced by oomph::MeshAsGeomObject::construct_it().

double oomph::Multi_domain_functions::Z_min =1.0

Minimum coordinate in third dimension.

Definition at line 189 of file multi_domain.cc.

Referenced by oomph::MeshAsGeomObject::construct_it().

Vector< double > oomph::Multi_domain_functions::Zeta_coords_for_further_away_comparison

Vector of zeta coordinates that we're currently trying to locate; used in sorting of bin entries in further_away() comparison function.

Vector of zeta coordinates that we're currently trying to locate; used in sorting of bin entries in further_away() comparison function

Definition at line 2991 of file multi_domain.cc.

Referenced by first_closer_than_second().