Public Types | Public Member Functions | Public Attributes | Static Public Attributes | Protected Member Functions | Protected Attributes | Friends | List of all members
oomph::Mesh Class Reference

A general mesh class. More...

#include <mesh.h>

+ Inheritance diagram for oomph::Mesh:

Public Types

typedef void(FiniteElement::* SteadyExactSolutionFctPt )(const Vector< double > &x, Vector< double > &soln)
 Typedef for function pointer to function that computes steady exact solution. More...
 
typedef void(FiniteElement::* UnsteadyExactSolutionFctPt )(const double &time, const Vector< double > &x, Vector< double > &soln)
 Typedef for function pointer to function that computes unsteady exact solution. More...
 

Public Member Functions

void resize_halo_nodes ()
 Helper function that resizes halo nodes to the same size as their non-halo counterparts if required. (A discrepancy can arise if a FaceElement that introduces additional unknowns are attached to a bulk element that shares a node with a haloed element. In that case the joint node between haloed and non-haloed element is resized on that processor but not on the one that holds the halo counterpart (because no FaceElement is attached to the halo element) More...
 
 Mesh ()
 Default constructor. More...
 
 Mesh (const Vector< Mesh * > &sub_mesh_pt)
 Constructor builds combined mesh from the meshes specified. Note: This simply merges the meshes' elements and nodes (ignoring duplicates; no boundary information etc. is created). More...
 
void merge_meshes (const Vector< Mesh * > &sub_mesh_pt)
 Merge meshes. Note: This simply merges the meshes' elements and nodes (ignoring duplicates; no boundary information etc. is created). More...
 
virtual void setup_boundary_element_info ()
 Interface for function that is used to setup the boundary information (Empty virtual function – implement this for specific Mesh classes) More...
 
virtual void setup_boundary_element_info (std::ostream &outfile)
 Setup lookup schemes which establish whic elements are located next to mesh's boundaries. Doc in outfile (if it's open). (Empty virtual function – implement this for specific Mesh classes) More...
 
virtual void reset_boundary_element_info (Vector< unsigned > &ntmp_boundary_elements, Vector< Vector< unsigned > > &ntmp_boundary_elements_in_region, Vector< FiniteElement * > &deleted_elements)
 Virtual function to perform the reset boundary elements info rutines. More...
 
template<class BULK_ELEMENT >
void doc_boundary_coordinates (const unsigned &b, std::ofstream &the_file)
 Output boundary coordinates on boundary b – template argument specifies the bulk element type (needed to create FaceElement of appropriate type on mesh boundary). More...
 
virtual void scale_mesh (const double &factor)
 Scale all nodal coordinates by given factor. Virtual so it can be overloaded in SolidMesh class where it also re-assigns the Lagrangian coordinates. More...
 
 Mesh (const Mesh &dummy)
 Broken copy constructor. More...
 
void operator= (const Mesh &)
 Broken assignment operator. More...
 
virtual ~Mesh ()
 Virtual Destructor to clean up all memory. More...
 
void flush_element_and_node_storage ()
 Flush storage for elements and nodes by emptying the vectors that store the pointers to them. This is useful if a particular mesh is only built to generate a small part of a bigger mesh. Once the elements and nodes have been created, they are typically copied into the new mesh and the auxiliary mesh can be deleted. However, if we simply call the destructor of the auxiliary mesh, it will also wipe out the nodes and elements, because it still "thinks" it's in charge of these... More...
 
void flush_element_storage ()
 Flush storage for elements (only) by emptying the vectors that store the pointers to them. This is useful if a particular mesh is only built to generate a small part of a bigger mesh. Once the elements and nodes have been created, they are typically copied into the new mesh and the auxiliary mesh can be deleted. However, if we simply call the destructor of the auxiliary mesh, it will also wipe out the nodes and elements, because it still "thinks" it's in charge of these... More...
 
void flush_node_storage ()
 Flush storage for nodes (only) by emptying the vectors that store the pointers to them. More...
 
Node *& node_pt (const unsigned long &n)
 Return pointer to global node n. More...
 
Nodenode_pt (const unsigned long &n) const
 Return pointer to global node n (const version) More...
 
GeneralisedElement *& element_pt (const unsigned long &e)
 Return pointer to element e. More...
 
GeneralisedElementelement_pt (const unsigned long &e) const
 Return pointer to element e (const version) More...
 
const Vector
< GeneralisedElement * > & 
element_pt () const
 Return reference to the Vector of elements. More...
 
Vector< GeneralisedElement * > & element_pt ()
 Return reference to the Vector of elements. More...
 
FiniteElementfinite_element_pt (const unsigned &e) const
 Upcast (downcast?) to FiniteElement (needed to access FiniteElement member functions). More...
 
Node *& boundary_node_pt (const unsigned &b, const unsigned &n)
 Return pointer to node n on boundary b. More...
 
Nodeboundary_node_pt (const unsigned &b, const unsigned &n) const
 Return pointer to node n on boundary b. More...
 
void set_nboundary (const unsigned &nbound)
 Set the number of boundaries in the mesh. More...
 
void remove_boundary_nodes ()
 Clear all pointers to boundary nodes. More...
 
void remove_boundary_nodes (const unsigned &b)
 Remove all information about nodes stored on the b-th boundary of the mesh. More...
 
void remove_boundary_node (const unsigned &b, Node *const &node_pt)
 
void add_boundary_node (const unsigned &b, Node *const &node_pt)
 Add a (pointer to) a node to the b-th boundary. More...
 
void copy_boundary_node_data_from_nodes ()
 
bool boundary_coordinate_exists (const unsigned &i) const
 Indicate whether the i-th boundary has an intrinsic coordinate. More...
 
unsigned long nelement () const
 Return number of elements in the mesh. More...
 
unsigned long nnode () const
 Return number of nodes in the mesh. More...
 
unsigned ndof_types () const
 Return number of dof types in mesh. More...
 
unsigned elemental_dimension () const
 Return number of elemental dimension in mesh. More...
 
unsigned nodal_dimension () const
 Return number of nodal dimension in mesh. More...
 
void add_node_pt (Node *const &node_pt)
 Add a (pointer to a) node to the mesh. More...
 
void add_element_pt (GeneralisedElement *const &element_pt)
 Add a (pointer to) an element to the mesh. More...
 
virtual void node_update (const bool &update_all_solid_nodes=false)
 Update nodal positions in response to changes in the domain shape. Uses the FiniteElement::get_x(...) function for FiniteElements and doesn't do anything for other element types. If a MacroElement pointer has been set for a FiniteElement, the MacroElement representation is used to update the nodal positions; if not get_x(...) uses the FE interpolation and thus leaves the nodal positions unchanged. Virtual, so it can be overloaded by specific meshes, such as AlgebraicMeshes or SpineMeshes. Generally, this function updates the position of all nodes in response to changes in the boundary position. However, we ignore all SolidNodes since their position is computed as part of the solution – unless the bool flag is set to true. Such calls are typically made when the initial mesh is created and/or after a mesh has been refined repeatedly before the start of the computation. More...
 
virtual void reorder_nodes (const bool &use_old_ordering=true)
 Re-order nodes in the order in which they appear in elements – can be overloaded for more efficient re-ordering. More...
 
virtual void get_node_reordering (Vector< Node * > &reordering, const bool &use_old_ordering=true) const
 Get a reordering of the nodes in the order in which they appear in elements – can be overloaded for more efficient re-ordering. More...
 
template<class BULK_ELEMENT , template< class > class FACE_ELEMENT>
void build_face_mesh (const unsigned &b, Mesh *const &face_mesh_pt)
 Constuct a Mesh of FACE_ELEMENTs along the b-th boundary of the mesh (which contains elements of type BULK_ELEMENT) More...
 
unsigned self_test ()
 Self-test: Check elements and nodes. Return 0 for OK. More...
 
void max_and_min_element_size (double &max_size, double &min_size)
 Determine max and min area for all FiniteElements in the mesh (non-FiniteElements are ignored) More...
 
double total_size ()
 Determine the sum of all "sizes" of the FiniteElements in the mesh (non-FiniteElements are ignored). This gives the length/area/volume occupied by the mesh. More...
 
void check_inverted_elements (bool &mesh_has_inverted_elements, std::ofstream &inverted_element_file)
 Check for inverted elements and report outcome in boolean variable. This visits all elements at their integration points and checks if the Jacobian of the mapping between local and global coordinates is positive – using the same test that would be carried out (but only in PARANOID mode) during the assembly of the elements' Jacobian matrices. Inverted elements are output in inverted_element_file (if the stream is open). More...
 
void check_inverted_elements (bool &mesh_has_inverted_elements)
 Check for inverted elements and report outcome. More...
 
unsigned check_for_repeated_nodes (const double &epsilon=1.0e-12)
 Check for repeated nodes within a given spatial tolerance. Return (0/1) for (pass/fail). More...
 
Vector< Node * > prune_dead_nodes ()
 Prune nodes. Nodes that have been marked as obsolete are removed from the mesh (and its boundary-node scheme). Returns vector of pointers to deleted nodes. More...
 
unsigned nboundary () const
 Return number of boundaries. More...
 
unsigned long nboundary_node (const unsigned &ibound) const
 Return number of nodes on a particular boundary. More...
 
FiniteElementboundary_element_pt (const unsigned &b, const unsigned &e) const
 Return pointer to e-th finite element on boundary b. More...
 
Nodeget_some_non_boundary_node () const
 Find a node not on any boundary in mesh_pt (useful for pinning a single node in a purely Neumann problem so that it is fully determined). More...
 
unsigned nboundary_element (const unsigned &b) const
 Return number of finite elements that are adjacent to boundary b. More...
 
int face_index_at_boundary (const unsigned &b, const unsigned &e) const
 For the e-th finite element on boundary b, return int to indicate the face_index of the face adjacent to the boundary. This is consistent with input required during the generation of FaceElements. More...
 
virtual void dump (std::ofstream &dump_file, const bool &use_old_ordering=true) const
 Dump the data in the mesh into a file for restart. More...
 
void dump (const std::string &dump_file_name, const bool &use_old_ordering=true) const
 Dump the data in the mesh into a file for restart. More...
 
virtual void read (std::ifstream &restart_file)
 Read solution from restart file. More...
 
void output_paraview (std::ofstream &file_out, const unsigned &nplot) const
 Output in paraview format into specified file. Breaks up each element into sub-elements for plotting purposes. We assume that all elements are of the same type (fct will break break (in paranoid mode) if paraview output fcts of the elements are inconsistent). More...
 
void output_fct_paraview (std::ofstream &file_out, const unsigned &nplot, FiniteElement::SteadyExactSolutionFctPt exact_soln_pt) const
 Output in paraview format into specified file. Breaks up each element into sub-elements for plotting purposes. We assume that all elements are of the same type (fct will break break (in paranoid mode) if paraview output fcts of the elements are inconsistent). More...
 
void output (std::ostream &outfile)
 Output for all elements. More...
 
void output (std::ostream &outfile, const unsigned &n_plot)
 Output at f(n_plot) points in each element. More...
 
void output (FILE *file_pt)
 Output for all elements (C-style output) More...
 
void output (FILE *file_pt, const unsigned &nplot)
 Output at f(n_plot) points in each element (C-style output) More...
 
void output (const std::string &output_filename)
 Output for all elements. More...
 
void output (const std::string &output_filename, const unsigned &n_plot)
 Output at f(n_plot) points in each element. More...
 
void output_fct (std::ostream &outfile, const unsigned &n_plot, FiniteElement::SteadyExactSolutionFctPt)
 Output a given Vector function at f(n_plot) points in each element. More...
 
void output_fct (std::ostream &outfile, const unsigned &n_plot, const double &time, FiniteElement::UnsteadyExactSolutionFctPt)
 Output a given time-dep. Vector function at f(n_plot) points in each element. More...
 
void output_boundaries (std::ostream &outfile)
 Output the nodes on the boundaries (into separate tecplot zones) More...
 
void output_boundaries (const std::string &output_filename)
 
virtual void output_boundary_coordinates (const unsigned &b, std::ostream &outfile)
 
void output_boundary_coordinates (const unsigned &b, const std::string &output_filename)
 
void output_boundaries_coordinates (std::ostream &outfile)
 
void output_boundaries_coordinates (const std::string &output_filename)
 
void assign_initial_values_impulsive ()
 Assign initial values for an impulsive start. More...
 
void shift_time_values ()
 Shift time-dependent data along for next timestep: Deal with nodal Data/positions and the element's internal Data. More...
 
void calculate_predictions ()
 Calculate predictions for all Data and positions associated with the mesh, usually used in adaptive time-stepping. More...
 
void set_nodal_and_elemental_time_stepper (TimeStepper *const &time_stepper_pt, const bool &preserve_existing_data)
 Set the timestepper associated with all nodal and elemental data stored in the mesh. More...
 
virtual void set_mesh_level_time_stepper (TimeStepper *const &time_stepper_pt, const bool &preserve_existing_data)
 Function that can be used to set any additional timestepper data stored at the Mesh (as opposed to nodal and elemental) levels. This is virtual so that it can be overloaded in the appropriate Meshes. Examples include the SpineMeshes and adaptive triangle and tet meshes. More...
 
void set_consistent_pinned_values_for_continuation (ContinuationStorageScheme *const &continuation_stepper_pt)
 Set consistent values for pinned data in continuation. More...
 
bool does_pointer_correspond_to_mesh_data (double *const &parameter_pt)
 Does the double pointer correspond to any mesh data. More...
 
void set_nodal_time_stepper (TimeStepper *const &time_stepper_pt, const bool &preserve_existing_data)
 Set the timestepper associated with the nodal data in the mesh. More...
 
void set_elemental_internal_time_stepper (TimeStepper *const &time_stepper_pt, const bool &preserve_existing_data)
 Set the timestepper associated with the internal data stored within elements in the meah. More...
 
virtual void compute_norm (double &norm)
 Compute norm of solution by summing contributions of compute_norm(...) for all constituent elements in the mesh. What that norm means depends on what's defined in the element's function; may need to take the square root afterwards if the elements compute the square of the L2 norm, say. More...
 
virtual void compute_error (std::ostream &outfile, FiniteElement::UnsteadyExactSolutionFctPt exact_soln_pt, const double &time, double &error, double &norm)
 Plot error when compared against a given exact solution. Also returns the norm of the error and that of the exact solution. More...
 
virtual void compute_error (std::ostream &outfile, FiniteElement::SteadyExactSolutionFctPt exact_soln_pt, double &error, double &norm)
 Plot error when compared against a given time-depdendent exact solution. Also returns the norm of the error and that of the exact solution. More...
 
virtual void compute_error (std::ostream &outfile, FiniteElement::UnsteadyExactSolutionFctPt exact_soln_pt, const double &time, Vector< double > &error, Vector< double > &norm)
 Plot error when compared against a given time-depdendent exact solution. Also returns the norm of the error and that of the exact solution. Version with vectors of norms and errors so that different variables' norms and errors can be returned individually. More...
 
virtual void compute_error (std::ostream &outfile, FiniteElement::SteadyExactSolutionFctPt exact_soln_pt, Vector< double > &error, Vector< double > &norm)
 Plot error when compared against a given time-depdendent exact solution. Also returns the norm of the error and that of the exact solution. Version with vectors of norms and errors so that different variables' norms and errors can be returned individually. More...
 
bool is_mesh_distributed () const
 Boolean to indicate if Mesh has been distributed. More...
 
OomphCommunicatorcommunicator_pt () const
 
void set_communicator_pt (OomphCommunicator *comm_pt)
 
void set_keep_all_elements_as_halos ()
 Call this function to keep all the elements as halo elements. More...
 
void unset_keep_all_elements_as_halos ()
 Calll this function to unset the flag that keeps all elements in the mesh as halo elements. More...
 
virtual void distribute (OomphCommunicator *comm_pt, const Vector< unsigned > &element_domain, Vector< GeneralisedElement * > &deleted_element_pt, DocInfo &doc_info, const bool &report_stats, const bool &overrule_keep_as_halo_element_status)
 Distribute the problem and doc; make this virtual to allow overloading for particular meshes where further work is required. Add to vector of pointers to deleted elements. More...
 
void distribute (OomphCommunicator *comm_pt, const Vector< unsigned > &element_domain, Vector< GeneralisedElement * > &deleted_element_pt, const bool &report_stats=false)
 Distribute the problem Add to vector of pointers to deleted elements. More...
 
void prune_halo_elements_and_nodes (Vector< GeneralisedElement * > &deleted_element_pt, const bool &report_stats=false)
 (Irreversibly) prune halo(ed) elements and nodes, usually after another round of refinement, to get rid of excessively wide halo layers. Note that the current mesh will be now regarded as the base mesh and no unrefinement relative to it will be possible once this function has been called. More...
 
void prune_halo_elements_and_nodes (Vector< GeneralisedElement * > &deleted_element_pt, DocInfo &doc_info, const bool &report_stats)
 (Irreversibly) prune halo(ed) elements and nodes, usually after another round of refinement, to get rid of excessively wide halo layers. Note that the current mesh will be now regarded as the base mesh and no unrefinement relative to it will be possible once this function has been called. More...
 
void get_efficiency_of_mesh_distribution (double &av_efficiency, double &max_efficiency, double &min_efficiency)
 Get efficiency of mesh distribution: In an ideal distribution without halo overhead, each processor would only hold its own elements. Efficieny per processor = (number of non-halo elements)/ (total number of elements). More...
 
void doc_mesh_distribution (DocInfo &doc_info)
 Doc the mesh distribution, to be processed with tecplot macros. More...
 
void check_halo_schemes (DocInfo &doc_info, double &max_permitted_error_for_halo_check)
 Check halo and shared schemes on the mesh. More...
 
virtual void classify_halo_and_haloed_nodes (DocInfo &doc_info, const bool &report_stats)
 Classify the halo and haloed nodes in the mesh. Virtual so it can be overloaded to perform additional functionality (such as synchronising hanging nodes) in refineable meshes, say. More...
 
virtual void classify_halo_and_haloed_nodes (const bool &report_stats=false)
 
void synchronise_shared_nodes (const bool &report_stats)
 Synchronise shared node lookup schemes to cater for the the case where: (1) a certain node on the current processor is halo with proc p (i.e. its non-halo counterpart lives on processor p) (2) that node is also exists (also as a halo) on another processor (q, say) where its non-halo counter part is also known to be on processor p. However, without calling this function the current processor does not necessarily know that it shares a node with processor q. This information can be required, e.g. when synchronising hanging node schemes over all processors. More...
 
void get_all_halo_data (std::map< unsigned, double * > &map_of_halo_data)
 Get all the halo data stored in the mesh and add pointers to the data to the map, indexed by global equation number. More...
 
Vector< GeneralisedElement * > halo_element_pt (const unsigned &p)
 Return vector of halo elements in this Mesh whose non-halo counterpart is held on processor p. More...
 
Vector< GeneralisedElement * > haloed_element_pt (const unsigned &p)
 Return vector of haloed elements in this Mesh whose haloing counterpart is held on processor p. More...
 
unsigned nnon_halo_element ()
 Total number of non-halo elements in this mesh (Costly call computes result on the fly) More...
 
unsigned nroot_halo_element ()
 Total number of root halo elements in this Mesh. More...
 
unsigned nroot_halo_element (const unsigned &p)
 Number of root halo elements in this Mesh whose non-halo counterpart is held on processor p. More...
 
Vector< GeneralisedElement * > root_halo_element_pt (const unsigned &p)
 Vector of pointers to root halo elements in this Mesh whose non-halo counterpart is held on processor p. More...
 
GeneralisedElement *& root_halo_element_pt (const unsigned &p, const unsigned &e)
 Access fct to the e-th root halo element in this Mesh whose non-halo counterpart is held on processor p. More...
 
void add_root_halo_element_pt (const unsigned &p, GeneralisedElement *&el_pt)
 Add root halo element whose non-halo counterpart is held on processor p to this Mesh. More...
 
unsigned nhalo_node ()
 Total number of halo nodes in this Mesh. More...
 
unsigned nhalo_node (const unsigned &p)
 Number of halo nodes in this Mesh whose non-halo counterpart is held on processor p. More...
 
void add_halo_node_pt (const unsigned &p, Node *&nod_pt)
 Add halo node whose non-halo counterpart is held on processor p to the storage scheme for halo nodes. More...
 
Nodehalo_node_pt (const unsigned &p, const unsigned &j)
 Access fct to the j-th halo node in this Mesh whose non-halo counterpart is held on processor p. More...
 
unsigned nroot_haloed_element ()
 Total number of root haloed elements in this Mesh. More...
 
unsigned nroot_haloed_element (const unsigned &p)
 Number of root haloed elements in this Mesh whose non-halo counterpart is held on processor p. More...
 
Vector< GeneralisedElement * > root_haloed_element_pt (const unsigned &p)
 Vector of pointers to root haloed elements in this Mesh whose non-halo counterpart is held on processor p. More...
 
GeneralisedElement *& root_haloed_element_pt (const unsigned &p, const unsigned &e)
 Access fct to the e-th root haloed element in this Mesh whose non-halo counterpart is held on processor p. More...
 
void add_root_haloed_element_pt (const unsigned &p, GeneralisedElement *&el_pt)
 Add root haloed element whose non-halo counterpart is held on processor p to the storage scheme for haloed elements. Note: This does not add the element to the storage scheme for elements as it's understood to naturally live on this processor anyway! More...
 
unsigned nhaloed_node ()
 Total number of haloed nodes in this Mesh. More...
 
unsigned nhaloed_node (const unsigned &p)
 Number of haloed nodes in this Mesh whose haloed counterpart is held on processor p. More...
 
Nodehaloed_node_pt (const unsigned &p, const unsigned &j)
 Access fct to the j-th haloed node in this Mesh whose halo counterpart is held on processor p. More...
 
void add_haloed_node_pt (const unsigned &p, Node *&nod_pt)
 Add haloed node whose halo counterpart is held on processor p to the storage scheme for haloed nodes. More...
 
void disable_resizing_of_halo_nodes ()
 Function to suppress resizing of halo nodes – optmisation but call it at your own risk! More...
 
void enable_resizing_of_halo_nodes ()
 Function to (re-)enable resizing of halo nodes – this returns things to the default behaviour. More...
 
void disable_output_of_halo_elements ()
 Function to disable halo element output. More...
 
void enable_output_of_halo_elements ()
 Function to enable halo element output. More...
 
unsigned nshared_node ()
 Total number of shared nodes in this Mesh. More...
 
void doc_shared_nodes ()
 Doc shared nodes. More...
 
unsigned nshared_node (const unsigned &p)
 Number of shared nodes in this Mesh who have a counterpart on processor p. More...
 
Nodeshared_node_pt (const unsigned &p, const unsigned &j)
 Access fct to the j-th shared node in this Mesh who has a counterpart on processor p. More...
 
void get_shared_node_pt (const unsigned &p, Vector< Node * > &shared_node_pt)
 Get vector of pointers to shared nodes with processor p. Required for faster search in Missing_masters_functions::add_external_haloed_node_helper() and Missing_masters_functions::add_external_haloed_master_node_helper() More...
 
void add_shared_node_pt (const unsigned &p, Node *&nod_pt)
 Add shared node whose counterpart is held on processor p to the storage scheme for shared nodes. (NB: ensure that this routine is called twice, once for each process) More...
 
void get_halo_node_stats (double &av_number, unsigned &max_number, unsigned &min_number)
 Get halo node stats for this distributed mesh: Average/max/min number of halo nodes over all processors. Careful: Involves MPI Broadcasts and must therefore be called on all processors! More...
 
void get_haloed_node_stats (double &av_number, unsigned &max_number, unsigned &min_number)
 Get haloed node stats for this distributed mesh: Average/max/min number of haloed nodes over all processors. Careful: Involves MPI Broadcasts and must therefore be called on all processors! More...
 
void output_external_halo_elements (std::ostream &outfile, const unsigned &n_plot=5)
 Output all external halo elements. More...
 
void output_external_halo_elements (const unsigned &p, std::ostream &outfile, const unsigned &n_plot=5)
 Output all external halo elements with processor p. More...
 
void output_external_haloed_elements (std::ostream &outfile, const unsigned &n_plot=5)
 Output all external haloed elements. More...
 
void output_external_haloed_elements (const unsigned &p, std::ostream &outfile, const unsigned &n_plot=5)
 Output all external haloed elements with processor p. More...
 
unsigned nexternal_halo_element ()
 Total number of external halo elements in this Mesh. More...
 
unsigned nexternal_halo_element (const unsigned &p)
 Number of external halo elements in this Mesh whose non-halo counterpart is held on processor p. More...
 
GeneralisedElement *& external_halo_element_pt (const unsigned &p, const unsigned &e)
 Access fct to the e-th external halo element in this Mesh whose non-halo counterpart is held on processor p. More...
 
void add_external_halo_element_pt (const unsigned &p, GeneralisedElement *&el_pt)
 Add external halo element whose non-halo counterpart is held on processor p to this Mesh. More...
 
unsigned nexternal_haloed_element ()
 Total number of external haloed elements in this Mesh. More...
 
unsigned nexternal_haloed_element (const unsigned &p)
 Number of external haloed elements in this Mesh whose non-halo counterpart is held on processor p. More...
 
GeneralisedElement *& external_haloed_element_pt (const unsigned &p, const unsigned &e)
 Access fct to the e-th external haloed element in this Mesh whose non-halo counterpart is held on processor p. More...
 
unsigned add_external_haloed_element_pt (const unsigned &p, GeneralisedElement *&el_pt)
 Add external haloed element whose non-halo counterpart is held on processor p to the storage scheme for haloed elements. More...
 
unsigned nexternal_halo_node ()
 Total number of external halo nodes in this Mesh. More...
 
void get_external_halo_node_pt (Vector< Node * > &external_halo_node_pt)
 Get vector of pointers to all external halo nodes. More...
 
unsigned nexternal_halo_node (const unsigned &p)
 Number of external halo nodes in this Mesh whose non-halo (external) counterpart is held on processor p. More...
 
void add_external_halo_node_pt (const unsigned &p, Node *&nod_pt)
 Add external halo node whose non-halo (external) counterpart is held on processor p to the storage scheme for halo nodes. More...
 
Node *& external_halo_node_pt (const unsigned &p, const unsigned &j)
 Access fct to the j-th external halo node in this Mesh whose non-halo external counterpart is held on processor p. More...
 
Vector< Node * > external_halo_node_pt (const unsigned &p)
 Access fct to vector of external halo node in this Mesh whose non-halo external counterpart is held on processor p. (read only) More...
 
void set_external_halo_node_pt (const unsigned &p, const Vector< Node * > &external_halo_node_pt)
 Set vector of external halo node in this Mesh whose non-halo external counterpart is held on processor p. More...
 
void null_external_halo_node (const unsigned &p, Node *nod_pt)
 Null out specified external halo node (used when deleting duplicates) More...
 
void remove_null_pointers_from_external_halo_node_storage ()
 Consolidate external halo node storage by removing nulled out pointes in external halo and haloed schemes. More...
 
unsigned nexternal_haloed_node ()
 Total number of external haloed nodes in this Mesh. More...
 
unsigned nexternal_haloed_node (const unsigned &p)
 Number of external haloed nodes in this Mesh whose halo (external) counterpart is held on processor p. More...
 
Node *& external_haloed_node_pt (const unsigned &p, const unsigned &j)
 Access fct to the j-th external haloed node in this Mesh whose halo external counterpart is held on processor p. More...
 
unsigned add_external_haloed_node_pt (const unsigned &p, Node *&nod_pt)
 Add external haloed node whose halo (external) counterpart is held on processor p to the storage scheme for haloed nodes. More...
 
Vector< Node * > external_haloed_node_pt (const unsigned &p)
 Access fct to vector of external haloed node in this Mesh whose halo external counterpart is held on processor p. (read only) More...
 
void set_external_haloed_node_pt (const unsigned &p, const Vector< Node * > &external_haloed_node_pt)
 Set vector of external haloed node in this Mesh whose halo external counterpart is held on processor p. More...
 
std::set< int > external_halo_proc ()
 Return the set of processors that hold external halo nodes. This is required to avoid having to pass a communicator into the node_update functions for Algebraic-based and MacroElement-based Meshes. More...
 
virtual void create_shared_boundaries (OomphCommunicator *comm_pt, const Vector< unsigned > &element_domain, const Vector< GeneralisedElement * > &backed_up_el_pt, const Vector< FiniteElement * > &backed_up_f_el_pt, std::map< Data *, std::set< unsigned > > &processors_associated_with_data, const bool &overrule_keep_as_halo_element_status)
 Creates the shared boundaries, only used in unstructured meshes In this case with the "TriangleMesh" class. More...
 
virtual unsigned try_to_add_root_haloed_element_pt (const unsigned &p, GeneralisedElement *&el_pt)
 
virtual unsigned try_to_add_haloed_node_pt (const unsigned &p, Node *&nod_pt)
 
void delete_all_external_storage ()
 Wipe the storage for all externally-based elements. More...
 

Public Attributes

bool Output_halo_elements
 Bool for output of halo elements. More...
 

Static Public Attributes

static Steady< 0 > Default_TimeStepper
 Default Steady Timestepper, to be used in default arguments to Mesh constructors. More...
 
static bool Suppress_warning_about_empty_mesh_level_time_stepper_function =false
 Boolean used to control warning about empty mesh level timestepper function. More...
 

Protected Member Functions

void setup_shared_node_scheme ()
 Setup shared node scheme. More...
 
unsigned long assign_global_eqn_numbers (Vector< double * > &Dof_pt)
 Assign the global equation numbers in the Data stored at the nodes and also internal element Data. Also, build (via push_back) the Vector of pointers to the dofs (variables). More...
 
void describe_dofs (std::ostream &out, const std::string &current_string) const
 Function to describe the dofs of the Mesh. The ostream specifies the output stream to which the description is written; the string stores the currently assembled output that is ultimately written to the output stream by Data::describe_dofs(...); it is typically built up incrementally as we descend through the call hierarchy of this function when called from Problem::describe_dofs(...) More...
 
void describe_local_dofs (std::ostream &out, const std::string &current_string) const
 Function to describe the local dofs of the elements. The ostream specifies the output stream to which the description is written; the string stores the currently assembled output that is ultimately written to the output stream by Data::describe_dofs(...); it is typically built up incrementally as we descend through the call hierarchy of this function when called from Problem::describe_dofs(...) More...
 
void assign_local_eqn_numbers (const bool &store_local_dof_pt)
 Assign the local equation numbers in all elements If the boolean argument is true then also store pointers to dofs. More...
 
void convert_to_boundary_node (Node *&node_pt, const Vector< FiniteElement * > &finite_element_pt)
 A function that upgrades an ordinary node to a boundary node We shouldn't ever really use this, but it does make life that bit easier for the lazy mesh writer. The pointer to the node is replaced by a pointer to the new boundary node in all element look-up schemes and in the mesh's Node_pt vector. The new node is also addressed by node_pt on return from the function. More...
 
void convert_to_boundary_node (Node *&node_pt)
 

Protected Attributes

Vector< Vector< Node * > > Boundary_node_pt
 Vector of Vector of pointers to nodes on the boundaries: Boundary_node_pt(b,n). Note that this is private to force the use of the add_boundary_node() function, which ensures that the reverse look-up schemes for the nodes are set up. More...
 
bool Lookup_for_elements_next_boundary_is_setup
 
Vector< Vector< FiniteElement * > > Boundary_element_pt
 Vector of Vector of pointers to elements on the boundaries: Boundary_element_pt(b,e) More...
 
Vector< Vector< int > > Face_index_at_boundary
 For the e-th finite element on boundary b, this is the index of the face that lies along that boundary. More...
 
std::map< unsigned, Vector
< GeneralisedElement * > > 
Root_halo_element_pt
 Map of vectors holding the pointers to the root halo elements. More...
 
std::map< unsigned, Vector
< GeneralisedElement * > > 
Root_haloed_element_pt
 Map of vectors holding the pointers to the root haloed elements. More...
 
std::map< unsigned, Vector
< Node * > > 
Halo_node_pt
 Map of vectors holding the pointers to the halo nodes. More...
 
std::map< unsigned, Vector
< Node * > > 
Haloed_node_pt
 Map of vectors holding the pointers to the haloed nodes. More...
 
std::map< unsigned, Vector
< Node * > > 
Shared_node_pt
 
OomphCommunicatorComm_pt
 Pointer to communicator – set to NULL if mesh is not distributed. More...
 
std::map< unsigned, Vector
< GeneralisedElement * > > 
External_halo_element_pt
 Map of vectors holding the pointers to the external halo elements. More...
 
std::map< unsigned, Vector
< GeneralisedElement * > > 
External_haloed_element_pt
 Map of vectors holding the pointers to the external haloed elements. More...
 
std::map< unsigned, Vector
< Node * > > 
External_halo_node_pt
 Map of vectors holding the pointers to the external halo nodes. More...
 
std::map< unsigned, Vector
< Node * > > 
External_haloed_node_pt
 Map of vectors holding the pointers to the external haloed nodes. More...
 
bool Keep_all_elements_as_halos
 bool to indicate whether to keep all elements in a mesh as halos or not More...
 
bool Resize_halo_nodes_not_required
 Set this to true to suppress resizing of halo nodes (at your own risk!) More...
 
Vector< Node * > Node_pt
 Vector of pointers to nodes. More...
 
Vector< GeneralisedElement * > Element_pt
 Vector of pointers to generalised elements. More...
 
std::vector< bool > Boundary_coordinate_exists
 Vector of boolean data that indicates whether the boundary coordinates have been set for the boundary. More...
 

Friends

class Problem
 Problem is a friend. More...
 

Detailed Description

A general mesh class.

The main components of a Mesh are:

Definition at line 74 of file mesh.h.

Member Typedef Documentation

typedef void(FiniteElement::* oomph::Mesh::SteadyExactSolutionFctPt)(const Vector< double > &x, Vector< double > &soln)

Typedef for function pointer to function that computes steady exact solution.

Definition at line 236 of file mesh.h.

typedef void(FiniteElement::* oomph::Mesh::UnsteadyExactSolutionFctPt)(const double &time, const Vector< double > &x, Vector< double > &soln)

Typedef for function pointer to function that computes unsteady exact solution.

Definition at line 241 of file mesh.h.

Constructor & Destructor Documentation

oomph::Mesh::Mesh ( )
inline
oomph::Mesh::Mesh ( const Vector< Mesh * > &  sub_mesh_pt)
inline

Constructor builds combined mesh from the meshes specified. Note: This simply merges the meshes' elements and nodes (ignoring duplicates; no boundary information etc. is created).

Definition at line 270 of file mesh.h.

References Comm_pt, and merge_meshes().

oomph::Mesh::Mesh ( const Mesh dummy)
inline

Broken copy constructor.

Definition at line 402 of file mesh.h.

References oomph::BrokenCopy::broken_copy().

oomph::Mesh::~Mesh ( )
virtual

Virtual Destructor to clean up all memory.

Definition at line 588 of file mesh.cc.

References delete_all_external_storage(), Element_pt, i, and Node_pt.

Member Function Documentation

void oomph::Mesh::add_boundary_node ( const unsigned &  b,
Node *const &  node_pt 
)

Add a (pointer to) a node to the b-th boundary.

Add the node node_pt to the b-th boundary of the mesh This function also sets the boundary information in the Node itself

Definition at line 246 of file mesh.cc.

References oomph::Node::add_to_boundary(), and Boundary_node_pt.

Referenced by oomph::BrethertonSpineMesh< ELEMENT, INTERFACE_ELEMENT >::BrethertonSpineMesh(), oomph::RefineableQElement< 3 >::build(), oomph::RefineableQElement< 2 >::build(), oomph::ChannelWithLeafletMesh< ELEMENT >::ChannelWithLeafletMesh(), oomph::CollapsibleChannelMesh< ELEMENT >::CollapsibleChannelMesh(), oomph::Missing_masters_functions::construct_new_external_halo_master_node_helper(), oomph::Multi_domain_functions::construct_new_external_halo_master_node_helper(), oomph::Missing_masters_functions::construct_new_external_halo_node_helper(), oomph::Multi_domain_functions::construct_new_external_halo_node_helper(), oomph::EighthSphereMesh< ELEMENT >::EighthSphereMesh(), oomph::FSIDrivenCavityMesh< ELEMENT >::FSIDrivenCavityMesh(), oomph::FullCircleMesh< ELEMENT >::FullCircleMesh(), oomph::GeompackQuadScaffoldMesh::GeompackQuadScaffoldMesh(), oomph::PRefineableQElement< 2, INITIAL_NNODE_1D >::p_refine(), oomph::PRefineableQElement< 3, INITIAL_NNODE_1D >::p_refine(), oomph::QuarterCircleSectorMesh< ELEMENT >::QuarterCircleSectorMesh(), oomph::QuarterTubeMesh< ELEMENT >::QuarterTubeMesh(), oomph::RefineableQSpectralElement< 3 >::rebuild_from_sons(), oomph::RefineableQSpectralElement< 2 >::rebuild_from_sons(), oomph::PRefineableQElement< 2, INITIAL_NNODE_1D >::rebuild_from_sons(), oomph::PRefineableQElement< 3, INITIAL_NNODE_1D >::rebuild_from_sons(), oomph::RectangleWithHoleMesh< ELEMENT >::RectangleWithHoleMesh(), oomph::SimpleCubicScaffoldTetMesh::SimpleCubicScaffoldTetMesh(), oomph::SimpleRectangularTriMesh< ELEMENT >::SimpleRectangularTriMesh(), oomph::TetgenScaffoldMesh::TetgenScaffoldMesh(), oomph::ThinLayerBrickOnTetMesh< ELEMENT >::ThinLayerBrickOnTetMesh(), oomph::TriangleScaffoldMesh::TriangleScaffoldMesh(), and oomph::TubeMesh< ELEMENT >::TubeMesh().

void oomph::Mesh::add_element_pt ( GeneralisedElement *const &  element_pt)
inline
void oomph::Mesh::add_external_halo_element_pt ( const unsigned &  p,
GeneralisedElement *&  el_pt 
)
inline

Add external halo element whose non-halo counterpart is held on processor p to this Mesh.

Definition at line 1949 of file mesh.h.

References External_halo_element_pt, and oomph::GeneralisedElement::set_halo().

Referenced by oomph::Missing_masters_functions::construct_new_external_halo_master_node_helper(), and oomph::Multi_domain_functions::construct_new_external_halo_master_node_helper().

void oomph::Mesh::add_external_halo_node_pt ( const unsigned &  p,
Node *&  nod_pt 
)
inline
unsigned oomph::Mesh::add_external_haloed_element_pt ( const unsigned &  p,
GeneralisedElement *&  el_pt 
)

Add external haloed element whose non-halo counterpart is held on processor p to the storage scheme for haloed elements.

Add external haloed element whose non-halo counterpart is held on processor p to the storage scheme for external haloed elements. If the element is already in the storage scheme then return its index.

Definition at line 9107 of file mesh.cc.

References External_haloed_element_pt, and nexternal_haloed_element().

Referenced by oomph::Multi_domain_functions::locate_zeta_for_missing_coordinates().

unsigned oomph::Mesh::add_external_haloed_node_pt ( const unsigned &  p,
Node *&  nod_pt 
)

Add external haloed node whose halo (external) counterpart is held on processor p to the storage scheme for haloed nodes.

Add external haloed node whose halo (external) counterpart is held on processor p to the storage scheme for external haloed nodes. If the node is already in the storage scheme then return its index.

Definition at line 9148 of file mesh.cc.

References External_haloed_node_pt, and nexternal_haloed_node().

Referenced by oomph::Missing_masters_functions::add_external_haloed_master_node_helper(), oomph::Multi_domain_functions::add_external_haloed_master_node_helper(), oomph::Missing_masters_functions::add_external_haloed_node_helper(), and oomph::Multi_domain_functions::add_external_haloed_node_helper().

void oomph::Mesh::add_halo_node_pt ( const unsigned &  p,
Node *&  nod_pt 
)
inline

Add halo node whose non-halo counterpart is held on processor p to the storage scheme for halo nodes.

Definition at line 1608 of file mesh.h.

References Halo_node_pt.

Referenced by classify_halo_and_haloed_nodes().

void oomph::Mesh::add_haloed_node_pt ( const unsigned &  p,
Node *&  nod_pt 
)
inline

Add haloed node whose halo counterpart is held on processor p to the storage scheme for haloed nodes.

Definition at line 1719 of file mesh.h.

References Haloed_node_pt.

Referenced by classify_halo_and_haloed_nodes().

void oomph::Mesh::add_node_pt ( Node *const &  node_pt)
inline
void oomph::Mesh::add_root_halo_element_pt ( const unsigned &  p,
GeneralisedElement *&  el_pt 
)
inline

Add root halo element whose non-halo counterpart is held on processor p to this Mesh.

Definition at line 1574 of file mesh.h.

References Root_halo_element_pt, and oomph::GeneralisedElement::set_halo().

Referenced by distribute().

void oomph::Mesh::add_root_haloed_element_pt ( const unsigned &  p,
GeneralisedElement *&  el_pt 
)
inline

Add root haloed element whose non-halo counterpart is held on processor p to the storage scheme for haloed elements. Note: This does not add the element to the storage scheme for elements as it's understood to naturally live on this processor anyway!

Definition at line 1677 of file mesh.h.

References Root_haloed_element_pt.

Referenced by distribute().

void oomph::Mesh::add_shared_node_pt ( const unsigned &  p,
Node *&  nod_pt 
)
inline

Add shared node whose counterpart is held on processor p to the storage scheme for shared nodes. (NB: ensure that this routine is called twice, once for each process)

Definition at line 1828 of file mesh.h.

References Shared_node_pt.

Referenced by classify_halo_and_haloed_nodes(), setup_shared_node_scheme(), and synchronise_shared_nodes().

unsigned long oomph::Mesh::assign_global_eqn_numbers ( Vector< double * > &  Dof_pt)
protected

Assign the global equation numbers in the Data stored at the nodes and also internal element Data. Also, build (via push_back) the Vector of pointers to the dofs (variables).

Assign (global) equation numbers to the nodes.

Definition at line 614 of file mesh.cc.

References Element_pt, i, and Node_pt.

Referenced by oomph::Problem::assign_eqn_numbers().

void oomph::Mesh::assign_initial_values_impulsive ( )

Assign initial values for an impulsive start.

Assign the initial values for an impulsive start, which is acheived by looping over all data in the mesh (internal element data and data stored at nodes) and setting the calling the assign_initial_values_impulsive() function for each data's timestepper

Definition at line 2040 of file mesh.cc.

References e, element_pt(), nelement(), nnode(), and Node_pt.

Referenced by oomph::Problem::assign_initial_values_impulsive().

void oomph::Mesh::assign_local_eqn_numbers ( const bool &  store_local_dof_pt)
protected

Assign the local equation numbers in all elements If the boolean argument is true then also store pointers to dofs.

Assign local equation numbers in all elements.

Definition at line 702 of file mesh.cc.

References Element_pt, and i.

Referenced by oomph::Problem::assign_eqn_numbers(), and oomph::Problem::synchronise_eqn_numbers().

bool oomph::Mesh::boundary_coordinate_exists ( const unsigned &  i) const
inline
FiniteElement* oomph::Mesh::boundary_element_pt ( const unsigned &  b,
const unsigned &  e 
) const
inline
Node* & oomph::Mesh::boundary_node_pt ( const unsigned &  b,
const unsigned &  n 
)
inline
Node* oomph::Mesh::boundary_node_pt ( const unsigned &  b,
const unsigned &  n 
) const
inline

Return pointer to node n on boundary b.

Definition at line 501 of file mesh.h.

References Boundary_node_pt.

template<class BULK_ELEMENT , template< class > class FACE_ELEMENT>
void oomph::Mesh::build_face_mesh ( const unsigned &  b,
Mesh *const &  face_mesh_pt 
)
inline

Constuct a Mesh of FACE_ELEMENTs along the b-th boundary of the mesh (which contains elements of type BULK_ELEMENT)

Definition at line 639 of file mesh.h.

References add_element_pt(), add_node_pt(), boundary_element_pt(), boundary_node_pt(), communicator_pt(), e, face_index_at_boundary(), is_mesh_distributed(), nboundary_element(), nboundary_node(), and set_communicator_pt().

void oomph::Mesh::calculate_predictions ( )

Calculate predictions for all Data and positions associated with the mesh, usually used in adaptive time-stepping.

Calculate predictions for all Data and positions associated with the mesh. This is usually only used for adaptive time-stepping when the comparison between a predicted value and the actual value is usually used to determine the change in step size. Again the loop is over all data in the mesh and individual timestepper functions for each data value are called.

Definition at line 2115 of file mesh.cc.

References e, element_pt(), nelement(), nnode(), and Node_pt.

Referenced by oomph::Problem::calculate_predictions().

unsigned oomph::Mesh::check_for_repeated_nodes ( const double &  epsilon = 1.0e-12)
inline

Check for repeated nodes within a given spatial tolerance. Return (0/1) for (pass/fail).

Definition at line 737 of file mesh.h.

References i, oomph::Data::is_a_copy(), oomph::Node::ndim(), nnode(), node_pt(), oomph::oomph_info, and oomph::Node::x().

Referenced by self_test().

void oomph::Mesh::check_halo_schemes ( DocInfo doc_info,
double &  max_permitted_error_for_halo_check 
)
void oomph::Mesh::check_inverted_elements ( bool &  mesh_has_inverted_elements,
std::ofstream &  inverted_element_file 
)

Check for inverted elements and report outcome in boolean variable. This visits all elements at their integration points and checks if the Jacobian of the mapping between local and global coordinates is positive – using the same test that would be carried out (but only in PARANOID mode) during the assembly of the elements' Jacobian matrices. Inverted elements are output in inverted_element_file (if the stream is open).

Check for inverted elements and report outcome in boolean variable. This visits all elements at their integration points and checks if the Jacobian of the mapping between local and global coordinates is positive – using the same test that would be carried out (but only in PARANOID mode) during the assembly of the elements' Jacobian matrices. Inverted elements are output in inverted_element_file (if the stream is open).

Definition at line 802 of file mesh.cc.

References oomph::FiniteElement::check_jacobian(), oomph::FiniteElement::dim(), oomph::FiniteElement::dshape_eulerian(), e, finite_element_pt(), i, oomph::FiniteElement::integral_pt(), oomph::Integral::knot(), nelement(), oomph::FiniteElement::nnode(), oomph::FiniteElement::nodal_dimension(), oomph::Integral::nweight(), oomph::FiniteElement::output(), s, and oomph::FiniteElement::Suppress_output_while_checking_for_inverted_elements.

Referenced by check_inverted_elements(), and oomph::NonLinearElasticitySmoothMesh< ELEMENT >::doc_solution().

void oomph::Mesh::check_inverted_elements ( bool &  mesh_has_inverted_elements)
inline

Check for inverted elements and report outcome.

in boolean variable. This visits all elements at their integration points and checks if the Jacobian of the mapping between local and global coordinates is positive – using the same test that would be carried out (but only in PARANOID mode) during the assembly of the elements' Jacobian matrices.

Definition at line 727 of file mesh.h.

References check_inverted_elements().

void oomph::Mesh::classify_halo_and_haloed_nodes ( DocInfo doc_info,
const bool &  report_stats 
)
virtual
virtual void oomph::Mesh::classify_halo_and_haloed_nodes ( const bool &  report_stats = false)
inlinevirtual

Classify the halo and haloed nodes in the mesh. Virtual so it can be overloaded to perform additional functionality (such as synchronising hanging nodes) in refineable meshes, say.

Reimplemented in oomph::TreeBasedRefineableMeshBase.

Definition at line 1418 of file mesh.h.

References classify_halo_and_haloed_nodes(), and oomph::DocInfo::disable_doc().

OomphCommunicator* oomph::Mesh::communicator_pt ( ) const
inline
virtual void oomph::Mesh::compute_error ( std::ostream &  outfile,
FiniteElement::UnsteadyExactSolutionFctPt  exact_soln_pt,
const double &  time,
double &  error,
double &  norm 
)
inlinevirtual

Plot error when compared against a given exact solution. Also returns the norm of the error and that of the exact solution.

Definition at line 1096 of file mesh.h.

References oomph::FiniteElement::compute_error(), e, Element_pt, and oomph::GeneralisedElement::is_halo().

virtual void oomph::Mesh::compute_error ( std::ostream &  outfile,
FiniteElement::SteadyExactSolutionFctPt  exact_soln_pt,
double &  error,
double &  norm 
)
inlinevirtual

Plot error when compared against a given time-depdendent exact solution. Also returns the norm of the error and that of the exact solution.

Definition at line 1138 of file mesh.h.

References oomph::FiniteElement::compute_error(), e, Element_pt, and oomph::GeneralisedElement::is_halo().

virtual void oomph::Mesh::compute_error ( std::ostream &  outfile,
FiniteElement::UnsteadyExactSolutionFctPt  exact_soln_pt,
const double &  time,
Vector< double > &  error,
Vector< double > &  norm 
)
inlinevirtual

Plot error when compared against a given time-depdendent exact solution. Also returns the norm of the error and that of the exact solution. Version with vectors of norms and errors so that different variables' norms and errors can be returned individually.

Definition at line 1179 of file mesh.h.

References oomph::FiniteElement::compute_error(), e, Element_pt, i, and oomph::GeneralisedElement::is_halo().

virtual void oomph::Mesh::compute_error ( std::ostream &  outfile,
FiniteElement::SteadyExactSolutionFctPt  exact_soln_pt,
Vector< double > &  error,
Vector< double > &  norm 
)
inlinevirtual

Plot error when compared against a given time-depdendent exact solution. Also returns the norm of the error and that of the exact solution. Version with vectors of norms and errors so that different variables' norms and errors can be returned individually.

Definition at line 1244 of file mesh.h.

References oomph::FiniteElement::compute_error(), e, Element_pt, i, and oomph::GeneralisedElement::is_halo().

virtual void oomph::Mesh::compute_norm ( double &  norm)
inlinevirtual

Compute norm of solution by summing contributions of compute_norm(...) for all constituent elements in the mesh. What that norm means depends on what's defined in the element's function; may need to take the square root afterwards if the elements compute the square of the L2 norm, say.

Definition at line 1068 of file mesh.h.

References oomph::GeneralisedElement::compute_norm(), e, Element_pt, and oomph::GeneralisedElement::is_halo().

void oomph::Mesh::convert_to_boundary_node ( Node *&  node_pt,
const Vector< FiniteElement * > &  finite_element_pt 
)
protected

A function that upgrades an ordinary node to a boundary node We shouldn't ever really use this, but it does make life that bit easier for the lazy mesh writer. The pointer to the node is replaced by a pointer to the new boundary node in all element look-up schemes and in the mesh's Node_pt vector. The new node is also addressed by node_pt on return from the function.

As convert_to_boundary_node but with a vector of pre-"dynamic cast"ed pointers passed in. If this function is being called often then creating this vector and passing it in explicitly each time can give a large speed up.

Definition at line 2334 of file mesh.cc.

References oomph::Node::copy(), oomph::SolidNode::copy(), e, and oomph::Data::time_stepper_pt().

Referenced by oomph::ChannelWithLeafletMesh< ELEMENT >::ChannelWithLeafletMesh(), convert_to_boundary_node(), oomph::FullCircleMesh< ELEMENT >::FullCircleMesh(), oomph::QuarterTubeMesh< ELEMENT >::QuarterTubeMesh(), oomph::RectangleWithHoleMesh< ELEMENT >::RectangleWithHoleMesh(), oomph::SimpleRectangularTriMesh< ELEMENT >::SimpleRectangularTriMesh(), and oomph::TubeMesh< ELEMENT >::TubeMesh().

void oomph::Mesh::convert_to_boundary_node ( Node *&  node_pt)
protected

A function that upgrades an ordinary node to a boundary node. All pointers to the node from the mesh's elements are found. and replaced by pointers to the new boundary node. If the node is present in the mesh's list of nodes, that pointer is also replaced. Finally, the pointer argument node_pt addresses the new node on return from the function. We shouldn't ever really use this, but it does make life that bit easier for the lazy mesh writer.

Definition at line 2308 of file mesh.cc.

References convert_to_boundary_node(), e, Element_pt, finite_element_pt(), and nelement().

void oomph::Mesh::copy_boundary_node_data_from_nodes ( )
inline

Replace existing boundary node lookup schemes with new schemes created using the boundary data stored in the nodes.

Definition at line 526 of file mesh.h.

References Boundary_node_pt, oomph::Node::get_boundaries_pt(), oomph::Node::is_on_boundary(), nboundary(), nnode(), node_pt(), and set_nboundary().

virtual void oomph::Mesh::create_shared_boundaries ( OomphCommunicator comm_pt,
const Vector< unsigned > &  element_domain,
const Vector< GeneralisedElement * > &  backed_up_el_pt,
const Vector< FiniteElement * > &  backed_up_f_el_pt,
std::map< Data *, std::set< unsigned > > &  processors_associated_with_data,
const bool &  overrule_keep_as_halo_element_status 
)
inlinevirtual

Creates the shared boundaries, only used in unstructured meshes In this case with the "TriangleMesh" class.

Reimplemented in oomph::TriangleMesh< ELEMENT >.

Definition at line 2173 of file mesh.h.

Referenced by distribute().

void oomph::Mesh::delete_all_external_storage ( )
void oomph::Mesh::describe_dofs ( std::ostream &  out,
const std::string &  current_string 
) const
protected

Function to describe the dofs of the Mesh. The ostream specifies the output stream to which the description is written; the string stores the currently assembled output that is ultimately written to the output stream by Data::describe_dofs(...); it is typically built up incrementally as we descend through the call hierarchy of this function when called from Problem::describe_dofs(...)

Definition at line 648 of file mesh.cc.

References Element_pt, i, Node_pt, and oomph::Global_string_for_annotation::string().

Referenced by oomph::Problem::describe_dofs().

void oomph::Mesh::describe_local_dofs ( std::ostream &  out,
const std::string &  current_string 
) const
protected

Function to describe the local dofs of the elements. The ostream specifies the output stream to which the description is written; the string stores the currently assembled output that is ultimately written to the output stream by Data::describe_dofs(...); it is typically built up incrementally as we descend through the call hierarchy of this function when called from Problem::describe_dofs(...)

Definition at line 683 of file mesh.cc.

References Element_pt, i, and oomph::Global_string_for_annotation::string().

Referenced by oomph::Problem::describe_dofs().

void oomph::Mesh::disable_output_of_halo_elements ( )
inline

Function to disable halo element output.

Definition at line 1744 of file mesh.h.

References Output_halo_elements.

void oomph::Mesh::disable_resizing_of_halo_nodes ( )
inline

Function to suppress resizing of halo nodes – optmisation but call it at your own risk!

Definition at line 1730 of file mesh.h.

References Resize_halo_nodes_not_required.

void oomph::Mesh::distribute ( OomphCommunicator comm_pt,
const Vector< unsigned > &  element_domain,
Vector< GeneralisedElement * > &  deleted_element_pt,
DocInfo doc_info,
const bool &  report_stats,
const bool &  overrule_keep_as_halo_element_status 
)
virtual

Distribute the problem and doc; make this virtual to allow overloading for particular meshes where further work is required. Add to vector of pointers to deleted elements.

Distribute the mesh. Add to vector of deleted elements.

Reimplemented in oomph::MacroElementNodeUpdateMesh.

Definition at line 4640 of file mesh.cc.

References add_element_pt(), add_root_halo_element_pt(), add_root_haloed_element_pt(), classify_halo_and_haloed_nodes(), Comm_pt, create_shared_boundaries(), delete_all_external_storage(), oomph::DocInfo::directory(), doc_mesh_distribution(), e, element_pt(), finite_element_pt(), flush_element_storage(), oomph::Tree::flush_object(), i, oomph::DocInfo::is_doc_enabled(), oomph::GeneralisedElement::is_halo(), Keep_all_elements_as_halos, oomph::GeneralisedElement::must_be_kept_as_halo(), nboundary(), nboundary_element(), oomph::UnstructuredTwoDMeshGeometryBase::nboundary_element_in_region(), oomph::Node::ndim(), nelement(), nnode(), oomph::FiniteElement::nnode(), node_pt(), oomph::FiniteElement::node_pt(), oomph::UnstructuredTwoDMeshGeometryBase::nregion(), nroot_halo_element(), nroot_haloed_element(), oomph::DocInfo::number(), oomph::oomph_info, oomph::FiniteElement::output(), prune_dead_nodes(), oomph::UnstructuredTwoDMeshGeometryBase::region_attribute(), reset_boundary_element_info(), oomph::Node::set_non_obsolete(), oomph::Node::set_obsolete(), setup_boundary_element_info(), oomph::TreeBasedRefineableMeshBase::setup_tree_forest(), oomph::RefineableElement::tree_pt(), and oomph::Node::x().

Referenced by oomph::MacroElementNodeUpdateMesh::distribute(), distribute(), oomph::Problem::distribute(), and oomph::Problem::load_balance().

void oomph::Mesh::distribute ( OomphCommunicator comm_pt,
const Vector< unsigned > &  element_domain,
Vector< GeneralisedElement * > &  deleted_element_pt,
const bool &  report_stats = false 
)
inline

Distribute the problem Add to vector of pointers to deleted elements.

Definition at line 1353 of file mesh.h.

References oomph::DocInfo::disable_doc(), and distribute().

template<class BULK_ELEMENT >
void oomph::Mesh::doc_boundary_coordinates ( const unsigned &  b,
std::ofstream &  the_file 
)
inline
void oomph::Mesh::doc_mesh_distribution ( DocInfo doc_info)
void oomph::Mesh::doc_shared_nodes ( )
inline

Doc shared nodes.

Definition at line 1768 of file mesh.h.

References i, oomph::Node::is_hanging(), oomph::Node::ndim(), oomph::oomph_info, Shared_node_pt, and oomph::Node::x().

bool oomph::Mesh::does_pointer_correspond_to_mesh_data ( double *const &  parameter_pt)

Does the double pointer correspond to any mesh data.

Return true if the pointer corresponds to any data stored in the mesh and false if not

Definition at line 2218 of file mesh.cc.

References oomph::Data::does_pointer_correspond_to_value(), e, element_pt(), oomph::GeneralisedElement::internal_data_pt(), nelement(), oomph::GeneralisedElement::ninternal_data(), nnode(), and Node_pt.

Referenced by oomph::Problem::does_pointer_correspond_to_problem_data().

void oomph::Mesh::dump ( std::ofstream &  dump_file,
const bool &  use_old_ordering = true 
) const
virtual

Dump the data in the mesh into a file for restart.

Dump function for the mesh class. Loop over all nodes and elements and dump them

Definition at line 1044 of file mesh.cc.

References oomph::Data::dump(), e, element_pt(), get_node_reordering(), i, oomph::GeneralisedElement::internal_data_pt(), nelement(), oomph::GeneralisedElement::ninternal_data(), and nnode().

Referenced by oomph::SpineMesh::dump(), dump(), and oomph::Problem::dump().

void oomph::Mesh::dump ( const std::string &  dump_file_name,
const bool &  use_old_ordering = true 
) const
inline

Dump the data in the mesh into a file for restart.

Definition at line 889 of file mesh.h.

References dump(), and oomph::Global_string_for_annotation::string().

GeneralisedElement* & oomph::Mesh::element_pt ( const unsigned long &  e)
inline

Return pointer to element e.

Definition at line 462 of file mesh.h.

References e, and Element_pt.

Referenced by oomph::IMRByBDF::actions_after_timestep(), oomph::RefineableTriangleMesh< ELEMENT >::adapt(), oomph::PeriodicOrbitAssemblyHandler< NNODE_1D >::adapt_temporal_mesh(), oomph::NavierStokesSchurComplementPreconditioner::assemble_inv_press_and_veloc_mass_matrix_diagonal(), oomph::PressureBasedSolidLSCPreconditioner::assemble_mass_matrix_diagonal(), oomph::Problem::assign_eqn_numbers(), oomph::Multi_domain_functions::aux_setup_multi_domain_interaction(), oomph::SolidICProblem::backup_original_state(), oomph::BackupMeshForProjection< GEOMETRIC_ELEMENT >::BackupMeshForProjection(), oomph::BrethertonSpineMesh< ELEMENT, INTERFACE_ELEMENT >::BrethertonSpineMesh(), oomph::MeshAsGeomObject::construct_it(), oomph::Problem::copy(), oomph::TwoDimensionalPMLHelper::create_bottom_left_pml_mesh(), oomph::TwoDimensionalPMLHelper::create_bottom_pml_mesh(), oomph::TwoDimensionalPMLHelper::create_bottom_right_pml_mesh(), oomph::Multi_domain_functions::create_external_halo_elements(), oomph::TwoDimensionalPMLHelper::create_left_pml_mesh(), oomph::TwoDimensionalPMLHelper::create_right_pml_mesh(), oomph::TwoDimensionalPMLHelper::create_top_left_pml_mesh(), oomph::TwoDimensionalPMLHelper::create_top_pml_mesh(), oomph::TwoDimensionalPMLHelper::create_top_right_pml_mesh(), oomph::RefineableTriangleMesh< ELEMENT >::create_unsorted_face_mesh_representation(), oomph::Problem::disable_mass_matrix_reuse(), oomph::Problem::distribute(), oomph::SolidHelpers::doc_2D_principal_stress(), oomph::Z2ErrorEstimator::doc_flux(), oomph::FSI_functions::doc_fsi(), oomph::Problem::enable_mass_matrix_reuse(), oomph::NetFluxControlElement::fill_in_generic_residual_contribution_flux_control(), oomph::FoldHandler::FoldHandler(), oomph::Problem::get_data_to_be_sent_during_load_balancing(), oomph::Multi_domain_functions::get_dim_helper(), oomph::Problem::get_dofs(), oomph::Z2ErrorEstimator::get_element_errors(), oomph::Problem::get_flat_packed_refinement_pattern_for_load_balancing(), oomph::ImmersedRigidBodyElement::get_force_and_torque(), oomph::Problem::get_hessian_vector_products(), oomph::Problem::get_inverse_mass_matrix_times_residuals(), oomph::Problem::get_jacobian(), oomph::Problem::get_my_eqns(), oomph::NavierStokesSchurComplementPreconditioner::get_pressure_advection_diffusion_matrix(), oomph::Problem::get_residuals(), oomph::HopfHandler::HopfHandler(), oomph::ImposeFluxForWomersleyElement< DIM >::ImposeFluxForWomersleyElement(), oomph::Problem::load_balance(), oomph::Multi_domain_functions::locate_zeta_for_local_coordinates(), oomph::HelmholtzMGPreconditioner< DIM >::maximum_edge_width(), oomph::NetFluxControlElement::NetFluxControlElement(), oomph::ImmersedRigidBodyElement::node_update_adjacent_fluid_elements(), oomph::NonLinearElasticitySmoothMesh< ELEMENT >::operator()(), oomph::PeriodicOrbitAssemblyHandler< NNODE_1D >::orbit_output(), oomph::METIS::partition_distributed_mesh(), oomph::METIS::partition_mesh(), oomph::ProjectionProblem< PROJECTABLE_ELEMENT >::pin_all(), oomph::NavierStokesSchurComplementPreconditioner::pin_all_non_pressure_dofs(), oomph::ProjectionProblem< PROJECTABLE_ELEMENT >::pin_dofs_of_field(), oomph::PitchForkHandler::PitchForkHandler(), oomph::WomersleyImpedanceTubeBase< WOMERSLEY_ELEMENT, DIM >::precompute_aux_integrals(), oomph::ProjectionProblem< PROJECTABLE_ELEMENT >::project(), oomph::Problem::prune_halo_elements_and_nodes(), oomph::Problem::read(), oomph::Problem::remove_duplicate_data(), oomph::HSL_MA42::reorder_elements(), oomph::BrethertonSpineMesh< ELEMENT, INTERFACE_ELEMENT >::reposition_spines(), oomph::SolidICProblem::reset_original_state(), oomph::NavierStokesSchurComplementPreconditioner::reset_pin_status(), oomph::AugmentedBlockFoldLinearSolver::resolve(), oomph::AugmentedBlockPitchForkLinearSolver::resolve(), oomph::ProjectionProblem< PROJECTABLE_ELEMENT >::restore_positions(), oomph::ProjectionProblem< PROJECTABLE_ELEMENT >::set_coordinate_for_projection(), oomph::ProjectionProblem< PROJECTABLE_ELEMENT >::set_current_field_for_projection(), oomph::Problem::set_dofs(), oomph::ImmersedRigidBodyElement::set_drag_mesh(), oomph::ProjectionProblem< PROJECTABLE_ELEMENT >::set_lagrangian_coordinate_for_projection(), oomph::SolidICProblem::set_newmark_initial_condition_consistently(), oomph::Problem::set_pinned_values_to_zero(), oomph::BiharmonicProblem< DIM >::set_source_function(), oomph::ProjectionProblem< PROJECTABLE_ELEMENT >::set_time_level_for_projection(), oomph::Problem::setup_element_count_per_dof(), oomph::Z2ErrorEstimator::setup_patches(), oomph::SolidICProblem::setup_problem(), oomph::HSL_MA42::solve(), oomph::AugmentedBlockFoldLinearSolver::solve(), oomph::AugmentedBlockPitchForkLinearSolver::solve(), oomph::BlockHopfLinearSolver::solve(), oomph::HSL_MA42::solve_for_one_dof(), oomph::BlockHopfLinearSolver::solve_for_two_rhs(), oomph::Problem::sparse_assemble_row_or_column_compressed_with_lists(), oomph::Problem::sparse_assemble_row_or_column_compressed_with_maps(), oomph::Problem::sparse_assemble_row_or_column_compressed_with_two_arrays(), oomph::Problem::sparse_assemble_row_or_column_compressed_with_two_vectors(), oomph::Problem::sparse_assemble_row_or_column_compressed_with_vectors_of_pairs(), oomph::ProjectionProblem< PROJECTABLE_ELEMENT >::store_positions(), oomph::Problem::synchronise_eqn_numbers(), oomph::ThinLayerBrickOnTetMesh< ELEMENT >::ThinLayerBrickOnTetMesh(), oomph::ImposeFluxForWomersleyElement< DIM >::total_volume_flux(), oomph::NavierStokesImpedanceTractionElement< BULK_NAVIER_STOKES_ELEMENT, WOMERSLEY_ELEMENT, DIM >::total_volume_flux_into_downstream_tube(), oomph::WomersleyImpedanceTubeBase< WOMERSLEY_ELEMENT, DIM >::total_volume_flux_into_impedance_tube(), oomph::ProjectionProblem< PROJECTABLE_ELEMENT >::unpin_all(), oomph::ProjectionProblem< PROJECTABLE_ELEMENT >::unpin_dofs_of_field(), oomph::FpPressureAdvectionDiffusionProblem< ELEMENT >::validate(), oomph::WomersleyImpedanceTubeBase< WOMERSLEY_ELEMENT, DIM >::WomersleyImpedanceTubeBase(), and oomph::WomersleyProblem< ELEMENT, DIM >::WomersleyProblem().

GeneralisedElement* oomph::Mesh::element_pt ( const unsigned long &  e) const
inline

Return pointer to element e (const version)

Definition at line 466 of file mesh.h.

References e, and Element_pt.

const Vector<GeneralisedElement*>& oomph::Mesh::element_pt ( ) const
inline

Return reference to the Vector of elements.

Definition at line 470 of file mesh.h.

References Element_pt.

Referenced by oomph::TreeBasedRefineableMeshBase::adapt(), oomph::PeriodicOrbitTemporalMesh< oomph::SpectralPeriodicOrbitElement< NNODE_1D > >::assemble_residuals(), oomph::PeriodicOrbitTemporalMesh< oomph::SpectralPeriodicOrbitElement< NNODE_1D > >::assemble_residuals_and_jacobian(), assign_initial_values_impulsive(), oomph::BrethertonSpineMesh< ELEMENT, INTERFACE_ELEMENT >::BrethertonSpineMesh(), calculate_predictions(), check_halo_schemes(), oomph::TreeBasedRefineableMeshBase::classify_halo_and_haloed_nodes(), classify_halo_and_haloed_nodes(), distribute(), doc_mesh_distribution(), does_pointer_correspond_to_mesh_data(), dump(), oomph::ElasticRefineableQuarterPipeMesh< ELEMENT >::ElasticRefineableQuarterPipeMesh(), get_node_reordering(), oomph::TreeBasedRefineableMeshBase::get_refinement_levels(), oomph::DGMesh::limit_slopes(), oomph::MacroElementNodeUpdateChannelWithLeafletMesh< ELEMENT >::MacroElementNodeUpdateChannelWithLeafletMesh(), oomph::MacroElementNodeUpdateCollapsibleChannelMesh< ELEMENT >::MacroElementNodeUpdateCollapsibleChannelMesh(), oomph::MacroElementNodeUpdateRefineableFishMesh< ELEMENT >::MacroElementNodeUpdateRefineableFishMesh(), ndof_types(), nnon_halo_element(), node_update(), oomph::PeriodicOrbitTemporalMesh< oomph::SpectralPeriodicOrbitElement< NNODE_1D > >::orbit_output(), output_fct_paraview(), output_paraview(), oomph::TreeBasedRefineableMeshBase::p_adapt(), oomph::TreeBasedRefineableMeshBase::p_adapt_mesh(), oomph::TreeBasedRefineableMeshBase::p_refine_selected_elements(), oomph::TreeBasedRefineableMeshBase::p_refine_uniformly(), oomph::TreeBasedRefineableMeshBase::p_unrefine_uniformly(), oomph::PMLQuadMeshBase< ELEMENT >::pml_locate_zeta(), oomph::PMLCornerQuadMesh< ELEMENT >::PMLCornerQuadMesh(), oomph::PMLQuadMesh< ELEMENT >::PMLQuadMesh(), oomph::QuarterCircleSectorMesh< ELEMENT >::QuarterCircleSectorMesh(), oomph::QuarterPipeMesh< ELEMENT >::QuarterPipeMesh(), read(), oomph::TreeBasedRefineableMeshBase::refine_base_mesh(), oomph::TreeBasedRefineableMeshBase::refine_selected_elements(), oomph::TreeBasedRefineableMeshBase::refine_uniformly(), oomph::RefineableEighthSphereMesh< ELEMENT >::RefineableEighthSphereMesh(), oomph::RefineableFullCircleMesh< ELEMENT >::RefineableFullCircleMesh(), oomph::RefineableQuarterTubeMesh< ELEMENT >::RefineableQuarterTubeMesh(), oomph::RefineableRectangleWithHoleMesh< ELEMENT >::RefineableRectangleWithHoleMesh(), oomph::RefineableTubeMesh< ELEMENT >::RefineableTubeMesh(), oomph::RefineableTwoDAnnularMesh< ELEMENT >::RefineableTwoDAnnularMesh(), set_consistent_pinned_values_for_continuation(), set_elemental_internal_time_stepper(), oomph::AlgebraicFishMesh< ELEMENT >::setup_algebraic_node_update(), oomph::AlgebraicRefineableQuarterTubeMesh< ELEMENT >::setup_algebraic_node_update(), oomph::AlgebraicRefineableQuarterCircleSectorMesh< ELEMENT >::setup_algebraic_node_update(), oomph::RefineableLineMesh< oomph::SpectralPeriodicOrbitElement< NNODE_1D > >::setup_binary_tree_forest(), oomph::DGMesh::setup_face_neighbour_info(), oomph::MacroElementNodeUpdateRefineableQuarterTubeMesh< ELEMENT >::setup_macro_element_node_update(), oomph::MacroElementNodeUpdateRefineableQuarterCircleSectorMesh< ELEMENT >::setup_macro_element_node_update(), oomph::RefineableBrickMesh< ELEMENT >::setup_octree_forest(), oomph::RefineableQuadMesh< ELEMENT >::setup_quadtree_forest(), and shift_time_values().

Vector<GeneralisedElement*>& oomph::Mesh::element_pt ( )
inline

Return reference to the Vector of elements.

Definition at line 473 of file mesh.h.

References Element_pt.

unsigned oomph::Mesh::elemental_dimension ( ) const

Return number of elemental dimension in mesh.

Get the number of elemental dimension in the mesh from the first element of the mesh. If MPI is on then also do some consistency checks between processors. Careful: Involves MPI Broadcasts and must therefore be called on all processors!

Definition at line 8559 of file mesh.cc.

References Comm_pt, oomph::FiniteElement::dim(), finite_element_pt(), i, and nelement().

void oomph::Mesh::enable_output_of_halo_elements ( )
inline

Function to enable halo element output.

Definition at line 1750 of file mesh.h.

References Output_halo_elements.

void oomph::Mesh::enable_resizing_of_halo_nodes ( )
inline

Function to (re-)enable resizing of halo nodes – this returns things to the default behaviour.

Definition at line 1738 of file mesh.h.

References Resize_halo_nodes_not_required.

GeneralisedElement* & oomph::Mesh::external_halo_element_pt ( const unsigned &  p,
const unsigned &  e 
)
inline
Node* & oomph::Mesh::external_halo_node_pt ( const unsigned &  p,
const unsigned &  j 
)
inline
Vector<Node*> oomph::Mesh::external_halo_node_pt ( const unsigned &  p)
inline

Access fct to vector of external halo node in this Mesh whose non-halo external counterpart is held on processor p. (read only)

Definition at line 2071 of file mesh.h.

References External_halo_node_pt.

std::set<int> oomph::Mesh::external_halo_proc ( )
inline

Return the set of processors that hold external halo nodes. This is required to avoid having to pass a communicator into the node_update functions for Algebraic-based and MacroElement-based Meshes.

Definition at line 2160 of file mesh.h.

References External_halo_node_pt.

Referenced by oomph::FSI_functions::doc_fsi().

GeneralisedElement* & oomph::Mesh::external_haloed_element_pt ( const unsigned &  p,
const unsigned &  e 
)
inline

Access fct to the e-th external haloed element in this Mesh whose non-halo counterpart is held on processor p.

Definition at line 1985 of file mesh.h.

References e, and External_haloed_element_pt.

Referenced by oomph::Problem::copy_haloed_eqn_numbers_helper(), oomph::Missing_masters_functions::get_required_master_nodal_information_helper(), and oomph::Problem::synchronise_dofs().

Node* & oomph::Mesh::external_haloed_node_pt ( const unsigned &  p,
const unsigned &  j 
)
inline

Access fct to the j-th external haloed node in this Mesh whose halo external counterpart is held on processor p.

Definition at line 2126 of file mesh.h.

References External_haloed_node_pt.

Referenced by oomph::Problem::copy_haloed_eqn_numbers_helper(), oomph::Problem::remove_null_pointers_from_external_halo_node_storage(), resize_halo_nodes(), set_external_haloed_node_pt(), and oomph::Problem::synchronise_dofs().

Vector<Node*> oomph::Mesh::external_haloed_node_pt ( const unsigned &  p)
inline

Access fct to vector of external haloed node in this Mesh whose halo external counterpart is held on processor p. (read only)

Definition at line 2137 of file mesh.h.

References External_haloed_node_pt.

int oomph::Mesh::face_index_at_boundary ( const unsigned &  b,
const unsigned &  e 
) const
inline
FiniteElement* oomph::Mesh::finite_element_pt ( const unsigned &  e) const
inline

Upcast (downcast?) to FiniteElement (needed to access FiniteElement member functions).

Definition at line 477 of file mesh.h.

References e, and Element_pt.

Referenced by oomph::RefineableTriangleMesh< ELEMENT >::adapt(), oomph::TreeBasedRefineableMeshBase::adapt_mesh(), oomph::Multi_domain_functions::aux_setup_multi_domain_interaction(), oomph::BackupMeshForProjection< GEOMETRIC_ELEMENT >::BackupMeshForProjection(), oomph::BrethertonSpineMesh< ELEMENT, INTERFACE_ELEMENT >::BrethertonSpineMesh(), oomph::QuadFromTriangleMesh< ELEMENT >::build_from_scaffold(), oomph::ChannelWithLeafletMesh< ELEMENT >::ChannelWithLeafletMesh(), check_halo_schemes(), check_inverted_elements(), oomph::TriangleScaffoldMesh::check_mesh_integrity(), oomph::CollapsibleChannelMesh< ELEMENT >::CollapsibleChannelMesh(), oomph::MeshAsGeomObject::construct_it(), convert_to_boundary_node(), oomph::RefineableTriangleMesh< ELEMENT >::create_sorted_face_mesh_representation(), distribute(), doc_boundary_coordinates(), oomph::Z2ErrorEstimator::doc_flux(), oomph::FSI_functions::doc_fsi(), oomph::FpPressureAdvectionDiffusionProblem< ELEMENT >::doc_solution(), oomph::DummyErrorEstimator::DummyErrorEstimator(), oomph::EighthSphereMesh< ELEMENT >::EighthSphereMesh(), oomph::ElasticRefineableQuarterPipeMesh< ELEMENT >::ElasticRefineableQuarterPipeMesh(), elemental_dimension(), oomph::FpPressureAdvectionDiffusionProblem< ELEMENT >::FpPressureAdvectionDiffusionProblem(), oomph::FSIDrivenCavityMesh< ELEMENT >::FSIDrivenCavityMesh(), oomph::FullCircleMesh< ELEMENT >::FullCircleMesh(), oomph::GeompackQuadScaffoldMesh::GeompackQuadScaffoldMesh(), oomph::DummyErrorEstimator::get_element_errors(), oomph::MeshAsGeomObject::get_min_and_max_coordinates(), oomph::NavierStokesSchurComplementPreconditioner::get_pressure_advection_diffusion_matrix(), oomph::Problem::load_balance(), max_and_min_element_size(), oomph::BrethertonSpineMesh< ELEMENT, INTERFACE_ELEMENT >::nfree_surface_spines(), nodal_dimension(), oomph::LinearElasticitySmoothMesh< LINEAR_ELASTICITY_ELEMENT >::operator()(), oomph::PoissonSmoothMesh< POISSON_ELEMENT >::operator()(), oomph::TreeBasedRefineableMeshBase::p_adapt_mesh(), oomph::ProjectionProblem< PROJECTABLE_ELEMENT >::pin_all(), oomph::FpPressureAdvectionDiffusionProblem< ELEMENT >::pin_all_non_pressure_dofs(), oomph::MGSolver< DIM >::plot(), oomph::PMLQuadMeshBase< ELEMENT >::pml_locate_zeta(), oomph::PMLCornerQuadMesh< ELEMENT >::PMLCornerQuadMesh(), oomph::PMLQuadMesh< ELEMENT >::PMLQuadMesh(), oomph::ProjectionProblem< PROJECTABLE_ELEMENT >::project(), prune_halo_elements_and_nodes(), oomph::QuarterCircleSectorMesh< ELEMENT >::QuarterCircleSectorMesh(), oomph::QuarterTubeMesh< ELEMENT >::QuarterTubeMesh(), oomph::RectangleWithHoleMesh< ELEMENT >::RectangleWithHoleMesh(), oomph::TreeBasedRefineableMeshBase::refine_as_in_reference_mesh(), oomph::Problem::refine_distributed_base_mesh(), oomph::RefineableEighthSphereMesh< ELEMENT >::RefineableEighthSphereMesh(), oomph::RefineableFullCircleMesh< ELEMENT >::RefineableFullCircleMesh(), oomph::RefineableQuarterPipeMesh< ELEMENT >::RefineableQuarterPipeMesh(), oomph::RefineableQuarterTubeMesh< ELEMENT >::RefineableQuarterTubeMesh(), oomph::RefineableTubeMesh< ELEMENT >::RefineableTubeMesh(), oomph::FpPressureAdvectionDiffusionProblem< ELEMENT >::reset_pin_status(), oomph::NavierStokesImpedanceTractionElement< BULK_NAVIER_STOKES_ELEMENT, WOMERSLEY_ELEMENT, DIM >::set_external_data_from_navier_stokes_outflow_mesh(), oomph::MGSolver< DIM >::set_self_test_vector(), oomph::NavierStokesSchurComplementPreconditioner::setup(), oomph::AlgebraicFishMesh< ELEMENT >::setup_algebraic_node_update(), oomph::AlgebraicRefineableQuarterTubeMesh< ELEMENT >::setup_algebraic_node_update(), oomph::AlgebraicRefineableQuarterCircleSectorMesh< ELEMENT >::setup_algebraic_node_update(), oomph::LineMeshBase::setup_boundary_element_info(), oomph::QuadMeshBase::setup_boundary_element_info(), oomph::TriangleMeshBase::setup_boundary_element_info(), oomph::BrickMeshBase::setup_boundary_element_info(), oomph::TetMeshBase::setup_boundary_element_info(), oomph::MGSolver< DIM >::setup_interpolation_matrices(), oomph::HelmholtzMGPreconditioner< DIM >::setup_interpolation_matrices(), oomph::SimpleRectangularTriMesh< ELEMENT >::SimpleRectangularTriMesh(), oomph::TetgenScaffoldMesh::TetgenScaffoldMesh(), oomph::ThinLayerBrickOnTetMesh< ELEMENT >::ThinLayerBrickOnTetMesh(), total_size(), oomph::TriangleScaffoldMesh::TriangleScaffoldMesh(), oomph::TubeMesh< ELEMENT >::TubeMesh(), and oomph::WomersleyMesh< WOMERSLEY_ELEMENT >::WomersleyMesh().

void oomph::Mesh::flush_element_and_node_storage ( )
inline

Flush storage for elements and nodes by emptying the vectors that store the pointers to them. This is useful if a particular mesh is only built to generate a small part of a bigger mesh. Once the elements and nodes have been created, they are typically copied into the new mesh and the auxiliary mesh can be deleted. However, if we simply call the destructor of the auxiliary mesh, it will also wipe out the nodes and elements, because it still "thinks" it's in charge of these...

Definition at line 427 of file mesh.h.

References flush_element_storage(), and flush_node_storage().

Referenced by oomph::RefineableTriangleMesh< ELEMENT >::adapt(), oomph::BrethertonSpineMesh< ELEMENT, INTERFACE_ELEMENT >::BrethertonSpineMesh(), oomph::Problem::load_balance(), prune_halo_elements_and_nodes(), oomph::TriangleMesh< ELEMENT >::remesh_from_internal_triangulateio(), oomph::BrethertonSpineMesh< ELEMENT, INTERFACE_ELEMENT >::reposition_spines(), and oomph::Problem::~Problem().

void oomph::Mesh::flush_element_storage ( )
inline

Flush storage for elements (only) by emptying the vectors that store the pointers to them. This is useful if a particular mesh is only built to generate a small part of a bigger mesh. Once the elements and nodes have been created, they are typically copied into the new mesh and the auxiliary mesh can be deleted. However, if we simply call the destructor of the auxiliary mesh, it will also wipe out the nodes and elements, because it still "thinks" it's in charge of these...

Definition at line 443 of file mesh.h.

References Element_pt.

Referenced by distribute(), and flush_element_and_node_storage().

void oomph::Mesh::flush_node_storage ( )
inline

Flush storage for nodes (only) by emptying the vectors that store the pointers to them.

Definition at line 450 of file mesh.h.

References Node_pt.

Referenced by flush_element_and_node_storage(), and oomph::RefineableTriangleMesh< ELEMENT >::snap_nodes_onto_boundary().

void oomph::Mesh::get_all_halo_data ( std::map< unsigned, double * > &  map_of_halo_data)

Get all the halo data stored in the mesh and add pointers to the data to the map, indexed by global equation number.

Get all the halo data stored in the mesh and add pointers to the data to the map, indexed by global equation number

Repeat for the external data

Definition at line 4438 of file mesh.cc.

References oomph::GeneralisedElement::add_internal_value_pt_to_map(), e, External_halo_element_pt, External_halo_node_pt, Halo_node_pt, Root_halo_element_pt, oomph::Tree::stick_leaves_into_vector(), and oomph::RefineableElement::tree_pt().

Referenced by oomph::Problem::get_all_halo_data().

void oomph::Mesh::get_efficiency_of_mesh_distribution ( double &  av_efficiency,
double &  max_efficiency,
double &  min_efficiency 
)

Get efficiency of mesh distribution: In an ideal distribution without halo overhead, each processor would only hold its own elements. Efficieny per processor = (number of non-halo elements)/ (total number of elements).

Get efficiency of mesh distribution: In an ideal distribution without halo overhead, each processor would only hold its own elements. Efficieny per processor = (number of non-halo elements)/ (total number of elements).

Definition at line 6070 of file mesh.cc.

References Comm_pt, halo_element_pt(), i, and nelement().

void oomph::Mesh::get_external_halo_node_pt ( Vector< Node * > &  external_halo_node_pt)
inline

Get vector of pointers to all external halo nodes.

Definition at line 2010 of file mesh.h.

References External_halo_node_pt, and nexternal_halo_node().

Referenced by node_update().

void oomph::Mesh::get_halo_node_stats ( double &  av_number,
unsigned &  max_number,
unsigned &  min_number 
)

Get halo node stats for this distributed mesh: Average/max/min number of halo nodes over all processors. Careful: Involves MPI Broadcasts and must therefore be called on all processors!

Get halo node stats for this distributed mesh: Average/max/min number of halo nodes over all processors. Careful: Involves MPI Broadcasts and must therefore be called on all processors!

Definition at line 4534 of file mesh.cc.

References Comm_pt, i, and nhalo_node().

void oomph::Mesh::get_haloed_node_stats ( double &  av_number,
unsigned &  max_number,
unsigned &  min_number 
)

Get haloed node stats for this distributed mesh: Average/max/min number of haloed nodes over all processors. Careful: Involves MPI Broadcasts and must therefore be called on all processors!

Get haloed node stats for this distributed mesh: Average/max/min number of haloed nodes over all processors. Careful: Involves MPI Broadcasts and must therefore be called on all processors!

Definition at line 4589 of file mesh.cc.

References Comm_pt, i, and nhaloed_node().

void oomph::Mesh::get_node_reordering ( Vector< Node * > &  reordering,
const bool &  use_old_ordering = true 
) const
virtual

Get a reordering of the nodes in the order in which they appear in elements – can be overloaded for more efficient re-ordering.

Get a vector of the nodes in the order in which they are encountered when stepping through the elements (similar to reorder_nodes() but without changing the mesh's node vector).

Definition at line 500 of file mesh.cc.

References oomph::checked_dynamic_cast(), e, element_pt(), i, nelement(), nnode(), oomph::FiniteElement::nnode(), oomph::NodeOrdering::node_global_position_comparison(), node_pt(), and oomph::FiniteElement::node_pt().

Referenced by dump(), and reorder_nodes().

void oomph::Mesh::get_shared_node_pt ( const unsigned &  p,
Vector< Node * > &  shared_node_pt 
)
inline
Node* oomph::Mesh::get_some_non_boundary_node ( ) const
inline

Find a node not on any boundary in mesh_pt (useful for pinning a single node in a purely Neumann problem so that it is fully determined).

Definition at line 832 of file mesh.h.

References nnode(), and node_pt().

Vector<GeneralisedElement*> oomph::Mesh::halo_element_pt ( const unsigned &  p)
inline
Node* oomph::Mesh::halo_node_pt ( const unsigned &  p,
const unsigned &  j 
)
inline

Access fct to the j-th halo node in this Mesh whose non-halo counterpart is held on processor p.

Definition at line 1616 of file mesh.h.

References Halo_node_pt.

Referenced by check_halo_schemes(), oomph::Problem::copy_haloed_eqn_numbers_helper(), doc_mesh_distribution(), resize_halo_nodes(), oomph::Problem::synchronise_dofs(), and synchronise_shared_nodes().

Vector<GeneralisedElement*> oomph::Mesh::haloed_element_pt ( const unsigned &  p)
inline
Node* oomph::Mesh::haloed_node_pt ( const unsigned &  p,
const unsigned &  j 
)
inline

Access fct to the j-th haloed node in this Mesh whose halo counterpart is held on processor p.

Definition at line 1712 of file mesh.h.

References Haloed_node_pt.

Referenced by check_halo_schemes(), oomph::Problem::copy_haloed_eqn_numbers_helper(), doc_mesh_distribution(), resize_halo_nodes(), oomph::Problem::synchronise_dofs(), and synchronise_shared_nodes().

bool oomph::Mesh::is_mesh_distributed ( ) const
inline
void oomph::Mesh::max_and_min_element_size ( double &  max_size,
double &  min_size 
)
inline

Determine max and min area for all FiniteElements in the mesh (non-FiniteElements are ignored)

Definition at line 676 of file mesh.h.

References e, finite_element_pt(), and nelement().

void oomph::Mesh::merge_meshes ( const Vector< Mesh * > &  sub_mesh_pt)

Merge meshes. Note: This simply merges the meshes' elements and nodes (ignoring duplicates; no boundary information etc. is created).

Merge meshes. Note: This simply merges the meshes' elements and nodes (ignoring duplicates; no boundary information etc. is created).

Definition at line 69 of file mesh.cc.

References Boundary_node_pt, boundary_node_pt(), e, Element_pt, Lookup_for_elements_next_boundary_is_setup, and Node_pt.

Referenced by Mesh(), oomph::Problem::rebuild_global_mesh(), and oomph::SolidMesh::SolidMesh().

unsigned oomph::Mesh::nboundary ( ) const
inline

Return number of boundaries.

Definition at line 806 of file mesh.h.

References Boundary_node_pt.

Referenced by oomph::RefineableTriangleMesh< ELEMENT >::adapt(), oomph::TreeBasedRefineableMeshBase::adapt_mesh(), oomph::QuadFromTriangleMesh< ELEMENT >::build_from_scaffold(), oomph::CollapsibleChannelMesh< ELEMENT >::CollapsibleChannelMesh(), copy_boundary_node_data_from_nodes(), oomph::TwoDimensionalPMLHelper::create_bottom_left_pml_mesh(), oomph::TwoDimensionalPMLHelper::create_bottom_pml_mesh(), oomph::TwoDimensionalPMLHelper::create_bottom_right_pml_mesh(), oomph::TwoDimensionalPMLHelper::create_left_pml_mesh(), oomph::TwoDimensionalPMLHelper::create_right_pml_mesh(), oomph::TwoDimensionalPMLHelper::create_top_left_pml_mesh(), oomph::TwoDimensionalPMLHelper::create_top_pml_mesh(), oomph::TwoDimensionalPMLHelper::create_top_right_pml_mesh(), delete_all_external_storage(), distribute(), doc_mesh_distribution(), oomph::TriangleMeshBase::dump_triangulateio(), oomph::FSIDrivenCavityMesh< ELEMENT >::FSIDrivenCavityMesh(), oomph::NavierStokesSchurComplementPreconditioner::get_pressure_advection_diffusion_matrix(), oomph::Missing_masters_functions::get_required_master_nodal_information_helper(), oomph::Multi_domain_functions::get_required_master_nodal_information_helper(), oomph::Missing_masters_functions::get_required_nodal_information_helper(), oomph::Multi_domain_functions::get_required_nodal_information_helper(), oomph::NonLinearElasticitySmoothMesh< ELEMENT >::operator()(), output_boundaries(), output_boundaries_coordinates(), oomph::TreeBasedRefineableMeshBase::p_adapt_mesh(), prune_dead_nodes(), oomph::TriangleMesh< ELEMENT >::remesh_from_internal_triangulateio(), oomph::TriangleMeshBase::remesh_from_triangulateio(), oomph::LineMeshBase::setup_boundary_element_info(), oomph::QuadMeshBase::setup_boundary_element_info(), oomph::TriangleMeshBase::setup_boundary_element_info(), oomph::BrickMeshBase::setup_boundary_element_info(), oomph::TetMeshBase::setup_boundary_element_info(), oomph::UnstructuredTwoDMeshGeometryBase::snap_nodes_onto_geometric_objects(), oomph::SolidTetMesh< ELEMENT >::SolidTetMesh(), oomph::TetgenMesh< ELEMENT >::TetgenMesh(), oomph::TriangleMesh< ELEMENT >::TriangleMesh(), and oomph::FpPressureAdvectionDiffusionProblem< ELEMENT >::validate().

unsigned oomph::Mesh::nboundary_element ( const unsigned &  b) const
inline
unsigned long oomph::Mesh::nboundary_node ( const unsigned &  ibound) const
inline
unsigned oomph::Mesh::ndof_types ( ) const

Return number of dof types in mesh.

Get the number of dof types in the mesh from the first element of the mesh. If MPI is on then also do some consistency checks between processors. Careful: Involves MPI Broadcasts and must therefore be called on all processors!

Definition at line 8415 of file mesh.cc.

References Comm_pt, element_pt(), i, is_mesh_distributed(), and nelement().

Referenced by oomph::BlockPreconditioner< CRDoubleMatrix >::ndof_types_in_mesh().

unsigned long oomph::Mesh::nelement ( ) const
inline

Return number of elements in the mesh.

Definition at line 587 of file mesh.h.

References Element_pt.

Referenced by oomph::IMRByBDF::actions_after_timestep(), oomph::TreeBasedRefineableMeshBase::adapt(), oomph::RefineableTriangleMesh< ELEMENT >::adapt(), oomph::Problem::adapt(), oomph::TreeBasedRefineableMeshBase::adapt_mesh(), oomph::PeriodicOrbitAssemblyHandler< NNODE_1D >::adapt_temporal_mesh(), oomph::NavierStokesSchurComplementPreconditioner::assemble_inv_press_and_veloc_mass_matrix_diagonal(), oomph::PressureBasedSolidLSCPreconditioner::assemble_mass_matrix_diagonal(), oomph::PeriodicOrbitTemporalMesh< oomph::SpectralPeriodicOrbitElement< NNODE_1D > >::assemble_residuals(), oomph::PeriodicOrbitTemporalMesh< oomph::SpectralPeriodicOrbitElement< NNODE_1D > >::assemble_residuals_and_jacobian(), oomph::Problem::assign_eqn_numbers(), assign_initial_values_impulsive(), oomph::Multi_domain_functions::aux_setup_multi_domain_interaction(), oomph::SolidICProblem::backup_original_state(), oomph::BackupMeshForProjection< GEOMETRIC_ELEMENT >::BackupMeshForProjection(), oomph::BrethertonSpineMesh< ELEMENT, INTERFACE_ELEMENT >::BrethertonSpineMesh(), oomph::QuadFromTriangleMesh< ELEMENT >::build_from_scaffold(), calculate_predictions(), check_halo_schemes(), check_inverted_elements(), oomph::TriangleScaffoldMesh::check_mesh_integrity(), oomph::TreeBasedRefineableMeshBase::classify_halo_and_haloed_nodes(), classify_halo_and_haloed_nodes(), oomph::CollapsibleChannelMesh< ELEMENT >::CollapsibleChannelMesh(), oomph::MeshAsGeomObject::construct_it(), convert_to_boundary_node(), oomph::Problem::copy(), oomph::TwoDimensionalPMLHelper::create_bottom_left_pml_mesh(), oomph::TwoDimensionalPMLHelper::create_bottom_pml_mesh(), oomph::TwoDimensionalPMLHelper::create_bottom_right_pml_mesh(), oomph::Multi_domain_functions::create_external_halo_elements(), oomph::TwoDimensionalPMLHelper::create_left_pml_mesh(), oomph::TwoDimensionalPMLHelper::create_right_pml_mesh(), oomph::RefineableTriangleMesh< ELEMENT >::create_sorted_face_mesh_representation(), oomph::TwoDimensionalPMLHelper::create_top_left_pml_mesh(), oomph::TwoDimensionalPMLHelper::create_top_pml_mesh(), oomph::TwoDimensionalPMLHelper::create_top_right_pml_mesh(), oomph::RefineableTriangleMesh< ELEMENT >::create_unsorted_face_mesh_representation(), oomph::Problem::disable_mass_matrix_reuse(), distribute(), oomph::Problem::distribute(), oomph::SolidHelpers::doc_2D_principal_stress(), doc_boundary_coordinates(), oomph::Problem::doc_errors(), oomph::Z2ErrorEstimator::doc_flux(), oomph::FSI_functions::doc_fsi(), doc_mesh_distribution(), does_pointer_correspond_to_mesh_data(), oomph::DummyErrorEstimator::DummyErrorEstimator(), dump(), oomph::ElasticRefineableQuarterPipeMesh< ELEMENT >::ElasticRefineableQuarterPipeMesh(), elemental_dimension(), oomph::Problem::enable_mass_matrix_reuse(), oomph::NetFluxControlElement::fill_in_generic_residual_contribution_flux_control(), oomph::FoldHandler::FoldHandler(), oomph::FSIDrivenCavityMesh< ELEMENT >::FSIDrivenCavityMesh(), oomph::Problem::get_data_to_be_sent_during_load_balancing(), oomph::Multi_domain_functions::get_dim_helper(), get_efficiency_of_mesh_distribution(), oomph::Z2ErrorEstimator::get_element_errors(), oomph::DummyErrorEstimator::get_element_errors(), oomph::Problem::get_flat_packed_refinement_pattern_for_load_balancing(), oomph::ImmersedRigidBodyElement::get_force_and_torque(), oomph::Problem::get_hessian_vector_products(), oomph::Problem::get_inverse_mass_matrix_times_residuals(), oomph::Problem::get_jacobian(), oomph::MeshAsGeomObject::get_min_and_max_coordinates(), get_node_reordering(), oomph::NavierStokesSchurComplementPreconditioner::get_pressure_advection_diffusion_matrix(), oomph::TreeBasedRefineableMeshBase::get_refinement_levels(), oomph::FoldHandler::get_residuals(), oomph::HopfHandler::get_residuals(), oomph::Problem::get_residuals(), oomph::HopfHandler::HopfHandler(), oomph::ImposeFluxForWomersleyElement< DIM >::ImposeFluxForWomersleyElement(), oomph::DGMesh::limit_slopes(), oomph::Problem::load_balance(), oomph::Multi_domain_functions::locate_zeta_for_local_coordinates(), oomph::MacroElementNodeUpdateChannelWithLeafletMesh< ELEMENT >::MacroElementNodeUpdateChannelWithLeafletMesh(), oomph::MacroElementNodeUpdateCollapsibleChannelMesh< ELEMENT >::MacroElementNodeUpdateCollapsibleChannelMesh(), oomph::MacroElementNodeUpdateRefineableFishMesh< ELEMENT >::MacroElementNodeUpdateRefineableFishMesh(), max_and_min_element_size(), oomph::HelmholtzMGPreconditioner< DIM >::maximum_edge_width(), ndof_types(), oomph::NetFluxControlElement::NetFluxControlElement(), nnon_halo_element(), nodal_dimension(), node_update(), oomph::ImmersedRigidBodyElement::node_update_adjacent_fluid_elements(), oomph::NonLinearElasticitySmoothMesh< ELEMENT >::operator()(), oomph::LinearElasticitySmoothMesh< LINEAR_ELASTICITY_ELEMENT >::operator()(), oomph::PoissonSmoothMesh< POISSON_ELEMENT >::operator()(), oomph::PeriodicOrbitTemporalMesh< oomph::SpectralPeriodicOrbitElement< NNODE_1D > >::orbit_output(), oomph::PeriodicOrbitAssemblyHandler< NNODE_1D >::orbit_output(), output_boundaries_coordinates(), oomph::TreeBasedRefineableMeshBase::p_adapt(), oomph::Problem::p_adapt(), oomph::TreeBasedRefineableMeshBase::p_adapt_mesh(), oomph::TreeBasedRefineableMeshBase::p_refine_uniformly(), oomph::TreeBasedRefineableMeshBase::p_unrefine_uniformly(), oomph::METIS::partition_distributed_mesh(), oomph::METIS::partition_mesh(), oomph::ProjectionProblem< PROJECTABLE_ELEMENT >::pin_all(), oomph::FpPressureAdvectionDiffusionProblem< ELEMENT >::pin_all_non_pressure_dofs(), oomph::NavierStokesSchurComplementPreconditioner::pin_all_non_pressure_dofs(), oomph::ProjectionProblem< PROJECTABLE_ELEMENT >::pin_dofs_of_field(), oomph::PitchForkHandler::PitchForkHandler(), oomph::MGSolver< DIM >::plot(), oomph::PMLCornerQuadMesh< ELEMENT >::PMLCornerQuadMesh(), oomph::PMLQuadMesh< ELEMENT >::PMLQuadMesh(), oomph::WomersleyImpedanceTubeBase< WOMERSLEY_ELEMENT, DIM >::precompute_aux_integrals(), oomph::ProjectionProblem< PROJECTABLE_ELEMENT >::project(), prune_halo_elements_and_nodes(), oomph::Problem::prune_halo_elements_and_nodes(), oomph::QuarterCircleSectorMesh< ELEMENT >::QuarterCircleSectorMesh(), oomph::QuarterPipeMesh< ELEMENT >::QuarterPipeMesh(), read(), oomph::Problem::read(), oomph::Problem::recompute_load_balanced_assembly(), oomph::TreeBasedRefineableMeshBase::refine_as_in_reference_mesh(), oomph::Problem::refine_distributed_base_mesh(), oomph::TreeBasedRefineableMeshBase::refine_uniformly(), oomph::RefineableEighthSphereMesh< ELEMENT >::RefineableEighthSphereMesh(), oomph::RefineableTwoDAnnularMesh< ELEMENT >::RefineableTwoDAnnularMesh(), oomph::TriangleMesh< ELEMENT >::remesh_from_internal_triangulateio(), oomph::Problem::remove_duplicate_data(), oomph::HSL_MA42::reorder_elements(), oomph::BrethertonSpineMesh< ELEMENT, INTERFACE_ELEMENT >::reposition_spines(), oomph::SolidICProblem::reset_original_state(), oomph::FpPressureAdvectionDiffusionProblem< ELEMENT >::reset_pin_status(), oomph::NavierStokesSchurComplementPreconditioner::reset_pin_status(), oomph::AugmentedBlockFoldLinearSolver::resolve(), oomph::AugmentedBlockPitchForkLinearSolver::resolve(), set_consistent_pinned_values_for_continuation(), oomph::ProjectionProblem< PROJECTABLE_ELEMENT >::set_coordinate_for_projection(), oomph::ProjectionProblem< PROJECTABLE_ELEMENT >::set_current_field_for_projection(), oomph::Problem::set_default_first_and_last_element_for_assembly(), oomph::ImmersedRigidBodyElement::set_drag_mesh(), set_elemental_internal_time_stepper(), oomph::NavierStokesImpedanceTractionElement< BULK_NAVIER_STOKES_ELEMENT, WOMERSLEY_ELEMENT, DIM >::set_external_data_from_navier_stokes_outflow_mesh(), oomph::ProjectionProblem< PROJECTABLE_ELEMENT >::set_lagrangian_coordinate_for_projection(), oomph::SolidICProblem::set_newmark_initial_condition_consistently(), oomph::Problem::set_pinned_values_to_zero(), oomph::MGSolver< DIM >::set_self_test_vector(), oomph::BiharmonicProblem< DIM >::set_source_function(), oomph::ProjectionProblem< PROJECTABLE_ELEMENT >::set_time_level_for_projection(), oomph::AlgebraicRefineableQuarterTubeMesh< ELEMENT >::setup_algebraic_node_update(), oomph::RefineableLineMesh< oomph::SpectralPeriodicOrbitElement< NNODE_1D > >::setup_binary_tree_forest(), oomph::LineMeshBase::setup_boundary_element_info(), oomph::QuadMeshBase::setup_boundary_element_info(), oomph::TriangleMeshBase::setup_boundary_element_info(), oomph::BrickMeshBase::setup_boundary_element_info(), oomph::TetMeshBase::setup_boundary_element_info(), oomph::Problem::setup_dof_halo_scheme(), oomph::Problem::setup_element_count_per_dof(), oomph::DGMesh::setup_face_neighbour_info(), oomph::MGSolver< DIM >::setup_interpolation_matrices(), oomph::HelmholtzMGPreconditioner< DIM >::setup_interpolation_matrices(), oomph::MacroElementNodeUpdateRefineableQuarterTubeMesh< ELEMENT >::setup_macro_element_node_update(), oomph::MacroElementNodeUpdateRefineableQuarterCircleSectorMesh< ELEMENT >::setup_macro_element_node_update(), oomph::RefineableBrickMesh< ELEMENT >::setup_octree_forest(), oomph::Z2ErrorEstimator::setup_patches(), oomph::SolidICProblem::setup_problem(), oomph::RefineableQuadMesh< ELEMENT >::setup_quadtree_forest(), shift_time_values(), oomph::HSL_MA42::solve(), oomph::AugmentedBlockFoldLinearSolver::solve(), oomph::AugmentedBlockPitchForkLinearSolver::solve(), oomph::BlockHopfLinearSolver::solve(), oomph::HSL_MA42::solve_for_one_dof(), oomph::BlockHopfLinearSolver::solve_for_two_rhs(), oomph::Problem::sparse_assemble_row_or_column_compressed_with_lists(), oomph::Problem::sparse_assemble_row_or_column_compressed_with_maps(), oomph::Problem::sparse_assemble_row_or_column_compressed_with_two_arrays(), oomph::Problem::sparse_assemble_row_or_column_compressed_with_two_vectors(), oomph::Problem::sparse_assemble_row_or_column_compressed_with_vectors_of_pairs(), oomph::Problem::synchronise_eqn_numbers(), total_size(), oomph::ImposeFluxForWomersleyElement< DIM >::total_volume_flux(), oomph::NavierStokesImpedanceTractionElement< BULK_NAVIER_STOKES_ELEMENT, WOMERSLEY_ELEMENT, DIM >::total_volume_flux_into_downstream_tube(), oomph::WomersleyImpedanceTubeBase< WOMERSLEY_ELEMENT, DIM >::total_volume_flux_into_impedance_tube(), oomph::METIS::uniform_partition_mesh(), oomph::ProjectionProblem< PROJECTABLE_ELEMENT >::unpin_all(), oomph::ProjectionProblem< PROJECTABLE_ELEMENT >::unpin_dofs_of_field(), oomph::TreeBasedRefineableMeshBase::unrefine_uniformly(), oomph::FpPressureAdvectionDiffusionProblem< ELEMENT >::validate(), oomph::WomersleyImpedanceTubeBase< WOMERSLEY_ELEMENT, DIM >::WomersleyImpedanceTubeBase(), oomph::WomersleyMesh< WOMERSLEY_ELEMENT >::WomersleyMesh(), and oomph::WomersleyProblem< ELEMENT, DIM >::WomersleyProblem().

unsigned oomph::Mesh::nexternal_halo_element ( )
inline
unsigned oomph::Mesh::nexternal_halo_element ( const unsigned &  p)
inline

Number of external halo elements in this Mesh whose non-halo counterpart is held on processor p.

Definition at line 1927 of file mesh.h.

References External_halo_element_pt.

unsigned oomph::Mesh::nexternal_halo_node ( )
inline
unsigned oomph::Mesh::nexternal_halo_node ( const unsigned &  p)
inline

Number of external halo nodes in this Mesh whose non-halo (external) counterpart is held on processor p.

Definition at line 2041 of file mesh.h.

References External_halo_node_pt.

unsigned oomph::Mesh::nexternal_haloed_element ( )
inline
unsigned oomph::Mesh::nexternal_haloed_element ( const unsigned &  p)
inline

Number of external haloed elements in this Mesh whose non-halo counterpart is held on processor p.

Definition at line 1971 of file mesh.h.

References External_haloed_element_pt.

unsigned oomph::Mesh::nexternal_haloed_node ( )
inline
unsigned oomph::Mesh::nexternal_haloed_node ( const unsigned &  p)
inline

Number of external haloed nodes in this Mesh whose halo (external) counterpart is held on processor p.

Definition at line 2112 of file mesh.h.

References External_haloed_node_pt.

unsigned oomph::Mesh::nhalo_node ( )
inline
unsigned oomph::Mesh::nhalo_node ( const unsigned &  p)
inline

Number of halo nodes in this Mesh whose non-halo counterpart is held on processor p.

Definition at line 1594 of file mesh.h.

References Halo_node_pt.

unsigned oomph::Mesh::nhaloed_node ( )
inline
unsigned oomph::Mesh::nhaloed_node ( const unsigned &  p)
inline

Number of haloed nodes in this Mesh whose haloed counterpart is held on processor p.

Definition at line 1698 of file mesh.h.

References Haloed_node_pt.

unsigned long oomph::Mesh::nnode ( ) const
inline

Return number of nodes in the mesh.

Definition at line 590 of file mesh.h.

References Node_pt.

Referenced by oomph::IMRByBDF::actions_after_timestep(), oomph::NonLinearElasticitySmoothMesh< ELEMENT >::actions_before_newton_solve(), oomph::RefineableTriangleMesh< ELEMENT >::adapt(), oomph::TreeBasedRefineableMeshBase::adapt_mesh(), oomph::PeriodicOrbitAssemblyHandler< NNODE_1D >::adapt_temporal_mesh(), assign_initial_values_impulsive(), oomph::Multi_domain_functions::aux_setup_multi_domain_interaction(), oomph::NonLinearElasticitySmoothMesh< ELEMENT >::backup(), oomph::SolidICProblem::backup_original_state(), oomph::BackupMeshForProjection< GEOMETRIC_ELEMENT >::BackupMeshForProjection(), oomph::BrethertonSpineMesh< ELEMENT, INTERFACE_ELEMENT >::BrethertonSpineMesh(), calculate_predictions(), check_for_repeated_nodes(), oomph::TriangleScaffoldMesh::check_mesh_integrity(), classify_halo_and_haloed_nodes(), oomph::CollapsibleChannelMesh< ELEMENT >::CollapsibleChannelMesh(), oomph::TreeBasedRefineableMeshBase::complete_hanging_nodes(), oomph::AddedMainNumberingLookup::construct_added_to_main_mapping(), oomph::MeshAsGeomObject::construct_it(), oomph::Problem::copy(), copy_boundary_node_data_from_nodes(), delete_all_external_storage(), distribute(), oomph::FSI_functions::doc_fsi(), doc_mesh_distribution(), oomph::FpPressureAdvectionDiffusionProblem< ELEMENT >::doc_solution(), does_pointer_correspond_to_mesh_data(), dump(), oomph::ElasticRectangularQuadMesh< ELEMENT >::ElasticRectangularQuadMesh(), oomph::FSIDrivenCavityMesh< ELEMENT >::FSIDrivenCavityMesh(), oomph::Z2ErrorEstimator::get_element_errors(), get_node_reordering(), get_some_non_boundary_node(), oomph::MacroElementNodeUpdateMesh::node_update(), node_update(), oomph::AlgebraicMesh::node_update(), oomph::NonLinearElasticitySmoothMesh< ELEMENT >::operator()(), oomph::LinearElasticitySmoothMesh< LINEAR_ELASTICITY_ELEMENT >::operator()(), oomph::PoissonSmoothMesh< POISSON_ELEMENT >::operator()(), oomph::TreeBasedRefineableMeshBase::p_adapt_mesh(), oomph::ProjectionProblem< PROJECTABLE_ELEMENT >::pin_all(), oomph::ProjectionProblem< PROJECTABLE_ELEMENT >::pin_dofs_of_coordinate(), oomph::PMLQuadMeshBase< ELEMENT >::pml_locate_zeta(), oomph::PMLCornerQuadMesh< ELEMENT >::PMLCornerQuadMesh(), oomph::PMLQuadMesh< ELEMENT >::PMLQuadMesh(), oomph::ProjectionProblem< PROJECTABLE_ELEMENT >::project(), prune_dead_nodes(), prune_halo_elements_and_nodes(), read(), oomph::TriangleMesh< ELEMENT >::remesh_from_internal_triangulateio(), reorder_nodes(), oomph::NonLinearElasticitySmoothMesh< ELEMENT >::reset(), oomph::SolidICProblem::reset_original_state(), oomph::FpPressureAdvectionDiffusionProblem< ELEMENT >::reset_pin_status(), oomph::NavierStokesSchurComplementPreconditioner::reset_pin_status(), oomph::ProjectionProblem< PROJECTABLE_ELEMENT >::restore_positions(), scale_mesh(), oomph::AlgebraicMesh::self_test(), set_consistent_pinned_values_for_continuation(), oomph::SolidMesh::set_lagrangian_nodal_coordinates(), oomph::SolidICProblem::set_newmark_initial_condition_consistently(), oomph::SolidICProblem::set_newmark_initial_condition_directly(), set_nodal_time_stepper(), oomph::Problem::set_pinned_values_to_zero(), oomph::MGSolver< DIM >::setup_interpolation_matrices_unstructured(), oomph::HelmholtzMGPreconditioner< DIM >::setup_interpolation_matrices_unstructured(), oomph::SolidICProblem::setup_problem(), shift_time_values(), oomph::ProjectionProblem< PROJECTABLE_ELEMENT >::store_positions(), oomph::Problem::synchronise_eqn_numbers(), oomph::TriangleScaffoldMesh::TriangleScaffoldMesh(), oomph::ProjectionProblem< PROJECTABLE_ELEMENT >::unpin_all(), oomph::ProjectionProblem< PROJECTABLE_ELEMENT >::unpin_dofs_of_coordinate(), oomph::TriangleMesh< ELEMENT >::update_triangulateio(), and oomph::WomersleyMesh< WOMERSLEY_ELEMENT >::WomersleyMesh().

unsigned oomph::Mesh::nnon_halo_element ( )
inline

Total number of non-halo elements in this mesh (Costly call computes result on the fly)

Definition at line 1522 of file mesh.h.

References e, element_pt(), and nelement().

Referenced by oomph::Problem::load_balance().

unsigned oomph::Mesh::nodal_dimension ( ) const

Return number of nodal dimension in mesh.

Get the number of nodal dimension in the mesh from the first element of the mesh. If MPI is on then also do some consistency checks between processors. Careful: Involves MPI Broadcasts and must therefore be called on all processors!

Definition at line 8699 of file mesh.cc.

References Comm_pt, finite_element_pt(), i, nelement(), and oomph::FiniteElement::nodal_dimension().

Node* & oomph::Mesh::node_pt ( const unsigned long &  n)
inline

Return pointer to global node n.

Definition at line 456 of file mesh.h.

References Node_pt.

Referenced by oomph::IMRByBDF::actions_after_timestep(), oomph::RefineableTriangleMesh< ELEMENT >::adapt(), oomph::TreeBasedRefineableMeshBase::adapt_mesh(), oomph::PeriodicOrbitAssemblyHandler< NNODE_1D >::adapt_temporal_mesh(), oomph::SolidICProblem::backup_original_state(), oomph::BrethertonSpineMesh< ELEMENT, INTERFACE_ELEMENT >::BrethertonSpineMesh(), check_for_repeated_nodes(), oomph::TriangleScaffoldMesh::check_mesh_integrity(), classify_halo_and_haloed_nodes(), oomph::CollapsibleChannelMesh< ELEMENT >::CollapsibleChannelMesh(), oomph::TreeBasedRefineableMeshBase::complete_hanging_nodes(), oomph::AddedMainNumberingLookup::construct_added_to_main_mapping(), oomph::MeshAsGeomObject::construct_it(), oomph::Missing_masters_functions::construct_new_external_halo_master_node_helper(), oomph::Missing_masters_functions::construct_new_external_halo_node_helper(), oomph::Problem::copy(), copy_boundary_node_data_from_nodes(), delete_all_external_storage(), distribute(), oomph::FSI_functions::doc_fsi(), doc_mesh_distribution(), oomph::FpPressureAdvectionDiffusionProblem< ELEMENT >::doc_solution(), oomph::EighthSphereMesh< ELEMENT >::EighthSphereMesh(), oomph::FSIDrivenCavityMesh< ELEMENT >::FSIDrivenCavityMesh(), oomph::FullCircleMesh< ELEMENT >::FullCircleMesh(), oomph::Problem::get_dofs(), oomph::Z2ErrorEstimator::get_element_errors(), get_node_reordering(), get_some_non_boundary_node(), oomph::MacroElementNodeUpdateMesh::node_update(), oomph::TreeBasedRefineableMeshBase::p_adapt_mesh(), oomph::ProjectionProblem< PROJECTABLE_ELEMENT >::pin_all(), oomph::ProjectionProblem< PROJECTABLE_ELEMENT >::pin_dofs_of_coordinate(), oomph::MGSolver< DIM >::plot(), oomph::PMLQuadMesh< ELEMENT >::PMLQuadMesh(), oomph::ProjectionProblem< PROJECTABLE_ELEMENT >::project(), prune_halo_elements_and_nodes(), oomph::QuarterTubeMesh< ELEMENT >::QuarterTubeMesh(), read(), oomph::TreeBasedRefineableMeshBase::refine_as_in_reference_mesh(), reorder_nodes(), oomph::SolidICProblem::reset_original_state(), oomph::FpPressureAdvectionDiffusionProblem< ELEMENT >::reset_pin_status(), oomph::NavierStokesSchurComplementPreconditioner::reset_pin_status(), oomph::ProjectionProblem< PROJECTABLE_ELEMENT >::restore_positions(), scale_mesh(), oomph::Problem::set_dofs(), oomph::SolidICProblem::set_newmark_initial_condition_consistently(), oomph::Problem::set_pinned_values_to_zero(), oomph::MGSolver< DIM >::set_self_test_vector(), oomph::MGSolver< DIM >::setup_interpolation_matrices_unstructured(), oomph::HelmholtzMGPreconditioner< DIM >::setup_interpolation_matrices_unstructured(), oomph::SolidICProblem::setup_problem(), oomph::SimpleCubicScaffoldTetMesh::SimpleCubicScaffoldTetMesh(), oomph::MGSolver< DIM >::solve(), oomph::ProjectionProblem< PROJECTABLE_ELEMENT >::store_positions(), oomph::Problem::synchronise_eqn_numbers(), oomph::TubeMesh< ELEMENT >::TubeMesh(), oomph::ProjectionProblem< PROJECTABLE_ELEMENT >::unpin_all(), oomph::ProjectionProblem< PROJECTABLE_ELEMENT >::unpin_dofs_of_coordinate(), and oomph::TriangleMesh< ELEMENT >::update_triangulateio().

Node* oomph::Mesh::node_pt ( const unsigned long &  n) const
inline

Return pointer to global node n (const version)

Definition at line 459 of file mesh.h.

References Node_pt.

void oomph::Mesh::node_update ( const bool &  update_all_solid_nodes = false)
virtual

Update nodal positions in response to changes in the domain shape. Uses the FiniteElement::get_x(...) function for FiniteElements and doesn't do anything for other element types. If a MacroElement pointer has been set for a FiniteElement, the MacroElement representation is used to update the nodal positions; if not get_x(...) uses the FE interpolation and thus leaves the nodal positions unchanged. Virtual, so it can be overloaded by specific meshes, such as AlgebraicMeshes or SpineMeshes. Generally, this function updates the position of all nodes in response to changes in the boundary position. However, we ignore all SolidNodes since their position is computed as part of the solution – unless the bool flag is set to true. Such calls are typically made when the initial mesh is created and/or after a mesh has been refined repeatedly before the start of the computation.

Update nodal positions in response to changes in the domain shape. Uses the FiniteElement::get_x(...) function for FiniteElements and doesn't do anything for other element types. If a MacroElement pointer has been set for a FiniteElement, the MacroElement representation is used to update the nodal positions; if not get_x(...) uses the FE interpolation and thus leaves the nodal positions unchanged. Virtual, so it can be overloaded by specific meshes, such as AlgebraicMeshes or SpineMeshes. Generally, this function updates the position of all nodes in response to changes in the boundary position. For SolidNodes it only applies the update to those SolidNodes whose position is determined by the boundary position, unless the bool flag is set to true.

Local and global (Eulerian) coordinate

Reimplemented in oomph::AlgebraicMesh, oomph::SpineMesh, oomph::AlgebraicRefineableFishMesh< ELEMENT >, oomph::AlgebraicRefineableQuarterTubeMesh< ELEMENT >, oomph::AlgebraicRefineableQuarterCircleSectorMesh< ELEMENT >, oomph::AlgebraicFishMesh< ELEMENT >, oomph::MacroElementNodeUpdateMesh, oomph::MacroElementNodeUpdateRefineableQuarterCircleSectorMesh< ELEMENT >, oomph::MacroElementNodeUpdateRefineableQuarterTubeMesh< ELEMENT >, and oomph::MacroElementNodeUpdateRefineableFishMesh< ELEMENT >.

Definition at line 290 of file mesh.cc.

References oomph::FiniteElement::dim(), e, element_pt(), External_halo_node_pt, external_halo_node_pt(), get_external_halo_node_pt(), oomph::FiniteElement::get_x(), oomph::Node::hanging_pt(), i, oomph::Node::is_hanging(), oomph::FiniteElement::local_coordinate_of_node(), oomph::HangInfo::master_node_pt(), oomph::HangInfo::master_weight(), oomph::Node::ndim(), nelement(), oomph::HangInfo::nmaster(), nnode(), oomph::FiniteElement::nnode(), Node_pt, oomph::FiniteElement::node_pt(), s, and oomph::Node::x().

Referenced by oomph::AlgebraicCollapsibleChannelMesh< ELEMENT >::AlgebraicCollapsibleChannelMesh(), oomph::ChannelWithLeafletMesh< ELEMENT >::ChannelWithLeafletMesh(), oomph::CollapsibleChannelMesh< ELEMENT >::CollapsibleChannelMesh(), oomph::SegregatableFSIProblem::extrapolate_solid_data(), oomph::PseudoElasticChannelWithLeafletMesh< ELEMENT >::PseudoElasticChannelWithLeafletMesh(), oomph::QuarterPipeMesh< ELEMENT >::QuarterPipeMesh(), and oomph::RefineableTwoDAnnularMesh< ELEMENT >::RefineableTwoDAnnularMesh().

unsigned oomph::Mesh::nroot_halo_element ( )
inline

Total number of root halo elements in this Mesh.

Definition at line 1535 of file mesh.h.

References Root_halo_element_pt.

Referenced by oomph::Multi_domain_functions::aux_setup_multi_domain_interaction(), distribute(), halo_element_pt(), and prune_halo_elements_and_nodes().

unsigned oomph::Mesh::nroot_halo_element ( const unsigned &  p)
inline

Number of root halo elements in this Mesh whose non-halo counterpart is held on processor p.

Definition at line 1549 of file mesh.h.

References Root_halo_element_pt.

unsigned oomph::Mesh::nroot_haloed_element ( )
inline

Total number of root haloed elements in this Mesh.

Definition at line 1623 of file mesh.h.

References Root_haloed_element_pt.

Referenced by oomph::Multi_domain_functions::aux_setup_multi_domain_interaction(), distribute(), haloed_element_pt(), and prune_halo_elements_and_nodes().

unsigned oomph::Mesh::nroot_haloed_element ( const unsigned &  p)
inline

Number of root haloed elements in this Mesh whose non-halo counterpart is held on processor p.

Definition at line 1636 of file mesh.h.

References Root_haloed_element_pt.

unsigned oomph::Mesh::nshared_node ( )
inline
unsigned oomph::Mesh::nshared_node ( const unsigned &  p)
inline

Number of shared nodes in this Mesh who have a counterpart on processor p.

Definition at line 1791 of file mesh.h.

References Shared_node_pt.

void oomph::Mesh::null_external_halo_node ( const unsigned &  p,
Node nod_pt 
)

Null out specified external halo node (used when deleting duplicates)

Definition at line 8226 of file mesh.cc.

References External_halo_node_pt.

Referenced by oomph::Problem::remove_duplicate_data().

void oomph::Mesh::operator= ( const Mesh )
inline

Broken assignment operator.

Definition at line 408 of file mesh.h.

References oomph::BrokenCopy::broken_assign().

void oomph::Mesh::output ( std::ostream &  outfile)
void oomph::Mesh::output ( std::ostream &  outfile,
const unsigned &  n_plot 
)

Output at f(n_plot) points in each element.

Output function for the mesh class

Loop over all elements and plot (i.e. execute the element's own output() function). Use n_plot plot points in each coordinate direction.

Definition at line 1820 of file mesh.cc.

References e, Element_pt, oomph::GeneralisedElement::is_halo(), oomph::oomph_info, oomph::FiniteElement::output(), and Output_halo_elements.

void oomph::Mesh::output ( FILE *  file_pt)

Output for all elements (C-style output)

Output function for the mesh class

Loop over all elements and plot (i.e. execute the element's own output() function) (C style output)

Definition at line 1867 of file mesh.cc.

References e, Element_pt, oomph::GeneralisedElement::is_halo(), oomph::oomph_info, oomph::FiniteElement::output(), and Output_halo_elements.

void oomph::Mesh::output ( FILE *  file_pt,
const unsigned &  n_plot 
)

Output at f(n_plot) points in each element (C-style output)

Output function for the mesh class

Loop over all elements and plot (i.e. execute the element's own output() function). Use n_plot plot points in each coordinate direction. (C style output)

Definition at line 1910 of file mesh.cc.

References e, Element_pt, oomph::GeneralisedElement::is_halo(), oomph::oomph_info, oomph::FiniteElement::output(), and Output_halo_elements.

void oomph::Mesh::output ( const std::string &  output_filename)
inline

Output for all elements.

Definition at line 938 of file mesh.h.

References output().

void oomph::Mesh::output ( const std::string &  output_filename,
const unsigned &  n_plot 
)
inline

Output at f(n_plot) points in each element.

Definition at line 947 of file mesh.h.

References output().

void oomph::Mesh::output_boundaries ( std::ostream &  outfile)

Output the nodes on the boundaries (into separate tecplot zones)

Output function for the mesh boundaries

Loop over all boundaries and dump out the coordinates of the points on the boundary (in individual tecplot zones)

Definition at line 1001 of file mesh.cc.

References Boundary_node_pt, and nboundary().

Referenced by doc_mesh_distribution(), and output_boundaries().

void oomph::Mesh::output_boundaries ( const std::string &  output_filename)
inline

Output the nodes on the boundaries (into separate tecplot zones). Specify filename

Definition at line 970 of file mesh.h.

References output_boundaries().

void oomph::Mesh::output_boundaries_coordinates ( std::ostream &  outfile)

Output the nodes on the boundaries and their respective boundary coordinates(into separate tecplot zones)

Definition at line 1025 of file mesh.cc.

References Boundary_element_pt, nboundary(), nelement(), and output_boundary_coordinates().

Referenced by output_boundaries_coordinates().

void oomph::Mesh::output_boundaries_coordinates ( const std::string &  output_filename)
inline

Output the nodes on the boundaries and their respective boundary coordinates(into separate tecplot zones)

Definition at line 1009 of file mesh.h.

References output_boundaries_coordinates().

virtual void oomph::Mesh::output_boundary_coordinates ( const unsigned &  b,
std::ostream &  outfile 
)
inlinevirtual

Output the nodes on the boundary and their respective boundary coordinates(into separate tecplot zones)

Reimplemented in oomph::TriangleMesh< ELEMENT >.

Definition at line 980 of file mesh.h.

Referenced by output_boundaries_coordinates(), and output_boundary_coordinates().

void oomph::Mesh::output_boundary_coordinates ( const unsigned &  b,
const std::string &  output_filename 
)
inline

Output the nodes on the boundary and their respective boundary coordinates(into separate tecplot zones)

Definition at line 994 of file mesh.h.

References output_boundary_coordinates().

void oomph::Mesh::output_external_halo_elements ( std::ostream &  outfile,
const unsigned &  n_plot = 5 
)
inline

Output all external halo elements.

Definition at line 1853 of file mesh.h.

References External_halo_element_pt.

Referenced by check_halo_schemes().

void oomph::Mesh::output_external_halo_elements ( const unsigned &  p,
std::ostream &  outfile,
const unsigned &  n_plot = 5 
)
inline

Output all external halo elements with processor p.

Definition at line 1866 of file mesh.h.

References e, External_halo_element_pt, and oomph::FiniteElement::output().

void oomph::Mesh::output_external_haloed_elements ( std::ostream &  outfile,
const unsigned &  n_plot = 5 
)
inline

Output all external haloed elements.

Definition at line 1883 of file mesh.h.

References External_haloed_element_pt.

Referenced by check_halo_schemes().

void oomph::Mesh::output_external_haloed_elements ( const unsigned &  p,
std::ostream &  outfile,
const unsigned &  n_plot = 5 
)
inline

Output all external haloed elements with processor p.

Definition at line 1896 of file mesh.h.

References e, External_haloed_element_pt, and oomph::FiniteElement::output().

void oomph::Mesh::output_fct ( std::ostream &  outfile,
const unsigned &  n_plot,
FiniteElement::SteadyExactSolutionFctPt  exact_soln_pt 
)

Output a given Vector function at f(n_plot) points in each element.

Output function for the mesh class

Loop over all elements and plot (i.e. execute the element's own output() function). Use n_plot plot points in each coordinate direction.

Definition at line 1953 of file mesh.cc.

References e, Element_pt, oomph::GeneralisedElement::is_halo(), oomph::oomph_info, oomph::FiniteElement::output_fct(), and Output_halo_elements.

Referenced by oomph::FpPressureAdvectionDiffusionProblem< ELEMENT >::doc_solution().

void oomph::Mesh::output_fct ( std::ostream &  outfile,
const unsigned &  n_plot,
const double &  time,
FiniteElement::UnsteadyExactSolutionFctPt  exact_soln_pt 
)

Output a given time-dep. Vector function at f(n_plot) points in each element.

Output function for the mesh class

Loop over all elements and plot (i.e. execute the element's own output() function) at time t. Use n_plot plot points in each coordinate direction.

Definition at line 1996 of file mesh.cc.

References e, Element_pt, oomph::GeneralisedElement::is_halo(), oomph::oomph_info, oomph::FiniteElement::output_fct(), and Output_halo_elements.

void oomph::Mesh::output_fct_paraview ( std::ofstream &  file_out,
const unsigned &  nplot,
FiniteElement::SteadyExactSolutionFctPt  exact_soln_pt 
) const

Output in paraview format into specified file. Breaks up each element into sub-elements for plotting purposes. We assume that all elements are of the same type (fct will break break (in paranoid mode) if paraview output fcts of the elements are inconsistent).

Output in paraview format into specified file.

Breaks up each element into sub-elements for plotting purposes. We assume that all elements are of the same type (fct will break (in paranoid mode) if paraview output fcts of the elements are inconsistent).

Definition at line 1482 of file mesh.cc.

References Element_pt, element_pt(), i, oomph::FiniteElement::nplot_points_paraview(), oomph::FiniteElement::nscalar_paraview(), oomph::FiniteElement::nsub_elements_paraview(), oomph::FiniteElement::output_paraview(), oomph::FiniteElement::scalar_name_paraview(), oomph::FiniteElement::scalar_value_fct_paraview(), oomph::FiniteElement::write_paraview_offsets(), oomph::FiniteElement::write_paraview_output_offset_information(), and oomph::FiniteElement::write_paraview_type().

void oomph::Mesh::output_paraview ( std::ofstream &  file_out,
const unsigned &  nplot 
) const

Output in paraview format into specified file. Breaks up each element into sub-elements for plotting purposes. We assume that all elements are of the same type (fct will break break (in paranoid mode) if paraview output fcts of the elements are inconsistent).

Output in paraview format into specified file.

Breaks up each element into sub-elements for plotting purposes. We assume that all elements are of the same type (fct will break (in paranoid mode) if paraview output fcts of the elements are inconsistent).

Definition at line 1184 of file mesh.cc.

References Element_pt, element_pt(), i, oomph::FiniteElement::nplot_points_paraview(), oomph::FiniteElement::nscalar_paraview(), oomph::FiniteElement::nsub_elements_paraview(), oomph::FiniteElement::output_paraview(), oomph::FiniteElement::scalar_name_paraview(), oomph::FiniteElement::scalar_value_paraview(), oomph::FiniteElement::write_paraview_offsets(), oomph::FiniteElement::write_paraview_output_offset_information(), and oomph::FiniteElement::write_paraview_type().

Vector< Node * > oomph::Mesh::prune_dead_nodes ( )

Prune nodes. Nodes that have been marked as obsolete are removed from the mesh (and its boundary-node scheme). Returns vector of pointers to deleted nodes.

Nodes that have been marked as obsolete are removed from the mesh and the its boundaries. Returns vector of pointers to deleted nodes.

Definition at line 900 of file mesh.cc.

References Boundary_node_pt, nboundary(), nnode(), and Node_pt.

Referenced by oomph::TreeBasedRefineableMeshBase::adapt_mesh(), distribute(), oomph::TreeBasedRefineableMeshBase::p_adapt_mesh(), oomph::PMLCornerQuadMesh< ELEMENT >::PMLCornerQuadMesh(), oomph::PMLQuadMesh< ELEMENT >::PMLQuadMesh(), and prune_halo_elements_and_nodes().

void oomph::Mesh::prune_halo_elements_and_nodes ( Vector< GeneralisedElement * > &  deleted_element_pt,
const bool &  report_stats = false 
)
inline

(Irreversibly) prune halo(ed) elements and nodes, usually after another round of refinement, to get rid of excessively wide halo layers. Note that the current mesh will be now regarded as the base mesh and no unrefinement relative to it will be possible once this function has been called.

Definition at line 1372 of file mesh.h.

References oomph::DocInfo::disable_doc().

Referenced by oomph::Problem::load_balance(), and oomph::Problem::prune_halo_elements_and_nodes().

void oomph::Mesh::prune_halo_elements_and_nodes ( Vector< GeneralisedElement * > &  deleted_element_pt,
DocInfo doc_info,
const bool &  report_stats 
)

(Irreversibly) prune halo(ed) elements and nodes, usually after another round of refinement, to get rid of excessively wide halo layers. Note that the current mesh will be now regarded as the base mesh and no unrefinement relative to it will be possible once this function has been called.

(Irreversibly) prune halo(ed) elements and nodes, usually after another round of refinement, to get rid of excessively wide halo layers. Note that the current mesh will be now regarded as the base mesh and no unrefinement relative to it will be possible once this function has been called.

Definition at line 5309 of file mesh.cc.

References add_element_pt(), add_node_pt(), classify_halo_and_haloed_nodes(), Comm_pt, delete_all_external_storage(), oomph::DocInfo::directory(), oomph::Global_timings::Doc_comprehensive_timings, doc_mesh_distribution(), e, finite_element_pt(), flush_element_and_node_storage(), oomph::Tree::flush_object(), oomph::TreeBasedRefineableMeshBase::get_elements_at_refinement_level(), oomph::RefineableElement::get_father_at_refinement_level(), oomph::TreeBasedRefineableMeshBase::get_refinement_levels(), oomph::TreeBasedRefineableMeshBase::get_refinement_pattern(), halo_element_pt(), haloed_element_pt(), oomph::DocInfo::is_doc_enabled(), oomph::GeneralisedElement::is_halo(), oomph::Node::is_obsolete(), oomph::GeneralisedElement::must_be_kept_as_halo(), nelement(), nhalo_node(), nhaloed_node(), nnode(), oomph::FiniteElement::nnode(), node_pt(), oomph::FiniteElement::node_pt(), nroot_halo_element(), nroot_haloed_element(), nshared_node(), oomph::DocInfo::number(), oomph::Tree::object_pt(), oomph::oomph_info, prune_dead_nodes(), oomph::RefineableElement::refinement_level(), reorder_nodes(), Root_halo_element_pt, Root_haloed_element_pt, oomph::Tree::root_pt(), oomph::Node::set_non_obsolete(), oomph::Node::set_obsolete(), setup_boundary_element_info(), oomph::TreeBasedRefineableMeshBase::setup_tree_forest(), oomph::FiniteElement::size(), oomph::Tree::stick_all_tree_nodes_into_vector(), oomph::TimingHelpers::timer(), oomph::RefineableElement::tree_pt(), and oomph::TreeBasedRefineableMeshBase::uniform_refinement_level_when_pruned().

void oomph::Mesh::read ( std::ifstream &  restart_file)
virtual
void oomph::Mesh::remove_boundary_node ( const unsigned &  b,
Node *const &  node_pt 
)

Remove the node node_pt from the b-th boundary of the mesh This function also removes the information from the Node itself

Definition at line 222 of file mesh.cc.

References Boundary_node_pt, and oomph::Node::remove_from_boundary().

Referenced by delete_all_external_storage(), and oomph::Problem::remove_duplicate_data().

void oomph::Mesh::remove_boundary_nodes ( )
void oomph::Mesh::remove_boundary_nodes ( const unsigned &  b)

Remove all information about nodes stored on the b-th boundary of the mesh.

Remove the information about nodes stored on the b-th boundary of the mesh

Definition at line 192 of file mesh.cc.

References Boundary_node_pt, boundary_node_pt(), and oomph::Node::remove_from_boundary().

void oomph::Mesh::remove_null_pointers_from_external_halo_node_storage ( )

Consolidate external halo node storage by removing nulled out pointes in external halo and haloed schemes.

Consolidate external halo node storage by removing nulled out pointes in external halo and haloed schemes

Definition at line 8246 of file mesh.cc.

References Comm_pt, External_halo_node_pt, and External_haloed_node_pt.

void oomph::Mesh::reorder_nodes ( const bool &  use_old_ordering = true)
virtual

Re-order nodes in the order in which they appear in elements – can be overloaded for more efficient re-ordering.

Reorder nodes in the order in which they are encountered when stepping through the elements

Definition at line 483 of file mesh.cc.

References get_node_reordering(), i, nnode(), and node_pt().

Referenced by oomph::TreeBasedRefineableMeshBase::adapt(), oomph::TreeBasedRefineableMeshBase::adapt_mesh(), oomph::TreeBasedRefineableMeshBase::p_adapt(), oomph::TreeBasedRefineableMeshBase::p_adapt_mesh(), prune_halo_elements_and_nodes(), and read().

virtual void oomph::Mesh::reset_boundary_element_info ( Vector< unsigned > &  ntmp_boundary_elements,
Vector< Vector< unsigned > > &  ntmp_boundary_elements_in_region,
Vector< FiniteElement * > &  deleted_elements 
)
inlinevirtual

Virtual function to perform the reset boundary elements info rutines.

Reimplemented in oomph::TriangleMesh< ELEMENT >, and oomph::TriangleMeshBase.

Definition at line 297 of file mesh.h.

Referenced by distribute().

void oomph::Mesh::resize_halo_nodes ( )

Helper function that resizes halo nodes to the same size as their non-halo counterparts if required. (A discrepancy can arise if a FaceElement that introduces additional unknowns are attached to a bulk element that shares a node with a haloed element. In that case the joint node between haloed and non-haloed element is resized on that processor but not on the one that holds the halo counterpart (because no FaceElement is attached to the halo element)

Helper function that resizes halo nodes to the same size as their non-halo counterparts if required. (A discrepancy can arise if a FaceElement that introduces additional unknowns are attached to a bulk element that shares a node with a haloed element. In that case the joint node between haloed and non-haloed element is resized on that processor but not on the one that holds the halo counterpart (because no FaceElement is attached to the halo element)

Definition at line 4126 of file mesh.cc.

References Comm_pt, oomph::Global_timings::Doc_comprehensive_timings, external_halo_node_pt(), external_haloed_node_pt(), halo_node_pt(), haloed_node_pt(), i, oomph::BoundaryNodeBase::index_of_first_value_assigned_by_face_element_pt(), is_mesh_distributed(), oomph::Node::ndim(), nexternal_halo_node(), nexternal_haloed_node(), nhalo_node(), nhaloed_node(), oomph::Data::nvalue(), oomph::oomph_info, oomph::Node::position(), oomph::Node::resize(), and oomph::TimingHelpers::timer().

Referenced by oomph::TreeBasedRefineableMeshBase::classify_halo_and_haloed_nodes(), and classify_halo_and_haloed_nodes().

Vector<GeneralisedElement*> oomph::Mesh::root_halo_element_pt ( const unsigned &  p)
inline

Vector of pointers to root halo elements in this Mesh whose non-halo counterpart is held on processor p.

Definition at line 1557 of file mesh.h.

References Root_halo_element_pt.

Referenced by halo_element_pt(), and oomph::Problem::setup_base_mesh_info_after_pruning().

GeneralisedElement* & oomph::Mesh::root_halo_element_pt ( const unsigned &  p,
const unsigned &  e 
)
inline

Access fct to the e-th root halo element in this Mesh whose non-halo counterpart is held on processor p.

Definition at line 1565 of file mesh.h.

References e, and Root_halo_element_pt.

Vector<GeneralisedElement*> oomph::Mesh::root_haloed_element_pt ( const unsigned &  p)
inline

Vector of pointers to root haloed elements in this Mesh whose non-halo counterpart is held on processor p.

Definition at line 1651 of file mesh.h.

References Root_haloed_element_pt.

Referenced by haloed_element_pt(), and oomph::Problem::setup_base_mesh_info_after_pruning().

GeneralisedElement* & oomph::Mesh::root_haloed_element_pt ( const unsigned &  p,
const unsigned &  e 
)
inline

Access fct to the e-th root haloed element in this Mesh whose non-halo counterpart is held on processor p.

Definition at line 1666 of file mesh.h.

References e, and Root_haloed_element_pt.

virtual void oomph::Mesh::scale_mesh ( const double &  factor)
inlinevirtual

Scale all nodal coordinates by given factor. Virtual so it can be overloaded in SolidMesh class where it also re-assigns the Lagrangian coordinates.

Reimplemented in oomph::SolidMesh.

Definition at line 386 of file mesh.h.

References i, oomph::Node::ndim(), nnode(), node_pt(), and oomph::Node::x().

Referenced by oomph::SolidMesh::scale_mesh().

unsigned oomph::Mesh::self_test ( )
void oomph::Mesh::set_communicator_pt ( OomphCommunicator comm_pt)
inline

Function to set communicator (mesh is assumed to be distributed if the communicator pointer is non-null). Only defined if mpi is enabled becaus Comm_pt itself is only defined when mpi is enabled.

Definition at line 1332 of file mesh.h.

References Comm_pt.

Referenced by build_face_mesh(), oomph::Problem::distribute(), and oomph::TriangleMesh< ELEMENT >::TriangleMesh().

void oomph::Mesh::set_consistent_pinned_values_for_continuation ( ContinuationStorageScheme *const &  continuation_storage_pt)

Set consistent values for pinned data in continuation.

Set the values of auxilliary data used in continuation problems when the data is pinned.

Definition at line 2184 of file mesh.cc.

References e, element_pt(), oomph::GeneralisedElement::internal_data_pt(), nelement(), oomph::GeneralisedElement::ninternal_data(), nnode(), Node_pt, oomph::ContinuationStorageScheme::set_consistent_pinned_positions(), and oomph::ContinuationStorageScheme::set_consistent_pinned_values().

Referenced by oomph::Problem::set_consistent_pinned_values_for_continuation().

void oomph::Mesh::set_elemental_internal_time_stepper ( TimeStepper *const &  time_stepper_pt,
const bool &  preserve_existing_data 
)

Set the timestepper associated with the internal data stored within elements in the meah.

Set the time stepper associated with all internal data stored in the elements in the mesh

Definition at line 2279 of file mesh.cc.

References e, element_pt(), and nelement().

Referenced by set_nodal_and_elemental_time_stepper().

void oomph::Mesh::set_external_halo_node_pt ( const unsigned &  p,
const Vector< Node * > &  external_halo_node_pt 
)
inline

Set vector of external halo node in this Mesh whose non-halo external counterpart is held on processor p.

Definition at line 2085 of file mesh.h.

References External_halo_node_pt, and external_halo_node_pt().

Referenced by oomph::Problem::remove_null_pointers_from_external_halo_node_storage().

void oomph::Mesh::set_external_haloed_node_pt ( const unsigned &  p,
const Vector< Node * > &  external_haloed_node_pt 
)
inline

Set vector of external haloed node in this Mesh whose halo external counterpart is held on processor p.

Definition at line 2151 of file mesh.h.

References External_haloed_node_pt, and external_haloed_node_pt().

Referenced by oomph::Problem::remove_null_pointers_from_external_halo_node_storage().

void oomph::Mesh::set_keep_all_elements_as_halos ( )
inline

Call this function to keep all the elements as halo elements.

Definition at line 1335 of file mesh.h.

References Keep_all_elements_as_halos.

void oomph::Mesh::set_mesh_level_time_stepper ( TimeStepper *const &  time_stepper_pt,
const bool &  preserve_existing_data 
)
virtual

Function that can be used to set any additional timestepper data stored at the Mesh (as opposed to nodal and elemental) levels. This is virtual so that it can be overloaded in the appropriate Meshes. Examples include the SpineMeshes and adaptive triangle and tet meshes.

Virtual function that should be overloaded if the mesh has any mesh level storage of the timestepper

Reimplemented in oomph::TriangleMesh< ELEMENT >, oomph::SpineMesh, and oomph::TetgenMesh< ELEMENT >.

Definition at line 2149 of file mesh.cc.

References Suppress_warning_about_empty_mesh_level_time_stepper_function.

Referenced by oomph::Problem::set_timestepper_for_all_data().

void oomph::Mesh::set_nboundary ( const unsigned &  nbound)
inline
void oomph::Mesh::set_nodal_and_elemental_time_stepper ( TimeStepper *const &  time_stepper_pt,
const bool &  preserve_existing_data 
)
inline

Set the timestepper associated with all nodal and elemental data stored in the mesh.

Definition at line 1032 of file mesh.h.

References set_elemental_internal_time_stepper(), and set_nodal_time_stepper().

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

void oomph::Mesh::set_nodal_time_stepper ( TimeStepper *const &  time_stepper_pt,
const bool &  preserve_existing_data 
)

Set the timestepper associated with the nodal data in the mesh.

Set the time stepper associated with all the nodal data in the problem

Definition at line 2261 of file mesh.cc.

References nnode(), and Node_pt.

Referenced by set_nodal_and_elemental_time_stepper().

virtual void oomph::Mesh::setup_boundary_element_info ( )
inlinevirtual
virtual void oomph::Mesh::setup_boundary_element_info ( std::ostream &  outfile)
inlinevirtual

Setup lookup schemes which establish whic elements are located next to mesh's boundaries. Doc in outfile (if it's open). (Empty virtual function – implement this for specific Mesh classes)

Reimplemented in oomph::TetMeshBase, oomph::HermiteQuadMesh< ELEMENT >, oomph::BrickMeshBase, oomph::TriangleMeshBase, oomph::QuadMeshBase, and oomph::LineMeshBase.

Definition at line 294 of file mesh.h.

void oomph::Mesh::setup_shared_node_scheme ( )
protected

Setup shared node scheme.

Setup shared node scheme: Shared node lookup scheme contains a unique correspondence between all nodes on the halo/haloed elements between two processors.

Definition at line 2455 of file mesh.cc.

References add_shared_node_pt(), Comm_pt, oomph::Global_timings::Doc_comprehensive_timings, e, halo_element_pt(), haloed_element_pt(), oomph::FiniteElement::nnode(), oomph::FiniteElement::node_pt(), oomph::oomph_info, Shared_node_pt, oomph::OomphInfo::stream_pt(), and oomph::TimingHelpers::timer().

Referenced by classify_halo_and_haloed_nodes().

Node* oomph::Mesh::shared_node_pt ( const unsigned &  p,
const unsigned &  j 
)
inline
void oomph::Mesh::shift_time_values ( )

Shift time-dependent data along for next timestep: Deal with nodal Data/positions and the element's internal Data.

Shift time-dependent data along for next timestep: Again this is achieved by looping over all data and calling the functions defined in each data object's timestepper.

Definition at line 2076 of file mesh.cc.

References e, element_pt(), nelement(), nnode(), and Node_pt.

Referenced by oomph::Problem::shift_time_values().

void oomph::Mesh::synchronise_shared_nodes ( const bool &  report_stats)

Synchronise shared node lookup schemes to cater for the the case where: (1) a certain node on the current processor is halo with proc p (i.e. its non-halo counterpart lives on processor p) (2) that node is also exists (also as a halo) on another processor (q, say) where its non-halo counter part is also known to be on processor p. However, without calling this function the current processor does not necessarily know that it shares a node with processor q. This information can be required, e.g. when synchronising hanging node schemes over all processors.

Synchronise shared node lookup schemes to cater for the the case where: (1) a certain node on the current processor is halo with proc p (i.e. its non-halo counterpart lives on processor p) (2) that node also exists (also as a halo) on another processor (q, say) where its non-halo counter part is also known to be on processor p. However, without calling this function the current processor does not necessarily know that it shares a node with processor q. This information can be required, e.g. when synchronising hanging node schemes over all processors.

Definition at line 2635 of file mesh.cc.

References add_shared_node_pt(), Comm_pt, oomph::Global_timings::Doc_comprehensive_timings, halo_node_pt(), haloed_node_pt(), i, nhalo_node(), nhaloed_node(), nshared_node(), oomph::oomph_info, Shared_node_pt, and oomph::TimingHelpers::timer().

Referenced by classify_halo_and_haloed_nodes().

double oomph::Mesh::total_size ( )
inline

Determine the sum of all "sizes" of the FiniteElements in the mesh (non-FiniteElements are ignored). This gives the length/area/volume occupied by the mesh.

Definition at line 693 of file mesh.h.

References e, finite_element_pt(), nelement(), and oomph::FiniteElement::size().

virtual unsigned oomph::Mesh::try_to_add_haloed_node_pt ( const unsigned &  p,
Node *&  nod_pt 
)
inlinevirtual

Reimplemented in oomph::RefineableTriangleMesh< ELEMENT >.

Definition at line 2211 of file mesh.h.

virtual unsigned oomph::Mesh::try_to_add_root_haloed_element_pt ( const unsigned &  p,
GeneralisedElement *&  el_pt 
)
inlinevirtual

Reimplemented in oomph::RefineableTriangleMesh< ELEMENT >.

Definition at line 2196 of file mesh.h.

void oomph::Mesh::unset_keep_all_elements_as_halos ( )
inline

Calll this function to unset the flag that keeps all elements in the mesh as halo elements.

Definition at line 1339 of file mesh.h.

References Keep_all_elements_as_halos.

Friends And Related Function Documentation

friend class Problem
friend

Problem is a friend.

Definition at line 80 of file mesh.h.

Member Data Documentation

std::vector<bool> oomph::Mesh::Boundary_coordinate_exists
protected
Vector<Vector<FiniteElement*> > oomph::Mesh::Boundary_element_pt
protected
Vector<Vector<Node*> > oomph::Mesh::Boundary_node_pt
protected

Vector of Vector of pointers to nodes on the boundaries: Boundary_node_pt(b,n). Note that this is private to force the use of the add_boundary_node() function, which ensures that the reverse look-up schemes for the nodes are set up.

Definition at line 94 of file mesh.h.

Referenced by add_boundary_node(), boundary_node_pt(), copy_boundary_node_data_from_nodes(), merge_meshes(), nboundary(), nboundary_node(), output_boundaries(), prune_dead_nodes(), remove_boundary_node(), remove_boundary_nodes(), and set_nboundary().

OomphCommunicator* oomph::Mesh::Comm_pt
protected
Steady< 0 > oomph::Mesh::Default_TimeStepper
static

Default Steady Timestepper, to be used in default arguments to Mesh constructors.

The Steady Timestepper.

Definition at line 85 of file mesh.h.

Referenced by oomph::PeriodicOrbitAssemblyHandler< NNODE_1D >::adapt_temporal_mesh().

Vector<GeneralisedElement*> oomph::Mesh::Element_pt
protected

Vector of pointers to generalised elements.

Definition at line 197 of file mesh.h.

Referenced by oomph::TreeBasedRefineableMeshBase::adapt_mesh(), add_element_pt(), assign_global_eqn_numbers(), assign_local_eqn_numbers(), oomph::BackupMeshForProjection< GEOMETRIC_ELEMENT >::BackupMeshForProjection(), oomph::BrethertonSpineMesh< ELEMENT, INTERFACE_ELEMENT >::BrethertonSpineMesh(), compute_error(), compute_norm(), convert_to_boundary_node(), describe_dofs(), describe_local_dofs(), oomph::EighthSphereMesh< ELEMENT >::EighthSphereMesh(), oomph::SpineMesh::element_node_pt(), oomph::SolidMesh::element_node_pt(), element_pt(), finite_element_pt(), flush_element_storage(), oomph::FullCircleMesh< ELEMENT >::FullCircleMesh(), oomph::GeompackQuadScaffoldMesh::GeompackQuadScaffoldMesh(), merge_meshes(), nelement(), output(), output_fct(), output_fct_paraview(), output_paraview(), oomph::QuarterCircleSectorMesh< ELEMENT >::QuarterCircleSectorMesh(), oomph::QuarterTubeMesh< ELEMENT >::QuarterTubeMesh(), oomph::RectangleWithHoleMesh< ELEMENT >::RectangleWithHoleMesh(), oomph::TriangleMesh< ELEMENT >::remesh_from_internal_triangulateio(), self_test(), oomph::SimpleCubicScaffoldTetMesh::SimpleCubicScaffoldTetMesh(), oomph::SimpleRectangularTriMesh< ELEMENT >::SimpleRectangularTriMesh(), oomph::TetgenScaffoldMesh::TetgenScaffoldMesh(), oomph::ThinLayerBrickOnTetMesh< ELEMENT >::ThinLayerBrickOnTetMesh(), oomph::TriangleScaffoldMesh::TriangleScaffoldMesh(), oomph::TubeMesh< ELEMENT >::TubeMesh(), and ~Mesh().

std::map<unsigned, Vector<GeneralisedElement*> > oomph::Mesh::External_halo_element_pt
protected

Map of vectors holding the pointers to the external halo elements.

External halo(ed) elements are created as and when they are needed to act as source elements for the particular process's mesh. The storage is wiped and rebuilt every time the mesh is refined.

Definition at line 137 of file mesh.h.

Referenced by add_external_halo_element_pt(), check_halo_schemes(), delete_all_external_storage(), external_halo_element_pt(), get_all_halo_data(), nexternal_halo_element(), output_external_halo_elements(), and oomph::TriangleMesh< ELEMENT >::remesh_from_internal_triangulateio().

std::map<unsigned, Vector<Node*> > oomph::Mesh::External_halo_node_pt
protected
std::map<unsigned, Vector<GeneralisedElement*> > oomph::Mesh::External_haloed_element_pt
protected
std::map<unsigned, Vector<Node*> > oomph::Mesh::External_haloed_node_pt
protected
Vector<Vector<int> > oomph::Mesh::Face_index_at_boundary
protected
std::map<unsigned, Vector<Node*> > oomph::Mesh::Halo_node_pt
protected

Map of vectors holding the pointers to the halo nodes.

Definition at line 117 of file mesh.h.

Referenced by add_halo_node_pt(), classify_halo_and_haloed_nodes(), get_all_halo_data(), halo_node_pt(), nhalo_node(), and oomph::TriangleMesh< ELEMENT >::remesh_from_internal_triangulateio().

std::map<unsigned, Vector<Node*> > oomph::Mesh::Haloed_node_pt
protected

Map of vectors holding the pointers to the haloed nodes.

Definition at line 120 of file mesh.h.

Referenced by add_haloed_node_pt(), classify_halo_and_haloed_nodes(), haloed_node_pt(), nhaloed_node(), and oomph::TriangleMesh< ELEMENT >::remesh_from_internal_triangulateio().

bool oomph::Mesh::Keep_all_elements_as_halos
protected

bool to indicate whether to keep all elements in a mesh as halos or not

Definition at line 152 of file mesh.h.

Referenced by distribute(), Mesh(), set_keep_all_elements_as_halos(), and unset_keep_all_elements_as_halos().

bool oomph::Mesh::Lookup_for_elements_next_boundary_is_setup
protected
Vector<Node*> oomph::Mesh::Node_pt
protected

Vector of pointers to nodes.

Definition at line 194 of file mesh.h.

Referenced by add_node_pt(), assign_global_eqn_numbers(), assign_initial_values_impulsive(), oomph::BackupMeshForProjection< GEOMETRIC_ELEMENT >::BackupMeshForProjection(), oomph::BrethertonSpineMesh< ELEMENT, INTERFACE_ELEMENT >::BrethertonSpineMesh(), calculate_predictions(), oomph::TriangleScaffoldMesh::check_mesh_integrity(), delete_all_external_storage(), describe_dofs(), does_pointer_correspond_to_mesh_data(), oomph::EighthSphereMesh< ELEMENT >::EighthSphereMesh(), flush_node_storage(), oomph::FullCircleMesh< ELEMENT >::FullCircleMesh(), oomph::GeompackQuadScaffoldMesh::GeompackQuadScaffoldMesh(), merge_meshes(), nnode(), node_pt(), oomph::SpineMesh::node_pt(), oomph::AlgebraicMesh::node_pt(), oomph::SolidMesh::node_pt(), node_update(), oomph::SpineMesh::node_update(), prune_dead_nodes(), oomph::QuarterCircleSectorMesh< ELEMENT >::QuarterCircleSectorMesh(), oomph::QuarterTubeMesh< ELEMENT >::QuarterTubeMesh(), oomph::RectangleWithHoleMesh< ELEMENT >::RectangleWithHoleMesh(), oomph::TriangleMesh< ELEMENT >::remesh_from_internal_triangulateio(), self_test(), set_consistent_pinned_values_for_continuation(), oomph::SolidMesh::set_lagrangian_nodal_coordinates(), set_nodal_time_stepper(), shift_time_values(), oomph::SimpleCubicScaffoldTetMesh::SimpleCubicScaffoldTetMesh(), oomph::SimpleRectangularTriMesh< ELEMENT >::SimpleRectangularTriMesh(), oomph::TetgenScaffoldMesh::TetgenScaffoldMesh(), oomph::ThinLayerBrickOnTetMesh< ELEMENT >::ThinLayerBrickOnTetMesh(), oomph::TriangleScaffoldMesh::TriangleScaffoldMesh(), oomph::TubeMesh< ELEMENT >::TubeMesh(), oomph::WomersleyMesh< WOMERSLEY_ELEMENT >::WomersleyMesh(), and ~Mesh().

bool oomph::Mesh::Output_halo_elements

Bool for output of halo elements.

Definition at line 1725 of file mesh.h.

Referenced by disable_output_of_halo_elements(), enable_output_of_halo_elements(), Mesh(), output(), and output_fct().

bool oomph::Mesh::Resize_halo_nodes_not_required
protected

Set this to true to suppress resizing of halo nodes (at your own risk!)

Definition at line 155 of file mesh.h.

Referenced by oomph::TreeBasedRefineableMeshBase::classify_halo_and_haloed_nodes(), classify_halo_and_haloed_nodes(), disable_resizing_of_halo_nodes(), enable_resizing_of_halo_nodes(), and Mesh().

std::map<unsigned, Vector<GeneralisedElement*> > oomph::Mesh::Root_halo_element_pt
protected
std::map<unsigned, Vector<GeneralisedElement*> > oomph::Mesh::Root_haloed_element_pt
protected
std::map<unsigned, Vector<Node*> > oomph::Mesh::Shared_node_pt
protected

Map of vectors holding the pointers to the shared nodes. These are all the nodes that are on two "neighbouring" processes (the halo(ed) lookup scheme depends upon which processor is in charge

  • a node which is on 3 processors, for example, will not feature in the halo(ed) lookup scheme between the two lowest-numbered processors)

Definition at line 127 of file mesh.h.

Referenced by add_shared_node_pt(), check_halo_schemes(), doc_shared_nodes(), get_shared_node_pt(), nshared_node(), setup_shared_node_scheme(), shared_node_pt(), and synchronise_shared_nodes().

bool oomph::Mesh::Suppress_warning_about_empty_mesh_level_time_stepper_function =false
static

Boolean used to control warning about empty mesh level timestepper function.

Static boolean flag to control warning about mesh level timesteppers.

Definition at line 246 of file mesh.h.

Referenced by set_mesh_level_time_stepper().


The documentation for this class was generated from the following files: