multi_domain.h
Go to the documentation of this file.
1 // LIC// ====================================================================
2 // LIC// This file forms part of oomph-lib, the object-oriented,
3 // LIC// multi-physics finite-element library, available
4 // LIC// at http://www.oomph-lib.org.
5 // LIC//
6 // LIC// Copyright (C) 2006-2023 Matthias Heil and Andrew Hazel
7 // LIC//
8 // LIC// This library is free software; you can redistribute it and/or
9 // LIC// modify it under the terms of the GNU Lesser General Public
10 // LIC// License as published by the Free Software Foundation; either
11 // LIC// version 2.1 of the License, or (at your option) any later version.
12 // LIC//
13 // LIC// This library is distributed in the hope that it will be useful,
14 // LIC// but WITHOUT ANY WARRANTY; without even the implied warranty of
15 // LIC// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 // LIC// Lesser General Public License for more details.
17 // LIC//
18 // LIC// You should have received a copy of the GNU Lesser General Public
19 // LIC// License along with this library; if not, write to the Free Software
20 // LIC// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
21 // LIC// 02110-1301 USA.
22 // LIC//
23 // LIC// The authors may be contacted at oomph-lib@maths.man.ac.uk.
24 // LIC//
25 // LIC//====================================================================
26 // Header file for multi-domain functions, including the class
27 // ElementWithExternalElement which stores pointers to external elements
28 
29 // Temporary flag to enable full annotation of multi domain
30 // comms (but keep alive because it would be such a bloody pain to
31 // rewrite it if things ever go wrong again...)
32 //#define ANNOTATE_MULTI_DOMAIN_COMMUNICATION
33 
34 // Include guards to prevent multiple inclusion of the header
35 #ifndef OOMPH_MULTI_DOMAIN_HEADER
36 #define OOMPH_MULTI_DOMAIN_HEADER
37 
38 // Config header generated by autoconfig
39 #ifdef HAVE_CONFIG_H
40 #include <oomph-lib-config.h>
41 #endif
42 
43 // Oomph-lib headers
44 #include "geom_objects.h"
45 #include "problem.h"
46 #include "shape.h"
47 
48 #include "mesh.h"
50 #include "algebraic_elements.h"
52 #include "Qelements.h"
54 
55 
56 namespace oomph
57 {
58  //======================================================================
59  // Namespace for global multi-domain functions
60  //======================================================================
61  namespace Multi_domain_functions
62  {
63  /// Boolean to indicate that failure in setup multi domain
64  /// functions is acceptable; defaults to false. If set to true
65  /// external element pointers are set to null for those elements
66  /// for which external elements couldn't be located.
68 
69  /// Dimension of zeta tuples (set by get_dim_helper) -- needed
70  /// because we store the scalar coordinates in flat-packed form.
71  extern unsigned Dim;
72 
73  /// Lookup scheme for whether a local element's integration point
74  /// has had an external element assigned to it -- essentially boolean.
75  /// External_element_located[e][ipt] = {0,1} if external element
76  /// for ipt-th integration in local element e {has not, has} been found.
77  /// Used locally to ensure that we're not searching for the same
78  /// elements over and over again when we go around the spirals.
79  extern Vector<Vector<unsigned>> External_element_located;
80 
81  /// Vector of flat-packed zeta coordinates for which the external
82  /// element could not be found during current local search. These
83  /// will be sent to the next processor in the ring-like parallel search.
84  /// The zeta coordinates come in groups of Dim (scalar) coordinates.
85  extern Vector<double> Flat_packed_zetas_not_found_locally;
86 
87  /// Vector of flat-packed zeta coordinates for which the external
88  /// element could not be found on another processor and for which
89  /// we're currently searching here. Whatever can't be found here,
90  /// gets written into Flat_packed_zetas_not_found_locally and then
91  /// passed on to the next processor during the ring-like parallel search.
92  /// The zeta coordinates come in groups of Dim (scalar) coordinates.
93  extern Vector<double> Received_flat_packed_zetas_to_be_found;
94 
95  /// Proc_id_plus_one_of_external_element[i] contains the
96  /// processor id (plus one) of the processor
97  /// on which the i-th zeta coordinate tuple received from elsewhere
98  /// (in the order in which these are stored in
99  /// Received_flat_packed_zetas_to_be_found) was located; it's zero if
100  /// it wasn't found during the current stage of the ring-like parallel
101  /// search.
102  extern Vector<int> Proc_id_plus_one_of_external_element;
103 
104  /// Vector to indicate (to another processor) whether a
105  /// located element (that will have to represented as an external
106  /// halo element on that processor) should be newly created on that
107  /// processor (2), already exists on that processor (1), or
108  /// is not on the current processor either (0).
109  extern Vector<unsigned> Located_element_status;
110 
111  /// Vector of flat-packed local coordinates for zeta tuples
112  /// that have been located
113  extern Vector<double> Flat_packed_located_coordinates;
114 
115  /// Vector of flat-packed doubles to be communicated with
116  /// other processors
117  extern Vector<double> Flat_packed_doubles;
118 
119  /// Counter used when processing vector of flat-packed
120  /// doubles -- this is really "private" data, declared here
121  /// to avoid having to pass it (and the associated array)
122  /// between the various helper functions
123  extern unsigned Counter_for_flat_packed_doubles;
124 
125  /// Vector of flat-packed unsigneds to be communicated with
126  /// other processors -- this is really "private" data, declared here
127  /// to avoid having to pass the array between the various helper
128  /// functions
129  extern Vector<unsigned> Flat_packed_unsigneds;
130 
131 #ifdef ANNOTATE_MULTI_DOMAIN_COMMUNICATION
132 
133  // Temporary vector of strings to enable full annotation of multi domain
134  // comms (but keep alive because it would be such a bloody pain to
135  // rewrite it if things ever go wrong again...)
136  extern Vector<std::string> Flat_packed_unsigneds_string;
137 
138 #endif
139 
140  /// Counter used when processing vector of flat-packed
141  /// unsigneds -- this is really "private" data, declared here
142  /// to avoid having to pass it (and the associated array)
143  /// between the various helper functions
144  extern unsigned Counter_for_flat_packed_unsigneds;
145 
146  /// Enumerators for element status in location procedure
147  enum
148  {
151  Not_found
152  };
153 
154  /// Boolean to indicate when to use the bulk element as the
155  /// external element. Defaults to false, you must have set up FaceElements
156  /// properly first in order for it to work
157  extern bool Use_bulk_element_as_external;
158 
159  /// Boolean to indicate if we're allowed to use halo elements
160  /// as external elements. Can drastically reduce the number of
161  /// external halo elements -- currently not aware of any problems
162  /// therefore set to true by default but retention
163  /// of this flag allows easy return to previous implementation.
165 
166  /// Indicate whether we are allowed to use halo elements as
167  /// external elements for projection, possibly only required in
168  /// parallel unstructured mesh generation during the projection
169  /// stage. Default set to true
171 
172  /// Boolean to indicate whether to doc timings or not.
173  extern bool Doc_timings;
174 
175  /// Boolean to indicate whether to document basic info (to screen)
176  /// during setup_multi_domain_interaction() routines
177  extern bool Doc_stats;
178 
179  /// Boolean to indicate whether to document further info (to screen)
180  /// during setup_multi_domain_interaction() routines
181  extern bool Doc_full_stats;
182 
183  /// Output file to document the boundary coordinate
184  /// along the mesh boundary of the bulk mesh during call to
185  /// setup_bulk_elements_adjacent_to_face_mesh(...)
186  extern std::ofstream Doc_boundary_coordinate_file;
187 
188 
189  // Functions for multi-domain method
190 
191  /// Identify the \c FaceElements (stored in the mesh pointed to by
192  /// \c face_mesh_pt) that are adjacent to the bulk elements next to the
193  /// \c boundary_in_bulk_mesh -th boundary of the mesh pointed to by
194  /// \c bulk_mesh_pt. The \c FaceElements must be derived
195  /// from the \c ElementWithExternalElement base class and the adjacent
196  /// bulk elements are stored as their external elements.
197  ///
198  /// This is the vector-based version which deals with multiple bulk
199  /// mesh boundaries at the same time.
200  template<class BULK_ELEMENT, unsigned DIM>
202  Problem* problem_pt,
203  Vector<unsigned>& boundary_in_bulk_mesh,
204  Mesh* const& bulk_mesh_pt,
205  Vector<Mesh*>& face_mesh_pt,
206  const unsigned& interaction = 0);
207 
208 
209  /// Identify the \c FaceElements (stored in the mesh pointed to by
210  /// \c face_mesh_pt) that are adjacent to the bulk elements next to the
211  /// \c boundary_in_bulk_mesh -th boundary of the mesh pointed to by
212  /// \c bulk_mesh_pt. The \c FaceElements must be derived
213  /// from the \c ElementWithExternalElement base class and the adjacent
214  /// bulk elements are stored as their external elements.
215  template<class BULK_ELEMENT, unsigned DIM>
217  Problem* problem_pt,
218  const unsigned& boundary_in_bulk_mesh,
219  Mesh* const& bulk_mesh_pt,
220  Mesh* const& face_mesh_pt,
221  const unsigned& interaction = 0);
222 
223  /// Set up the two-way multi-domain interactions for the
224  /// problem pointed to by \c problem_pt.
225  /// Use this for cases where first_mesh_pt and second_mesh_pt
226  /// occupy the same physical space and are populated by
227  /// ELEMENT_0 and ELEMENT_1 respectively, and are combined to solve
228  /// a single problem. The elements in two meshes interact both ways
229  /// the elements in each mesh act as "external elements" for the
230  /// elements in the "other" mesh. The interaction indices allow the
231  /// specification of which interaction we're setting up in the two
232  /// meshes. They default to zero, which is appropriate if there's
233  /// only a single interaction.
234  template<class ELEMENT_0, class ELEMENT_1>
236  Problem* problem_pt,
237  Mesh* const& first_mesh_pt,
238  Mesh* const& second_mesh_pt,
239  const unsigned& first_interaction = 0,
240  const unsigned& second_interaction = 0);
241 
242  /// Function to set up the one-way multi-domain interaction for
243  /// problems where the meshes pointed to by \c mesh_pt and \c
244  /// external_mesh_pt occupy the same physical space, and the elements in \c
245  /// external_mesh_pt act as "external elements" for the \c
246  /// ElementWithExternalElements in \c mesh_pt (but not vice versa):
247  /// - \c mesh_pt points to the mesh of ElemenWithExternalElements for which
248  /// the interaction is set up.
249  /// - \c external_mesh_pt points to the mesh that contains the elements
250  /// of type EXT_ELEMENT that act as "external elements" for the
251  /// \c ElementWithExternalElements in \ mesh_pt.
252  /// - The interaction_index parameter defaults to zero and must be otherwise
253  /// set by the user if there is more than one mesh that provides sources
254  /// for the Mesh pointed to by mesh_pt.
255  template<class EXT_ELEMENT>
256  void setup_multi_domain_interaction(Problem* problem_pt,
257  Mesh* const& mesh_pt,
258  Mesh* const& external_mesh_pt,
259  const unsigned& interaction_index = 0);
260 
261  /// Function to set up the one-way multi-domain interaction for
262  /// FSI-like problems.
263  /// - \c mesh_pt points to the mesh of \c ElemenWithExternalElements for
264  /// which
265  /// the interaction is set up. In an FSI example, this mesh would contain
266  /// the \c FSIWallElements (either beam/shell elements or the
267  /// \c FSISolidTractionElements that apply the traction to
268  /// a "bulk" solid mesh that is loaded by the fluid.)
269  /// - \c external_mesh_pt points to the mesh that contains the elements
270  /// of type EXT_ELEMENT that provide the "source" for the
271  /// \c ElementWithExternalElements. In an FSI example, this
272  /// mesh would contain the "bulk" fluid elements.
273  /// - \c external_face_mesh_pt points to the mesh of \c FaceElements
274  /// attached to the \c external_mesh_pt. The mesh pointed to by
275  /// \c external_face_mesh_pt has the same dimension as \c mesh_pt.
276  /// The elements contained in \c external_face_mesh_pt are of type
277  /// FACE_ELEMENT_GEOM_OBJECT. In an FSI example, these elements
278  /// are usually the \c FaceElementAsGeomObjects (templated by the
279  /// type of the "bulk" fluid elements to which they are attached)
280  /// that define the FSI boundary of the fluid domain.
281  /// - The interaction_index parameter defaults to zero and must otherwise be
282  /// set by the user if there is more than one mesh that provides "external
283  /// elements" for the Mesh pointed to by mesh_pt (e.g. in the case
284  /// when a beam or shell structure is loaded by fluid from both sides.)
285  template<class EXT_ELEMENT, class FACE_ELEMENT_GEOM_OBJECT>
286  void setup_multi_domain_interaction(Problem* problem_pt,
287  Mesh* const& mesh_pt,
288  Mesh* const& external_mesh_pt,
289  Mesh* const& external_face_mesh_pt,
290  const unsigned& interaction_index = 0);
291 
292 
293  /// Function to set up the one-way multi-domain interaction for
294  /// FSI-like problems.
295  /// - \c mesh_pt points to the mesh of \c ElemenWithExternalElements for
296  /// which
297  /// the interaction is set up. In an FSI example, this mesh would contain
298  /// the \c FSIWallElements (either beam/shell elements or the
299  /// \c FSISolidTractionElements that apply the traction to
300  /// a "bulk" solid mesh that is loaded by the fluid.)
301  /// - \c external_mesh_pt points to the mesh that contains the elements
302  /// of type EXT_ELEMENT that provide the "source" for the
303  /// \c ElementWithExternalElements. In an FSI example, this
304  /// mesh would contain the "bulk" fluid elements.
305  /// - \c external_face_mesh_pt points to the mesh of \c FaceElements
306  /// attached to the \c external_mesh_pt. The mesh pointed to by
307  /// \c external_face_mesh_pt has the same dimension as \c mesh_pt.
308  /// The elements contained in \c external_face_mesh_pt are of type
309  /// FACE_ELEMENT_GEOM_OBJECT. In an FSI example, these elements
310  /// are usually the \c FaceElementAsGeomObjects (templated by the
311  /// type of the "bulk" fluid elements to which they are attached)
312  /// that define the FSI boundary of the fluid domain.
313  /// - The interaction_index parameter defaults to zero and must otherwise be
314  /// set by the user if there is more than one mesh that provides "external
315  /// elements" for the Mesh pointed to by mesh_pt (e.g. in the case
316  /// when a beam or shell structure is loaded by fluid from both sides.)
317  /// .
318  /// This is the vector-based version which operates simultaneously
319  /// on the meshes contained in the Vector arguments.
320  template<class EXT_ELEMENT, class FACE_ELEMENT_GEOM_OBJECT>
322  Problem* problem_pt,
323  const Vector<Mesh*>& mesh_pt,
324  Mesh* const& external_mesh_pt,
325  const Vector<Mesh*>& external_face_mesh_pt,
326  const unsigned& interaction_index = 0);
327 
328 
329  /// Auxiliary helper function
330  template<class EXT_ELEMENT, class GEOM_OBJECT>
332  Problem* problem_pt,
333  Mesh* const& mesh_pt,
334  Mesh* const& external_mesh_pt,
335  const unsigned& interaction_index,
336  Mesh* const& external_face_mesh_pt = 0);
337 
338  /// Auxiliary helper function
339  template<class EXT_ELEMENT, class GEOM_OBJECT>
341  Problem* problem_pt,
342  const Vector<Mesh*>& mesh_pt,
343  Mesh* const& external_mesh_pt,
344  const unsigned& interaction_index,
345  const Vector<Mesh*>& external_face_mesh_pt);
346 
347  /// Helper function to locate "local" zeta coordinates
348  /// This is the vector-based version which operates simultaenously
349  /// on the meshes contained in the Vectors.
351  const Vector<Mesh*>& mesh_pt,
352  Mesh* const& external_mesh_pt,
353  Vector<MeshAsGeomObject*>& mesh_geom_obj_pt,
354  const unsigned& interaction_index);
355 
356 
357 #ifdef OOMPH_HAS_MPI
358 
359  /// Helper function to send any "missing" zeta coordinates to
360  /// the next process and receive any coordinates from previous process
361  void send_and_receive_missing_zetas(Problem* problem_pt);
362 
363  /// Helper function to locate these "missing" zeta coordinates.
364  /// This is the vector-based function which operates simultaneously
365  /// on the meshes contained in the vectors.
367  int& iproc,
368  Mesh* const& external_mesh_pt,
369  Problem* problem_pt,
370  Vector<MeshAsGeomObject*>& mesh_geom_obj_pt);
371 
372 
373  /// Helper function to send back any located information
374  void send_and_receive_located_info(int& iproc,
375  Mesh* const& external_mesh_pt,
376  Problem* problem_pt);
377 
378  /// Create external (halo) elements on the loop process based on the
379  /// information received from each locate_zeta call on other processes
380  /// This is the vector-based function which operates simultaneously
381  /// on the meshes contained in the vectors.
382  template<class EXT_ELEMENT>
383  void create_external_halo_elements(int& iproc,
384  const Vector<Mesh*>& mesh_pt,
385  Mesh* const& external_mesh_pt,
386  Problem* problem_pt,
387  const unsigned& interaction_index);
388 
389  // Helper functions for external haloed node identification
390 
391  /// Helper function to add external haloed nodes, inc. masters
392  /// of external haloed nodes
393  void add_external_haloed_node_to_storage(int& iproc,
394  Node* nod_pt,
395  Problem* problem_pt,
396  Mesh* const& external_mesh_pt,
397  int& n_cont_inter_values);
398 
399 
400  /// Recursively add any master nodes (and their master nodes etc)
401  /// of external haloed nodes
403  int& iproc,
404  Node* nod_pt,
405  Problem* problem_pt,
406  Mesh* const& external_mesh_pt,
407  int& n_cont_inter_values);
408 
409 
410  /// Helper function to add external haloed node that is not a master
411  void add_external_haloed_node_helper(int& iproc,
412  Node* nod_pt,
413  Problem* problem_pt,
414  Mesh* const& external_mesh_pt,
415  int& n_cont_inter_values);
416 
417  /// Helper function to add external haloed node that is a master
419  Node* master_nod_pt,
420  Problem* problem_pt,
421  Mesh* const& external_mesh_pt,
422  int& n_cont_inter_values);
423 
424  /// Helper function to get the required nodal information from an
425  /// external haloed node so that a fully-functional external halo
426  /// node (and therefore element) can be created on the receiving process
428  Node* nod_pt,
429  Problem* problem_pt,
430  Mesh* const& external_mesh_pt,
431  int& n_cont_inter_values);
432 
433  /// Helper function to get the required master nodal information from
434  /// an external haloed master node so that a fully-functional external halo
435  /// master node (and possible element) can be created on the receiving proc
437  int& iproc,
438  Node* master_nod_pt,
439  Problem* problem_pt,
440  Mesh* const& external_mesh_pt,
441  int& n_cont_inter_values);
442 
443  // Helper functions for external halo node identification
444 
445  /// Helper function to add external halo nodes, including any
446  /// masters, based on information received from the haloed process
447  template<class EXT_ELEMENT>
448  void add_external_halo_node_to_storage(Node*& new_nod_pt,
449  Mesh* const& external_mesh_pt,
450  unsigned& loc_p,
451  unsigned& node_index,
452  FiniteElement* const& new_el_pt,
453  int& n_cont_inter_values,
454  Problem* problem_pt);
455 
456  /// Recursively add masters of external halo nodes (and their
457  /// masters, etc) based on information received from the haloed process
458  template<class EXT_ELEMENT>
460  Node*& new_nod_pt,
461  Mesh* const& external_mesh_pt,
462  unsigned& loc_p,
463  unsigned& node_index,
464  FiniteElement* const& new_el_pt,
465  int& n_cont_inter_values,
466  Problem* problem_pt);
467 
468 
469  /// Helper function to add external halo node that is not a master
470  void add_external_halo_node_helper(Node*& new_nod_pt,
471  Mesh* const& external_mesh_pt,
472  unsigned& loc_p,
473  unsigned& node_index,
474  FiniteElement* const& new_el_pt,
475  int& n_cont_inter_values,
476  Problem* problem_pt);
477 
478  /// Helper function to add external halo node that is a master
479  template<class EXT_ELEMENT>
480  void add_external_halo_master_node_helper(Node*& new_master_nod_pt,
481  Node*& new_nod_pt,
482  Mesh* const& external_mesh_pt,
483  unsigned& loc_p,
484  int& n_cont_inter_values,
485  Problem* problem_pt);
486 
487 
488  /// Helper function which constructs a new external halo node
489  /// (on an element) with the information sent from the haloed process
491  Node*& new_nod_pt,
492  unsigned& loc_p,
493  unsigned& node_index,
494  FiniteElement* const& new_el_pt,
495  Mesh* const& external_mesh_pt,
496  Problem* problem_pt);
497 
498  /// Helper function which constructs a new external halo master node
499  /// with the information sent from the haloed process
500  template<class EXT_ELEMENT>
502  Node*& new_master_nod_pt,
503  Node*& nod_pt,
504  unsigned& loc_p,
505  Mesh* const& external_mesh_pt,
506  Problem* problem_pt);
507 
508 #endif
509 
510  /// Helper function that computes the dimension of the elements
511  /// within each of the specified meshes (and checks they are the same)
512  /// Stores result in Dim.
513  void get_dim_helper(Problem* problem_pt,
514  Mesh* const& mesh_pt,
515  Mesh* const& external_mesh_pt);
516 
517  /// Helper function that clears all the intermediate information used
518  /// during the external storage creation at the end of the procedure
519  void clean_up();
520 
521  } // namespace Multi_domain_functions
522 
523 
524 } // namespace oomph
525 
526 #endif
A general Finite Element class.
Definition: elements.h:1313
A general mesh class.
Definition: mesh.h:67
Nodes are derived from Data, but, in addition, have a definite (Eulerian) position in a space of a gi...
Definition: nodes.h:906
////////////////////////////////////////////////////////////////// //////////////////////////////////...
Definition: problem.h:151
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...
Definition: multi_domain.cc:91
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...
Definition: multi_domain.cc:68
unsigned Dim
Dimension of zeta tuples (set by get_dim_helper) – needed because we store the scalar coordinates in ...
Definition: multi_domain.cc:60
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 ...
Definition: multi_domain.cc:47
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...
Definition: multi_domain.cc:74
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...
Definition: multi_domain.cc:82
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...
Definition: multi_domain.cc:98
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....
Definition: multi_domain.cc:56
//////////////////////////////////////////////////////////////////// ////////////////////////////////...