Classes | Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | Private Types | Private Member Functions | List of all members
oomph::TriangleMesh< ELEMENT > Class Template Reference

#include <triangle_mesh.template.h>

Inheritance diagram for oomph::TriangleMesh< ELEMENT >:
oomph::RefineableTriangleMesh< ELEMENT > oomph::SolidTriangleMesh< ELEMENT > oomph::RefineableSolidTriangleMesh< ELEMENT >

Classes

struct  Point
 

Public Member Functions

 TriangleMesh ()
 Empty constructor. More...
 
 TriangleMesh (const std::string &node_file_name, const std::string &element_file_name, const std::string &poly_file_name, TimeStepper *time_stepper_pt=&Mesh::Default_TimeStepper, const bool &allow_automatic_creation_of_vertices_on_boundaries=true)
 Constructor with the input files. More...
 
 TriangleMesh (TriangleMeshParameters &triangle_mesh_parameters, TimeStepper *time_stepper_pt=&Mesh::Default_TimeStepper)
 Build mesh, based on the specifications on TriangleMeshParameters. More...
 
 TriangleMesh (const std::string &poly_file_name, const double &element_area, TimeStepper *time_stepper_pt=&Mesh::Default_TimeStepper, const bool &allow_automatic_creation_of_vertices_on_boundaries=true)
 Build mesh from poly file, with specified target area for all elements. More...
 
 TriangleMesh (const TriangleMesh &dummy)
 Broken copy constructor. More...
 
void operator= (const TriangleMesh &)
 Broken assignment operator. More...
 
virtual ~TriangleMesh ()
 Destructor. More...
 
void set_mesh_level_time_stepper (TimeStepper *const &time_stepper_pt, const bool &preserve_existing_data)
 Overload set_mesh_level_time_stepper so that the stored time stepper now corresponds to the new timestepper. More...
 
void compute_boundary_segments_connectivity_and_initial_zeta_values (const unsigned &b)
 Compute the boundary segments connectivity for those boundaries that were splited during the distribution process. More...
 
void re_assign_initial_zeta_values_for_internal_boundary (const unsigned &b, Vector< std::list< FiniteElement *> > &old_segment_sorted_ele_pt, std::map< FiniteElement *, bool > &old_is_inverted)
 Re-assign the boundary segments initial zeta (arclength) value for those internal boundaries that were splited during the distribution process. Those boundaries that have one face element at each side of the boundary. More...
 
void re_scale_re_assigned_initial_zeta_values_for_internal_boundary (const unsigned &b)
 Re-scale the re-assigned zeta values for the boundary nodes, apply only for internal boundaries. More...
 
void identify_boundary_segments_and_assign_initial_zeta_values (const unsigned &b, Vector< FiniteElement *> &input_face_ele_pt, const bool &is_internal_boundary, std::map< FiniteElement *, FiniteElement *> &face_to_bulk_element_pt)
 Identify the segments from the old mesh (original mesh) in the new mesh (this) and assign initial and final boundary coordinates for the segments that create the boundary. (This is the version called from the original mesh to identify its own segments) More...
 
void identify_boundary_segments_and_assign_initial_zeta_values (const unsigned &b, TriangleMesh< ELEMENT > *original_mesh_pt)
 Identify the segments from the old mesh (original mesh) in the new mesh (this) and assign initial and final boundary coordinates for the segments that create the boundary. More...
 
void synchronize_boundary_coordinates (const unsigned &b)
 In charge of sinchronize the boundary coordinates for internal boundaries that were split as part of the distribution process. Called after setup_boundary_coordinates() for the original mesh only. More...
 
void select_boundary_face_elements (Vector< FiniteElement *> &face_el_pt, const unsigned &b, bool &is_internal_boundary, std::map< FiniteElement *, FiniteElement *> &face_to_bulk_element_pt)
 Select face element from boundary using the criteria to decide which of the two face elements should be used on internal boundaries. More...
 
Vector< Vector< Node * > > & boundary_segment_node_pt (const unsigned &b)
 Return direct access to nodes associated with a boundary but sorted in segments. More...
 
Vector< Node * > & boundary_segment_node_pt (const unsigned &b, const unsigned &s)
 Return direct access to nodes associated with a segment of a given boundary. More...
 
Node *& boundary_segment_node_pt (const unsigned &b, const unsigned &s, const unsigned &n)
 Return pointer to node n on boundary b. More...
 
void update_triangulateio (Vector< Vector< double > > &internal_point)
 Update the TriangulateIO object to the current nodal position and the centre hole coordinates. More...
 
void update_triangulateio ()
 Update the triangulateio object to the current nodal positions. More...
 
void dump_distributed_info_for_restart (std::ostream &dump_file)
 Used to dump info. related with distributed triangle meshes. More...
 
const unsigned read_unsigned_line_helper (std::istream &read_file)
 
void read_distributed_info_for_restart (std::istream &restart_file)
 Used to read info. related with distributed triangle meshes. More...
 
virtual void reestablish_distribution_info_for_restart (OomphCommunicator *comm_pt, std::istream &restart_file)
 
void remesh_from_internal_triangulateio ()
 Completely regenerate the mesh from the trianglateio structure. More...
 
bool triangulateio_exists ()
 Boolean defining if Triangulateio object has been built or not. More...
 
Vector< unsigned > oomph_vertex_nodes_id ()
 Return the vector that contains the oomph-lib node number for all vertex nodes in the TriangulateIO representation of the mesh. More...
 
const unsigned initial_shared_boundary_id ()
 The initial boundary id for shared boundaries. More...
 
const unsigned final_shared_boundary_id ()
 The final boundary id for shared boundaries. More...
 
virtual void load_balance (const Vector< unsigned > &target_domain_for_local_non_halo_element)
 Virtual function to perform the load balance routines. More...
 
virtual void reset_boundary_element_info (Vector< unsigned > &ntmp_boundary_elements, Vector< Vector< unsigned > > &ntmp_boundary_elements_in_region, Vector< FiniteElement *> &deleted_elements)
 Reset the boundary elements info. after load balance have taken place. More...
 
void output_boundary_coordinates (const unsigned &b, std::ostream &outfile)
 

Public Attributes

TimeStepper * Time_stepper_pt
 Timestepper used to build elements. More...
 
bool Use_attributes
 

Protected Member Functions

void build_from_scaffold (TimeStepper *time_stepper_pt, const bool &use_attributes)
 Build mesh from scaffold. More...
 
void build_triangulateio (const std::string &poly_file_name, TriangulateIO &triangulate_io, bool &use_attributes)
 Helper function to create TriangulateIO object (return in triangulate_io) from the .poly file. More...
 
void generic_constructor (Vector< TriangleMeshPolygon *> &outer_boundary_pt, Vector< TriangleMeshPolygon *> &internal_polygon_pt, Vector< TriangleMeshOpenCurve *> &open_polylines_pt, const double &element_area, Vector< Vector< double > > &extra_holes_coordinates, std::map< unsigned, Vector< double > > &regions_coordinates, std::map< unsigned, double > &regions_areas, TimeStepper *time_stepper_pt, const bool &use_attributes, const bool &refine_boundary, const bool &refine_internal_boundary)
 A general-purpose construction function that builds the mesh once the different specific constructors have assembled the appropriate information. More...
 
void shared_boundaries_in_this_processor (Vector< unsigned > &shared_boundaries_in_this_processor)
 Get the shared boundaries ids living in the current processor. More...
 
const unsigned nshared_boundaries (const unsigned &p, const unsigned &q) const
 Access functions to boundaries shared with processors. More...
 
Vector< Vector< Vector< unsigned > > > shared_boundaries_ids () const
 
Vector< Vector< Vector< unsigned > > > & shared_boundaries_ids ()
 
Vector< Vector< unsigned > > shared_boundaries_ids (const unsigned &p) const
 
Vector< Vector< unsigned > > & shared_boundaries_ids (const unsigned &p)
 
Vector< unsigned > shared_boundaries_ids (const unsigned &p, const unsigned &q) const
 
Vector< unsigned > & shared_boundaries_ids (const unsigned &p, const unsigned &q)
 
const unsigned shared_boundaries_ids (const unsigned &p, const unsigned &q, const unsigned &i) const
 
const unsigned nshared_boundary_curves (const unsigned &p) const
 
const unsigned nshared_boundary_polyline (const unsigned &p, const unsigned &c) const
 
Vector< TriangleMeshPolyLine * > & shared_boundary_polyline_pt (const unsigned &p, const unsigned &c)
 
TriangleMeshPolyLine * shared_boundary_polyline_pt (const unsigned &p, const unsigned &c, const unsigned &i) const
 
const unsigned nshared_boundaries () const
 
const unsigned nshared_boundary_element (const unsigned &b)
 
void flush_shared_boundary_element ()
 
void flush_shared_boundary_element (const unsigned &b)
 
void add_shared_boundary_element (const unsigned &b, FiniteElement *ele_pt)
 
FiniteElement * shared_boundary_element_pt (const unsigned &b, const unsigned &e)
 
void flush_face_index_at_shared_boundary ()
 
void add_face_index_at_shared_boundary (const unsigned &b, const unsigned &i)
 
int face_index_at_shared_boundary (const unsigned &b, const unsigned &e)
 
const unsigned nshared_boundary_node (const unsigned &b)
 
void flush_shared_boundary_node ()
 Flush ALL the shared boundary nodes. More...
 
void flush_shared_boundary_node (const unsigned &b)
 Flush the boundary nodes associated to the shared boundary b. More...
 
void add_shared_boundary_node (const unsigned &b, Node *node_pt)
 Add the node the shared boundary. More...
 
Node * shared_boundary_node_pt (const unsigned &b, const unsigned &n)
 
bool is_node_on_shared_boundary (const unsigned &b, Node *const &node_pt)
 Is the node on the shared boundary. More...
 
std::map< unsigned, Vector< unsigned > > & shared_boundary_from_processors ()
 Return the association of the shared boundaries with the processors. More...
 
Vector< unsigned > & shared_boundary_from_processors (const unsigned &b)
 
const unsigned nshared_boundary_overlaps_internal_boundary ()
 Get the number of shared boundaries overlaping internal boundaries. More...
 
const bool shared_boundary_overlaps_internal_boundary (const unsigned &shd_bnd_id)
 Checks if the shared boundary overlaps an internal boundary. More...
 
const unsigned shared_boundary_overlapping_internal_boundary (const unsigned &shd_bnd_id)
 Gets the boundary id of the internal boundary that the shared boundary lies on. More...
 
void get_shared_boundaries_overlapping_internal_boundary (const unsigned &internal_bnd_id, Vector< unsigned > &shd_bnd_ids)
 Gets the shared boundaries ids that overlap the given internal boundary. More...
 
std::map< unsigned, unsigned > & shared_boundary_overlaps_internal_boundary ()
 Gets the storage that indicates if a shared boundary is part of an internal boundary. More...
 
const bool boundary_was_splitted (const unsigned &b)
 Helper function to verify if a given boundary was splitted in the distribution process. More...
 
const unsigned nboundary_subpolylines (const unsigned &b)
 Gets the number of subpolylines that create the boundarya (useful only when the boundary is marked as split) More...
 
Vector< TriangleMeshPolyLine * > & boundary_subpolylines (const unsigned &b)
 Gets the vector of auxiliar polylines that will represent the given boundary (useful only when the boundaries were split) More...
 
const bool boundary_marked_as_shared_boundary (const unsigned &b, const unsigned &isub)
 Returns the value that indicates if a subpolyline of a given boundary continues been used as internal boundary or should be changed as shared boundary. More...
 
void flush_shared_boundary_polyline_pt ()
 
void create_distributed_domain_representation (Vector< TriangleMeshPolygon *> &polygons_pt, Vector< TriangleMeshOpenCurve *> &open_curves_pt)
 Creates the distributed domain representation. Joins the original boundaires, shared boundaries and creates connections among them to create the new polygons that represent the distributed domain. More...
 
void sort_polylines_helper (Vector< TriangleMeshPolyLine *> &unsorted_polylines_pt, Vector< Vector< TriangleMeshPolyLine *> > &sorted_polylines_pt)
 Sorts the polylines so they be continuous and then we can create a closed or open curve from them. More...
 
void create_tmp_polygons_helper (Vector< Vector< TriangleMeshPolyLine *> > &polylines_pt, Vector< TriangleMeshPolygon *> &polygons_pt)
 Take the polylines from the shared boundaries and create temporary polygon representations of the domain. More...
 
void create_tmp_open_curves_helper (Vector< Vector< TriangleMeshPolyLine *> > &sorted_open_curves_pt, Vector< TriangleMeshPolyLine *> &unsorted_shared_to_internal_poly_pt, Vector< TriangleMeshOpenCurve *> &open_curves_pt)
 Take the polylines from the original open curves and created new temporaly representations of open curves with the bits of original curves not overlapped by shared boundaries. More...
 
void compute_holes_left_by_halo_elements_helper (Vector< Vector< double > > &output_holes_coordinates)
 Compute the holes left by the halo elements, those adjacent to the shared boundaries. More...
 
void update_holes_information_helper (Vector< TriangleMeshPolygon *> &polygons_pt, Vector< Vector< double > > &output_holes_coordinates)
 Keeps those vertices that define a hole, those that are inside closed internal boundaries in the new polygons that define the domain. Delete those outside/inside the outer polygons (this is required since Triangle can not deal with vertices that define holes outside the new outer polygons of the domain) More...
 
const int check_connections_of_polyline_nodes (std::set< FiniteElement *> &element_in_processor_pt, const int &root_edge_bnd_id, std::map< std::pair< Node *, Node *>, bool > &overlapped_face, std::map< unsigned, std::map< Node *, bool > > &node_on_bnd_not_overlapped_by_shd_bnd, std::list< Node *> &current_polyline_nodes, std::map< unsigned, std::list< Node *> > &shared_bnd_id_to_sorted_list_node_pt, const unsigned &node_degree, Node *&new_node_pt, const bool called_from_load_balance=false)
 Check for any possible connections that the array of sorted nodes have with any previous boundaries or with itself. Return -1 if no connection was found, return -2 if the connection is with the same polyline, return the boundary id of the boundary to which the connection is performed. More...
 
void create_shared_polylines_connections ()
 Establish the connections of the polylines previously marked as having connections. This connections were marked in the function TriangleMesh::create_polylines_from_halo_elements_helper(). More...
 
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. More...
 
void get_halo_elements_on_all_procs (const unsigned &nproc, const Vector< unsigned > &element_domain, const Vector< GeneralisedElement *> &backed_up_el_pt, std::map< Data *, std::set< unsigned > > &processors_associated_with_data, const bool &overrule_keep_as_halo_element_status, std::map< GeneralisedElement *, unsigned > &element_to_global_index, Vector< Vector< Vector< GeneralisedElement *> > > &output_halo_elements_pt)
 Creates the halo elements on all processors Gets the halo elements on all processors, these elements are then used on the function that computes the shared boundaries among the processors. More...
 
void get_element_edges_on_boundary (std::map< std::pair< Node *, Node *>, unsigned > &element_edges_on_boundary)
 Get the element edges (pair of nodes, edges) that lie on a boundary (used to mark shared boundaries that lie on internal boundaries) More...
 
void create_polylines_from_halo_elements_helper (const Vector< unsigned > &element_domain, std::map< GeneralisedElement *, unsigned > &element_to_global_index, std::set< FiniteElement *> &element_in_processor_pt, Vector< Vector< Vector< GeneralisedElement *> > > &input_halo_elements, std::map< std::pair< Node *, Node *>, unsigned > &elements_edges_on_boundary, Vector< Vector< Vector< TriangleMeshPolyLine *> > > &output_polylines_pt)
 Creates polylines from the intersection of halo elements on all processors. The new polylines define the shared boundaries in the domain This get the polylines on ALL processors, that is why the three dimensions output_polylines_pt[iproc][ncurve][npolyline]. More...
 
void break_loops_on_shared_polyline_helper (const unsigned &initial_shd_bnd_id, std::list< Node *> &input_nodes, Vector< FiniteElement *> &input_boundary_element_pt, Vector< int > &input_face_index_element, const int &input_connect_to_the_left, const int &input_connect_to_the_right, Vector< std::list< Node *> > &output_sorted_nodes_pt, Vector< Vector< FiniteElement *> > &output_boundary_element_pt, Vector< Vector< int > > &output_face_index_element, Vector< int > &output_connect_to_the_left, Vector< int > &output_connect_to_the_right)
 Break any possible loop created by the sorted list of nodes that is used to create a new shared polyline. More...
 
void break_loops_on_shared_polyline_load_balance_helper (const unsigned &initial_shd_bnd_id, std::list< Node *> &input_nodes, Vector< FiniteElement *> &input_boundary_element_pt, Vector< FiniteElement *> &input_boundary_face_element_pt, Vector< int > &input_face_index_element, const int &input_connect_to_the_left, const int &input_connect_to_the_right, Vector< std::list< Node *> > &output_sorted_nodes_pt, Vector< Vector< FiniteElement *> > &output_boundary_element_pt, Vector< Vector< FiniteElement *> > &output_boundary_face_element_pt, Vector< Vector< int > > &output_face_index_element, Vector< int > &output_connect_to_the_left, Vector< int > &output_connect_to_the_right)
 Break any possible loop created by the sorted list of nodes that is used to create a new shared polyline (modified version for load balance) More...
 
void create_shared_polyline (const unsigned &my_rank, const unsigned &shd_bnd_id, const unsigned &iproc, const unsigned &jproc, std::list< Node *> &sorted_nodes, const int &root_edge_bnd_id, Vector< FiniteElement *> &bulk_bnd_ele_pt, Vector< int > &face_index_ele, Vector< Vector< TriangleMeshPolyLine *> > &unsorted_polylines_pt, const int &connect_to_the_left_flag, const int &connect_to_the_right_flag)
 Create the shared polyline and fill the data structured that keep all the information associated with the creationg of the shared boundary. More...
 

Protected Attributes

std::map< unsigned, double > Regions_areas
 Target areas for regions; defaults to 0.0 which (luckily) implies "no specific target area" for triangle! More...
 
bool Triangulateio_exists
 Boolean defining if Triangulateio object has been built or not. More...
 
TriangleScaffoldMesh * Tmp_mesh_pt
 Temporary scaffold mesh. More...
 
Vector< unsigned > Oomph_vertex_nodes_id
 Vector storing oomph-lib node number for all vertex nodes in the TriangulateIO representation of the mesh. More...
 
unsigned Initial_shared_boundary_id
 The initial boundary id for shared boundaries. More...
 
unsigned Final_shared_boundary_id
 The final boundary id for shared boundaries. More...
 
Vector< Vector< Vector< unsigned > > > Shared_boundaries_ids
 Stores the boundaries ids created by the interaction of two processors Shared_boundaries_ids[iproc][jproc] = Vector of shared boundaries ids "iproc" processor shares boundaries with "jproc" processor. More...
 
std::map< unsigned, Vector< unsigned > > Shared_boundary_from_processors
 Stores the processors involved in the generation of a shared boundary, in 2D two processors give rise to the creation of a shared boundary. More...
 
std::map< unsigned, unsigned > Shared_boundary_overlaps_internal_boundary
 Stores information about those shared boundaries that lie over or over a segment of an internal boundary (only used when using internal boundaries in the domain) More...
 
Vector< Vector< Vector< TriangleMeshPolyLine * > > > Shared_boundary_polyline_pt
 Stores the polyline representation of the shared boundaries Shared_boundary_polyline_pt[iproc][ncurve][npolyline] = polyline_pt. More...
 
std::map< unsigned, Vector< FiniteElement * > > Shared_boundary_element_pt
 Stores the boundary elements adjacent to the shared boundaries, these elements are a subset of the halo and haloed elements. More...
 
std::map< unsigned, Vector< int > > Face_index_at_shared_boundary
 For the e-th finite element on shared boundary b, this is the index of the face that lies along that boundary. More...
 
std::map< unsigned, Vector< Node * > > Shared_boundary_node_pt
 Stores the boundary nodes adjacent to the shared boundaries, these nodes are a subset of the halo and haloed nodes. More...
 
std::map< unsigned, bool > Boundary_was_splitted
 Flag to indicate if a polyline has been splitted during the distribution process, the boundary id of the polyline is used to indicate if spplited. More...
 
std::map< unsigned, Vector< TriangleMeshPolyLine * > > Boundary_subpolylines
 The polylines that will temporary represent the boundary that was splitted in the distribution process. Used to ease the sending of info. to Triangle during the adaptation process. More...
 
std::map< unsigned, std::vector< bool > > Boundary_marked_as_shared_boundary
 Flag to indicate if an internal boundary will be used as shared boundary because there is overlapping of the internal boundary with the shared boundary. More...
 
bool First_time_compute_holes_left_by_halo_elements
 Flag to know if it is the first time we are going to compute the holes left by the halo elements. More...
 
Vector< Vector< double > > Original_extra_holes_coordinates
 Backup the original extra holes coordinates. More...
 

Private Types

typedef double coord_t
 
typedef double coord2_t
 

Private Member Functions

coord2_t cross (const Point &O, const Point &A, const Point &B)
 2D cross product of OA and OB vectors, i.e. z-component of their 3D cross product. Returns a positive value, if OAB makes a counter-clockwise turn, negative for clockwise turn, and zero if the points are collinear. More...
 
std::vector< Pointconvex_hull (std::vector< Point > P)
 Returns a list of points on the convex hull in counter-clockwise order. Note: the last point in the returned list is the same as the first one. More...
 

Detailed Description

template<class ELEMENT>
class oomph::TriangleMesh< ELEMENT >

Triangle mesh build with the help of the scaffold mesh coming from the triangle mesh generator Triangle. http://www.cs.cmu.edu/~quake/triangle.html

Definition at line 355 of file triangle_mesh.template.h.

Member Typedef Documentation

◆ coord2_t

template<class ELEMENT>
typedef double oomph::TriangleMesh< ELEMENT >::coord2_t
private

Definition at line 2072 of file triangle_mesh.template.h.

◆ coord_t

template<class ELEMENT>
typedef double oomph::TriangleMesh< ELEMENT >::coord_t
private

Definition at line 2071 of file triangle_mesh.template.h.

Constructor & Destructor Documentation

◆ TriangleMesh() [1/5]

template<class ELEMENT>
oomph::TriangleMesh< ELEMENT >::TriangleMesh ( )
inline

◆ TriangleMesh() [2/5]

template<class ELEMENT>
oomph::TriangleMesh< ELEMENT >::TriangleMesh ( const std::string &  node_file_name,
const std::string &  element_file_name,
const std::string &  poly_file_name,
TimeStepper *  time_stepper_pt = &Mesh::Default_TimeStepper,
const bool &  allow_automatic_creation_of_vertices_on_boundaries = true 
)
inline

◆ TriangleMesh() [3/5]

template<class ELEMENT>
oomph::TriangleMesh< ELEMENT >::TriangleMesh ( TriangleMeshParameters triangle_mesh_parameters,
TimeStepper *  time_stepper_pt = &Mesh::Default_TimeStepper 
)
inline

◆ TriangleMesh() [4/5]

template<class ELEMENT>
oomph::TriangleMesh< ELEMENT >::TriangleMesh ( const std::string &  poly_file_name,
const double &  element_area,
TimeStepper *  time_stepper_pt = &Mesh::Default_TimeStepper,
const bool &  allow_automatic_creation_of_vertices_on_boundaries = true 
)
inline

Build mesh from poly file, with specified target area for all elements.

Definition at line 692 of file triangle_mesh.template.h.

References oomph::TriangleMeshParameters::Allow_automatic_creation_of_vertices_on_boundaries, oomph::triangulate(), and oomph::TriangleMeshParameters::Use_attributes.

◆ TriangleMesh() [5/5]

template<class ELEMENT>
oomph::TriangleMesh< ELEMENT >::TriangleMesh ( const TriangleMesh< ELEMENT > &  dummy)
inline

Broken copy constructor.

Definition at line 780 of file triangle_mesh.template.h.

◆ ~TriangleMesh()

template<class ELEMENT>
virtual oomph::TriangleMesh< ELEMENT >::~TriangleMesh ( )
inlinevirtual

Destructor.

Definition at line 792 of file triangle_mesh.template.h.

Member Function Documentation

◆ add_face_index_at_shared_boundary()

template<class ELEMENT>
void oomph::TriangleMesh< ELEMENT >::add_face_index_at_shared_boundary ( const unsigned &  b,
const unsigned &  i 
)
inlineprotected

Definition at line 1480 of file triangle_mesh.template.h.

◆ add_shared_boundary_element()

template<class ELEMENT>
void oomph::TriangleMesh< ELEMENT >::add_shared_boundary_element ( const unsigned &  b,
FiniteElement *  ele_pt 
)
inlineprotected

Definition at line 1452 of file triangle_mesh.template.h.

◆ add_shared_boundary_node()

template<class ELEMENT>
void oomph::TriangleMesh< ELEMENT >::add_shared_boundary_node ( const unsigned &  b,
Node *  node_pt 
)
inlineprotected

Add the node the shared boundary.

Definition at line 1534 of file triangle_mesh.template.h.

◆ boundary_marked_as_shared_boundary()

template<class ELEMENT>
const bool oomph::TriangleMesh< ELEMENT >::boundary_marked_as_shared_boundary ( const unsigned &  b,
const unsigned &  isub 
)
inlineprotected

Returns the value that indicates if a subpolyline of a given boundary continues been used as internal boundary or should be changed as shared boundary.

Definition at line 1786 of file triangle_mesh.template.h.

◆ boundary_segment_node_pt() [1/3]

template<class ELEMENT>
Vector<Vector<Node*> >& oomph::TriangleMesh< ELEMENT >::boundary_segment_node_pt ( const unsigned &  b)
inline

Return direct access to nodes associated with a boundary but sorted in segments.

Definition at line 888 of file triangle_mesh.template.h.

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

◆ boundary_segment_node_pt() [2/3]

template<class ELEMENT>
Vector<Node*>& oomph::TriangleMesh< ELEMENT >::boundary_segment_node_pt ( const unsigned &  b,
const unsigned &  s 
)
inline

Return direct access to nodes associated with a segment of a given boundary.

Definition at line 893 of file triangle_mesh.template.h.

◆ boundary_segment_node_pt() [3/3]

template<class ELEMENT>
Node* & oomph::TriangleMesh< ELEMENT >::boundary_segment_node_pt ( const unsigned &  b,
const unsigned &  s,
const unsigned &  n 
)
inline

Return pointer to node n on boundary b.

Definition at line 897 of file triangle_mesh.template.h.

◆ boundary_subpolylines()

template<class ELEMENT>
Vector<TriangleMeshPolyLine*>& oomph::TriangleMesh< ELEMENT >::boundary_subpolylines ( const unsigned &  b)
inlineprotected

Gets the vector of auxiliar polylines that will represent the given boundary (useful only when the boundaries were split)

Definition at line 1763 of file triangle_mesh.template.h.

◆ boundary_was_splitted()

template<class ELEMENT>
const bool oomph::TriangleMesh< ELEMENT >::boundary_was_splitted ( const unsigned &  b)
inlineprotected

Helper function to verify if a given boundary was splitted in the distribution process.

Definition at line 1722 of file triangle_mesh.template.h.

◆ break_loops_on_shared_polyline_helper()

template<class ELEMENT >
void oomph::TriangleMesh< ELEMENT >::break_loops_on_shared_polyline_helper ( const unsigned &  initial_shd_bnd_id,
std::list< Node *> &  input_nodes,
Vector< FiniteElement *> &  input_boundary_element_pt,
Vector< int > &  input_face_index_element,
const int &  input_connect_to_the_left,
const int &  input_connect_to_the_right,
Vector< std::list< Node *> > &  output_sorted_nodes_pt,
Vector< Vector< FiniteElement *> > &  output_boundary_element_pt,
Vector< Vector< int > > &  output_face_index_element,
Vector< int > &  output_connect_to_the_left,
Vector< int > &  output_connect_to_the_right 
)
protected

Break any possible loop created by the sorted list of nodes that is used to create a new shared polyline.

Definition at line 13103 of file triangle_mesh.template.cc.

References oomph::TriangleMesh< ELEMENT >::break_loops_on_shared_polyline_load_balance_helper().

◆ break_loops_on_shared_polyline_load_balance_helper()

template<class ELEMENT >
void oomph::TriangleMesh< ELEMENT >::break_loops_on_shared_polyline_load_balance_helper ( const unsigned &  initial_shd_bnd_id,
std::list< Node *> &  input_nodes,
Vector< FiniteElement *> &  input_boundary_element_pt,
Vector< FiniteElement *> &  input_boundary_face_element_pt,
Vector< int > &  input_face_index_element,
const int &  input_connect_to_the_left,
const int &  input_connect_to_the_right,
Vector< std::list< Node *> > &  output_sorted_nodes_pt,
Vector< Vector< FiniteElement *> > &  output_boundary_element_pt,
Vector< Vector< FiniteElement *> > &  output_boundary_face_element_pt,
Vector< Vector< int > > &  output_face_index_element,
Vector< int > &  output_connect_to_the_left,
Vector< int > &  output_connect_to_the_right 
)
protected

Break any possible loop created by the sorted list of nodes that is used to create a new shared polyline (modified version for load balance)

Definition at line 14023 of file triangle_mesh.template.cc.

References oomph::TriangleMesh< ELEMENT >::create_shared_polyline().

Referenced by oomph::TriangleMesh< ELEMENT >::break_loops_on_shared_polyline_helper().

◆ build_from_scaffold()

template<class ELEMENT >
void oomph::TriangleMesh< ELEMENT >::build_from_scaffold ( TimeStepper *  time_stepper_pt,
const bool &  use_attributes 
)
protected

Build mesh from scaffold.

Build with the help of the scaffold mesh coming from the triangle mesh generator Triangle.

Definition at line 49 of file triangle_mesh.template.cc.

References oomph::TriangleMesh< ELEMENT >::identify_boundary_segments_and_assign_initial_zeta_values().

◆ build_triangulateio()

template<class ELEMENT >
void oomph::TriangleMesh< ELEMENT >::build_triangulateio ( const std::string &  poly_file_name,
TriangulateIO &  triangulate_io,
bool &  use_attributes 
)
protected

Helper function to create TriangulateIO object (return in triangulate_io) from the .poly file.

Create TriangulateIO object via the .poly file.

Definition at line 7083 of file triangle_mesh.template.cc.

References oomph::TriangleMesh< ELEMENT >::dump_distributed_info_for_restart().

Referenced by oomph::TriangleMesh< ELEMENT >::re_scale_re_assigned_initial_zeta_values_for_internal_boundary().

◆ check_connections_of_polyline_nodes()

template<class ELEMENT >
const int oomph::TriangleMesh< ELEMENT >::check_connections_of_polyline_nodes ( std::set< FiniteElement *> &  element_in_processor_pt,
const int &  root_edge_bnd_id,
std::map< std::pair< Node *, Node *>, bool > &  overlapped_face,
std::map< unsigned, std::map< Node *, bool > > &  node_on_bnd_not_overlapped_by_shd_bnd,
std::list< Node *> &  current_polyline_nodes,
std::map< unsigned, std::list< Node *> > &  shared_bnd_id_to_sorted_list_node_pt,
const unsigned &  node_degree,
Node *&  new_node_pt,
const bool  called_from_load_balance = false 
)
protected

Check for any possible connections that the array of sorted nodes have with any previous boundaries or with itself. Return -1 if no connection was found, return -2 if the connection is with the same polyline, return the boundary id of the boundary to which the connection is performed.

Definition at line 8949 of file triangle_mesh.template.cc.

◆ compute_boundary_segments_connectivity_and_initial_zeta_values()

template<class ELEMENT >
void oomph::TriangleMesh< ELEMENT >::compute_boundary_segments_connectivity_and_initial_zeta_values ( const unsigned &  b)

Compute the boundary segments connectivity for those boundaries that were splited during the distribution process.

Compute the boundary segments connectivity for those boundaries that were splited during the distribution process and also the initial zeta values for each segment (the initial and final boundary nodes coordinates)

Definition at line 1846 of file triangle_mesh.template.cc.

References oomph::TriangleMesh< ELEMENT >::re_assign_initial_zeta_values_for_internal_boundary().

Referenced by oomph::TriangleMesh< ELEMENT >::identify_boundary_segments_and_assign_initial_zeta_values().

◆ compute_holes_left_by_halo_elements_helper()

template<class ELEMENT >
void oomph::TriangleMesh< ELEMENT >::compute_holes_left_by_halo_elements_helper ( Vector< Vector< double > > &  output_holes_coordinates)
protected

Compute the holes left by the halo elements, those adjacent to the shared boundaries.

Definition at line 10690 of file triangle_mesh.template.cc.

◆ convex_hull()

template<class ELEMENT>
std::vector<Point> oomph::TriangleMesh< ELEMENT >::convex_hull ( std::vector< Point P)
inlineprivate

Returns a list of points on the convex hull in counter-clockwise order. Note: the last point in the returned list is the same as the first one.

Definition at line 2093 of file triangle_mesh.template.h.

References Global_Physical_Variables::H.

◆ create_distributed_domain_representation()

template<class ELEMENT >
void oomph::TriangleMesh< ELEMENT >::create_distributed_domain_representation ( Vector< TriangleMeshPolygon *> &  polygons_pt,
Vector< TriangleMeshOpenCurve *> &  open_curves_pt 
)
protected

Creates the distributed domain representation. Joins the original boundaires, shared boundaries and creates connections among them to create the new polygons that represent the distributed domain.

Definition at line 8021 of file triangle_mesh.template.cc.

References oomph::TriangleMesh< ELEMENT >::create_tmp_polygons_helper().

◆ create_polylines_from_halo_elements_helper()

template<class ELEMENT >
void oomph::TriangleMesh< ELEMENT >::create_polylines_from_halo_elements_helper ( const Vector< unsigned > &  element_domain,
std::map< GeneralisedElement *, unsigned > &  element_to_global_index,
std::set< FiniteElement *> &  element_in_processor_pt,
Vector< Vector< Vector< GeneralisedElement *> > > &  input_halo_elements,
std::map< std::pair< Node *, Node *>, unsigned > &  elements_edges_on_boundary,
Vector< Vector< Vector< TriangleMeshPolyLine *> > > &  output_polylines_pt 
)
protected

Creates polylines from the intersection of halo elements on all processors. The new polylines define the shared boundaries in the domain This get the polylines on ALL processors, that is why the three dimensions output_polylines_pt[iproc][ncurve][npolyline].

Definition at line 11640 of file triangle_mesh.template.cc.

◆ create_shared_boundaries()

template<class ELEMENT >
void oomph::TriangleMesh< ELEMENT >::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 
)
protected

Creates the shared boundaries.

Definition at line 11410 of file triangle_mesh.template.cc.

◆ create_shared_polyline()

template<class ELEMENT >
void oomph::TriangleMesh< ELEMENT >::create_shared_polyline ( const unsigned &  my_rank,
const unsigned &  shd_bnd_id,
const unsigned &  iproc,
const unsigned &  jproc,
std::list< Node *> &  sorted_nodes,
const int &  root_edge_bnd_id,
Vector< FiniteElement *> &  bulk_bnd_ele_pt,
Vector< int > &  face_index_ele,
Vector< Vector< TriangleMeshPolyLine *> > &  unsorted_polylines_pt,
const int &  connect_to_the_left_flag,
const int &  connect_to_the_right_flag 
)
protected

Create the shared polyline and fill the data structured that keep all the information associated with the creationg of the shared boundary.

Definition at line 14448 of file triangle_mesh.template.cc.

References oomph::TriangleMesh< ELEMENT >::reset_boundary_element_info().

Referenced by oomph::TriangleMesh< ELEMENT >::break_loops_on_shared_polyline_load_balance_helper().

◆ create_shared_polylines_connections()

template<class ELEMENT >
void oomph::TriangleMesh< ELEMENT >::create_shared_polylines_connections ( )
protected

Establish the connections of the polylines previously marked as having connections. This connections were marked in the function TriangleMesh::create_polylines_from_halo_elements_helper().

Definition at line 9388 of file triangle_mesh.template.cc.

◆ create_tmp_open_curves_helper()

template<class ELEMENT >
void oomph::TriangleMesh< ELEMENT >::create_tmp_open_curves_helper ( Vector< Vector< TriangleMeshPolyLine *> > &  sorted_open_curves_pt,
Vector< TriangleMeshPolyLine *> &  unsorted_shared_to_internal_poly_pt,
Vector< TriangleMeshOpenCurve *> &  open_curves_pt 
)
protected

Take the polylines from the original open curves and created new temporaly representations of open curves with the bits of original curves not overlapped by shared boundaries.

Definition at line 8908 of file triangle_mesh.template.cc.

◆ create_tmp_polygons_helper()

template<class ELEMENT >
void oomph::TriangleMesh< ELEMENT >::create_tmp_polygons_helper ( Vector< Vector< TriangleMeshPolyLine *> > &  polylines_pt,
Vector< TriangleMeshPolygon *> &  polygons_pt 
)
protected

Take the polylines from the shared boundaries and create temporary polygon representations of the domain.

Definition at line 8519 of file triangle_mesh.template.cc.

Referenced by oomph::TriangleMesh< ELEMENT >::create_distributed_domain_representation().

◆ cross()

template<class ELEMENT>
coord2_t oomph::TriangleMesh< ELEMENT >::cross ( const Point O,
const Point A,
const Point B 
)
inlineprivate

2D cross product of OA and OB vectors, i.e. z-component of their 3D cross product. Returns a positive value, if OAB makes a counter-clockwise turn, negative for clockwise turn, and zero if the points are collinear.

Definition at line 2086 of file triangle_mesh.template.h.

References oomph::TriangleMesh< ELEMENT >::Point::x, and oomph::TriangleMesh< ELEMENT >::Point::y.

◆ dump_distributed_info_for_restart()

template<class ELEMENT >
void oomph::TriangleMesh< ELEMENT >::dump_distributed_info_for_restart ( std::ostream &  dump_file)

Used to dump info. related with distributed triangle meshes.

Definition at line 7323 of file triangle_mesh.template.cc.

References oomph::TriangleMesh< ELEMENT >::read_distributed_info_for_restart().

Referenced by oomph::TriangleMesh< ELEMENT >::build_triangulateio().

◆ face_index_at_shared_boundary()

template<class ELEMENT>
int oomph::TriangleMesh< ELEMENT >::face_index_at_shared_boundary ( const unsigned &  b,
const unsigned &  e 
)
inlineprotected

Definition at line 1484 of file triangle_mesh.template.h.

◆ final_shared_boundary_id()

template<class ELEMENT>
const unsigned oomph::TriangleMesh< ELEMENT >::final_shared_boundary_id ( )
inline

The final boundary id for shared boundaries.

Definition at line 1289 of file triangle_mesh.template.h.

◆ flush_face_index_at_shared_boundary()

template<class ELEMENT>
void oomph::TriangleMesh< ELEMENT >::flush_face_index_at_shared_boundary ( )
inlineprotected

Definition at line 1477 of file triangle_mesh.template.h.

◆ flush_shared_boundary_element() [1/2]

template<class ELEMENT>
void oomph::TriangleMesh< ELEMENT >::flush_shared_boundary_element ( )
inlineprotected

Definition at line 1429 of file triangle_mesh.template.h.

◆ flush_shared_boundary_element() [2/2]

template<class ELEMENT>
void oomph::TriangleMesh< ELEMENT >::flush_shared_boundary_element ( const unsigned &  b)
inlineprotected

Definition at line 1432 of file triangle_mesh.template.h.

◆ flush_shared_boundary_node() [1/2]

template<class ELEMENT>
void oomph::TriangleMesh< ELEMENT >::flush_shared_boundary_node ( )
inlineprotected

Flush ALL the shared boundary nodes.

Definition at line 1526 of file triangle_mesh.template.h.

◆ flush_shared_boundary_node() [2/2]

template<class ELEMENT>
void oomph::TriangleMesh< ELEMENT >::flush_shared_boundary_node ( const unsigned &  b)
inlineprotected

Flush the boundary nodes associated to the shared boundary b.

Definition at line 1530 of file triangle_mesh.template.h.

◆ flush_shared_boundary_polyline_pt()

template<class ELEMENT>
void oomph::TriangleMesh< ELEMENT >::flush_shared_boundary_polyline_pt ( )
inlineprotected

Definition at line 1826 of file triangle_mesh.template.h.

◆ generic_constructor()

template<class ELEMENT>
void oomph::TriangleMesh< ELEMENT >::generic_constructor ( Vector< TriangleMeshPolygon *> &  outer_boundary_pt,
Vector< TriangleMeshPolygon *> &  internal_polygon_pt,
Vector< TriangleMeshOpenCurve *> &  open_polylines_pt,
const double &  element_area,
Vector< Vector< double > > &  extra_holes_coordinates,
std::map< unsigned, Vector< double > > &  regions_coordinates,
std::map< unsigned, double > &  regions_areas,
TimeStepper *  time_stepper_pt,
const bool &  use_attributes,
const bool &  refine_boundary,
const bool &  refine_internal_boundary 
)
inlineprotected

◆ get_element_edges_on_boundary()

template<class ELEMENT >
void oomph::TriangleMesh< ELEMENT >::get_element_edges_on_boundary ( std::map< std::pair< Node *, Node *>, unsigned > &  element_edges_on_boundary)
protected

Get the element edges (pair of nodes, edges) that lie on a boundary (used to mark shared boundaries that lie on internal boundaries)

Definition at line 11574 of file triangle_mesh.template.cc.

◆ get_halo_elements_on_all_procs()

template<class ELEMENT >
void oomph::TriangleMesh< ELEMENT >::get_halo_elements_on_all_procs ( const unsigned &  nproc,
const Vector< unsigned > &  element_domain,
const Vector< GeneralisedElement *> &  backed_up_el_pt,
std::map< Data *, std::set< unsigned > > &  processors_associated_with_data,
const bool &  overrule_keep_as_halo_element_status,
std::map< GeneralisedElement *, unsigned > &  element_to_global_index,
Vector< Vector< Vector< GeneralisedElement *> > > &  output_halo_elements_pt 
)
protected

Creates the halo elements on all processors Gets the halo elements on all processors, these elements are then used on the function that computes the shared boundaries among the processors.

Definition at line 11485 of file triangle_mesh.template.cc.

◆ get_shared_boundaries_overlapping_internal_boundary()

template<class ELEMENT>
void oomph::TriangleMesh< ELEMENT >::get_shared_boundaries_overlapping_internal_boundary ( const unsigned &  internal_bnd_id,
Vector< unsigned > &  shd_bnd_ids 
)
inlineprotected

Gets the shared boundaries ids that overlap the given internal boundary.

Definition at line 1677 of file triangle_mesh.template.h.

◆ identify_boundary_segments_and_assign_initial_zeta_values() [1/2]

template<class ELEMENT>
void oomph::TriangleMesh< ELEMENT >::identify_boundary_segments_and_assign_initial_zeta_values ( const unsigned &  b,
Vector< FiniteElement *> &  input_face_ele_pt,
const bool &  is_internal_boundary,
std::map< FiniteElement *, FiniteElement *> &  face_to_bulk_element_pt 
)

Identify the segments from the old mesh (original mesh) in the new mesh (this) and assign initial and final boundary coordinates for the segments that create the boundary. (This is the version called from the original mesh to identify its own segments)

Referenced by oomph::TriangleMesh< ELEMENT >::build_from_scaffold().

◆ identify_boundary_segments_and_assign_initial_zeta_values() [2/2]

template<class ELEMENT >
void oomph::TriangleMesh< ELEMENT >::identify_boundary_segments_and_assign_initial_zeta_values ( const unsigned &  b,
TriangleMesh< ELEMENT > *  original_mesh_pt 
)

Identify the segments from the old mesh (original mesh) in the new mesh (this) and assign initial and final boundary coordinates for the segments that create the boundary.

Definition at line 390 of file triangle_mesh.template.cc.

References oomph::TriangleMesh< ELEMENT >::compute_boundary_segments_connectivity_and_initial_zeta_values().

◆ initial_shared_boundary_id()

template<class ELEMENT>
const unsigned oomph::TriangleMesh< ELEMENT >::initial_shared_boundary_id ( )
inline

The initial boundary id for shared boundaries.

Definition at line 1285 of file triangle_mesh.template.h.

◆ is_node_on_shared_boundary()

template<class ELEMENT>
bool oomph::TriangleMesh< ELEMENT >::is_node_on_shared_boundary ( const unsigned &  b,
Node *const &  node_pt 
)
inlineprotected

Is the node on the shared boundary.

Definition at line 1578 of file triangle_mesh.template.h.

◆ load_balance()

template<class ELEMENT>
virtual void oomph::TriangleMesh< ELEMENT >::load_balance ( const Vector< unsigned > &  target_domain_for_local_non_halo_element)
inlinevirtual

Virtual function to perform the load balance routines.

Reimplemented in oomph::RefineableTriangleMesh< ELEMENT >.

Definition at line 2033 of file triangle_mesh.template.h.

◆ nboundary_subpolylines()

template<class ELEMENT>
const unsigned oomph::TriangleMesh< ELEMENT >::nboundary_subpolylines ( const unsigned &  b)
inlineprotected

Gets the number of subpolylines that create the boundarya (useful only when the boundary is marked as split)

Definition at line 1738 of file triangle_mesh.template.h.

◆ nshared_boundaries() [1/2]

template<class ELEMENT>
const unsigned oomph::TriangleMesh< ELEMENT >::nshared_boundaries ( const unsigned &  p,
const unsigned &  q 
) const
inlineprotected

Access functions to boundaries shared with processors.

Definition at line 1362 of file triangle_mesh.template.h.

◆ nshared_boundaries() [2/2]

template<class ELEMENT>
const unsigned oomph::TriangleMesh< ELEMENT >::nshared_boundaries ( ) const
inlineprotected

Definition at line 1406 of file triangle_mesh.template.h.

◆ nshared_boundary_curves()

template<class ELEMENT>
const unsigned oomph::TriangleMesh< ELEMENT >::nshared_boundary_curves ( const unsigned &  p) const
inlineprotected

Definition at line 1390 of file triangle_mesh.template.h.

◆ nshared_boundary_element()

template<class ELEMENT>
const unsigned oomph::TriangleMesh< ELEMENT >::nshared_boundary_element ( const unsigned &  b)
inlineprotected

Definition at line 1409 of file triangle_mesh.template.h.

◆ nshared_boundary_node()

template<class ELEMENT>
const unsigned oomph::TriangleMesh< ELEMENT >::nshared_boundary_node ( const unsigned &  b)
inlineprotected

Definition at line 1505 of file triangle_mesh.template.h.

◆ nshared_boundary_overlaps_internal_boundary()

template<class ELEMENT>
const unsigned oomph::TriangleMesh< ELEMENT >::nshared_boundary_overlaps_internal_boundary ( )
inlineprotected

Get the number of shared boundaries overlaping internal boundaries.

Definition at line 1633 of file triangle_mesh.template.h.

◆ nshared_boundary_polyline()

template<class ELEMENT>
const unsigned oomph::TriangleMesh< ELEMENT >::nshared_boundary_polyline ( const unsigned &  p,
const unsigned &  c 
) const
inlineprotected

Definition at line 1393 of file triangle_mesh.template.h.

◆ oomph_vertex_nodes_id()

template<class ELEMENT>
Vector<unsigned> oomph::TriangleMesh< ELEMENT >::oomph_vertex_nodes_id ( )
inline

Return the vector that contains the oomph-lib node number for all vertex nodes in the TriangulateIO representation of the mesh.

Definition at line 1102 of file triangle_mesh.template.h.

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

◆ operator=()

template<class ELEMENT>
void oomph::TriangleMesh< ELEMENT >::operator= ( const TriangleMesh< ELEMENT > &  )
inline

Broken assignment operator.

Definition at line 786 of file triangle_mesh.template.h.

◆ output_boundary_coordinates()

template<class ELEMENT >
void oomph::TriangleMesh< ELEMENT >::output_boundary_coordinates ( const unsigned &  b,
std::ostream &  outfile 
)

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

Definition at line 7906 of file triangle_mesh.template.cc.

◆ re_assign_initial_zeta_values_for_internal_boundary()

template<class ELEMENT >
void oomph::TriangleMesh< ELEMENT >::re_assign_initial_zeta_values_for_internal_boundary ( const unsigned &  b,
Vector< std::list< FiniteElement *> > &  old_segment_sorted_ele_pt,
std::map< FiniteElement *, bool > &  old_is_inverted 
)

Re-assign the boundary segments initial zeta (arclength) value for those internal boundaries that were splited during the distribution process. Those boundaries that have one face element at each side of the boundary.

Re-assign the boundary segments initial zeta (arclength) for those internal boundaries that were splited during the distribution process. Those boundaries that have one face element at each side of the boundary. Here we create the segments only with the nonhalo elements, therefore the boundary coordinates need to be re-assigned to be passed to the new meshes.

Definition at line 4063 of file triangle_mesh.template.cc.

References oomph::TriangleMesh< ELEMENT >::select_boundary_face_elements().

Referenced by oomph::TriangleMesh< ELEMENT >::compute_boundary_segments_connectivity_and_initial_zeta_values().

◆ re_scale_re_assigned_initial_zeta_values_for_internal_boundary()

template<class ELEMENT >
void oomph::TriangleMesh< ELEMENT >::re_scale_re_assigned_initial_zeta_values_for_internal_boundary ( const unsigned &  b)

Re-scale the re-assigned zeta values for the boundary nodes, apply only for internal boundaries.

Re-assign the boundary segments initial zeta (arclength) for those internal boundaries that were splited during the distribution process (only apply for internal boundaries that have one face element at each side of the boundary)

Definition at line 6446 of file triangle_mesh.template.cc.

References oomph::TriangleMesh< ELEMENT >::build_triangulateio().

Referenced by oomph::TriangleMesh< ELEMENT >::synchronize_boundary_coordinates().

◆ read_distributed_info_for_restart()

template<class ELEMENT >
void oomph::TriangleMesh< ELEMENT >::read_distributed_info_for_restart ( std::istream &  restart_file)

Used to read info. related with distributed triangle meshes.

Definition at line 7570 of file triangle_mesh.template.cc.

Referenced by oomph::TriangleMesh< ELEMENT >::dump_distributed_info_for_restart().

◆ read_unsigned_line_helper()

template<class ELEMENT>
const unsigned oomph::TriangleMesh< ELEMENT >::read_unsigned_line_helper ( std::istream &  read_file)
inline

Definition at line 954 of file triangle_mesh.template.h.

◆ reestablish_distribution_info_for_restart()

template<class ELEMENT>
virtual void oomph::TriangleMesh< ELEMENT >::reestablish_distribution_info_for_restart ( OomphCommunicator *  comm_pt,
std::istream &  restart_file 
)
inlinevirtual

Virtual function used to re-establish any additional info. related with the distribution after a re-starting for triangle meshes

Reimplemented in oomph::RefineableTriangleMesh< ELEMENT >.

Definition at line 973 of file triangle_mesh.template.h.

◆ remesh_from_internal_triangulateio()

template<class ELEMENT>
void oomph::TriangleMesh< ELEMENT >::remesh_from_internal_triangulateio ( )
inline

Completely regenerate the mesh from the trianglateio structure.

Definition at line 989 of file triangle_mesh.template.h.

References oomph::TriangleMeshParameters::is_mesh_distributed(), and oomph::TriangleMeshParameters::Use_attributes.

◆ reset_boundary_element_info()

template<class ELEMENT >
void oomph::TriangleMesh< ELEMENT >::reset_boundary_element_info ( Vector< unsigned > &  ntmp_boundary_elements,
Vector< Vector< unsigned > > &  ntmp_boundary_elements_in_region,
Vector< FiniteElement *> &  deleted_elements 
)
virtual

Reset the boundary elements info. after load balance have taken place.

Virtual function to perform the reset boundary elements info routines. Generally used after load balance.

Definition at line 14691 of file triangle_mesh.template.cc.

Referenced by oomph::TriangleMesh< ELEMENT >::create_shared_polyline().

◆ select_boundary_face_elements()

template<class ELEMENT >
void oomph::TriangleMesh< ELEMENT >::select_boundary_face_elements ( Vector< FiniteElement *> &  face_ele_pt,
const unsigned &  b,
bool &  is_internal_boundary,
std::map< FiniteElement *, FiniteElement *> &  face_to_bulk_element_pt 
)

Select face element from boundary using the criteria to decide which of the two face elements should be used on internal boundaries.

===================================================================== Select face elements from a given boundary. In case the we are dealing with an internal boundary we use a set of criterias to decide which of the two face elements should be used on represent the internal boundary. We return the face elements, halo or haloed on this processor that form the boundary. The caller method should be in charge of selecting nonhalo elements and deleting the face

elements created by this method

Definition at line 5245 of file triangle_mesh.template.cc.

References oomph::TriangleMesh< ELEMENT >::synchronize_boundary_coordinates().

Referenced by oomph::TriangleMesh< ELEMENT >::re_assign_initial_zeta_values_for_internal_boundary().

◆ set_mesh_level_time_stepper()

template<class ELEMENT>
void oomph::TriangleMesh< ELEMENT >::set_mesh_level_time_stepper ( TimeStepper *const &  time_stepper_pt,
const bool &  preserve_existing_data 
)
inline

Overload set_mesh_level_time_stepper so that the stored time stepper now corresponds to the new timestepper.

Definition at line 829 of file triangle_mesh.template.h.

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

◆ shared_boundaries_ids() [1/7]

template<class ELEMENT>
Vector<Vector<Vector<unsigned> > > oomph::TriangleMesh< ELEMENT >::shared_boundaries_ids ( ) const
inlineprotected

◆ shared_boundaries_ids() [2/7]

template<class ELEMENT>
Vector<Vector<Vector<unsigned> > >& oomph::TriangleMesh< ELEMENT >::shared_boundaries_ids ( )
inlineprotected

Definition at line 1369 of file triangle_mesh.template.h.

◆ shared_boundaries_ids() [3/7]

template<class ELEMENT>
Vector<Vector<unsigned> > oomph::TriangleMesh< ELEMENT >::shared_boundaries_ids ( const unsigned &  p) const
inlineprotected

Definition at line 1372 of file triangle_mesh.template.h.

◆ shared_boundaries_ids() [4/7]

template<class ELEMENT>
Vector<Vector<unsigned> >& oomph::TriangleMesh< ELEMENT >::shared_boundaries_ids ( const unsigned &  p)
inlineprotected

Definition at line 1375 of file triangle_mesh.template.h.

◆ shared_boundaries_ids() [5/7]

template<class ELEMENT>
Vector<unsigned> oomph::TriangleMesh< ELEMENT >::shared_boundaries_ids ( const unsigned &  p,
const unsigned &  q 
) const
inlineprotected

Definition at line 1378 of file triangle_mesh.template.h.

◆ shared_boundaries_ids() [6/7]

template<class ELEMENT>
Vector<unsigned>& oomph::TriangleMesh< ELEMENT >::shared_boundaries_ids ( const unsigned &  p,
const unsigned &  q 
)
inlineprotected

Definition at line 1382 of file triangle_mesh.template.h.

◆ shared_boundaries_ids() [7/7]

template<class ELEMENT>
const unsigned oomph::TriangleMesh< ELEMENT >::shared_boundaries_ids ( const unsigned &  p,
const unsigned &  q,
const unsigned &  i 
) const
inlineprotected

Definition at line 1385 of file triangle_mesh.template.h.

◆ shared_boundaries_in_this_processor()

template<class ELEMENT>
void oomph::TriangleMesh< ELEMENT >::shared_boundaries_in_this_processor ( Vector< unsigned > &  shared_boundaries_in_this_processor)
inlineprotected

Get the shared boundaries ids living in the current processor.

Definition at line 1296 of file triangle_mesh.template.h.

References oomph::TriangleMeshParameters::communicator_pt().

◆ shared_boundary_element_pt()

template<class ELEMENT>
FiniteElement* oomph::TriangleMesh< ELEMENT >::shared_boundary_element_pt ( const unsigned &  b,
const unsigned &  e 
)
inlineprotected

Definition at line 1456 of file triangle_mesh.template.h.

◆ shared_boundary_from_processors() [1/2]

template<class ELEMENT>
std::map<unsigned, Vector<unsigned> >& oomph::TriangleMesh< ELEMENT >::shared_boundary_from_processors ( )
inlineprotected

Return the association of the shared boundaries with the processors.

Definition at line 1608 of file triangle_mesh.template.h.

◆ shared_boundary_from_processors() [2/2]

template<class ELEMENT>
Vector<unsigned>& oomph::TriangleMesh< ELEMENT >::shared_boundary_from_processors ( const unsigned &  b)
inlineprotected

Definition at line 1611 of file triangle_mesh.template.h.

◆ shared_boundary_node_pt()

template<class ELEMENT>
Node* oomph::TriangleMesh< ELEMENT >::shared_boundary_node_pt ( const unsigned &  b,
const unsigned &  n 
)
inlineprotected

Definition at line 1557 of file triangle_mesh.template.h.

◆ shared_boundary_overlapping_internal_boundary()

template<class ELEMENT>
const unsigned oomph::TriangleMesh< ELEMENT >::shared_boundary_overlapping_internal_boundary ( const unsigned &  shd_bnd_id)
inlineprotected

Gets the boundary id of the internal boundary that the shared boundary lies on.

Definition at line 1653 of file triangle_mesh.template.h.

◆ shared_boundary_overlaps_internal_boundary() [1/2]

template<class ELEMENT>
const bool oomph::TriangleMesh< ELEMENT >::shared_boundary_overlaps_internal_boundary ( const unsigned &  shd_bnd_id)
inlineprotected

Checks if the shared boundary overlaps an internal boundary.

Definition at line 1639 of file triangle_mesh.template.h.

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

◆ shared_boundary_overlaps_internal_boundary() [2/2]

template<class ELEMENT>
std::map<unsigned, unsigned>& oomph::TriangleMesh< ELEMENT >::shared_boundary_overlaps_internal_boundary ( )
inlineprotected

Gets the storage that indicates if a shared boundary is part of an internal boundary.

Definition at line 1717 of file triangle_mesh.template.h.

◆ shared_boundary_polyline_pt() [1/2]

template<class ELEMENT>
Vector<TriangleMeshPolyLine*>& oomph::TriangleMesh< ELEMENT >::shared_boundary_polyline_pt ( const unsigned &  p,
const unsigned &  c 
)
inlineprotected

Definition at line 1397 of file triangle_mesh.template.h.

◆ shared_boundary_polyline_pt() [2/2]

template<class ELEMENT>
TriangleMeshPolyLine* oomph::TriangleMesh< ELEMENT >::shared_boundary_polyline_pt ( const unsigned &  p,
const unsigned &  c,
const unsigned &  i 
) const
inlineprotected

Definition at line 1401 of file triangle_mesh.template.h.

◆ sort_polylines_helper()

template<class ELEMENT >
void oomph::TriangleMesh< ELEMENT >::sort_polylines_helper ( Vector< TriangleMeshPolyLine *> &  unsorted_polylines_pt,
Vector< Vector< TriangleMeshPolyLine *> > &  sorted_polylines_pt 
)
protected

Sorts the polylines so they be continuous and then we can create a closed or open curve from them.

Definition at line 11217 of file triangle_mesh.template.cc.

Referenced by oomph::TriangleMesh< ELEMENT >::update_holes_information_helper().

◆ synchronize_boundary_coordinates()

template<class ELEMENT >
void oomph::TriangleMesh< ELEMENT >::synchronize_boundary_coordinates ( const unsigned &  b)

In charge of sinchronize the boundary coordinates for internal boundaries that were split as part of the distribution process. Called after setup_boundary_coordinates() for the original mesh only.

======================================================================== In charge of sinchronize the boundary coordinates for internal boundaries that were split as part of the distribution process. Called after setup_boundary_coordinates() for the

original mesh only

Definition at line 5584 of file triangle_mesh.template.cc.

References oomph::TriangleMesh< ELEMENT >::re_scale_re_assigned_initial_zeta_values_for_internal_boundary().

Referenced by oomph::TriangleMesh< ELEMENT >::select_boundary_face_elements().

◆ triangulateio_exists()

template<class ELEMENT>
bool oomph::TriangleMesh< ELEMENT >::triangulateio_exists ( )
inline

Boolean defining if Triangulateio object has been built or not.

Definition at line 1093 of file triangle_mesh.template.h.

◆ update_holes_information_helper()

template<class ELEMENT >
void oomph::TriangleMesh< ELEMENT >::update_holes_information_helper ( Vector< TriangleMeshPolygon *> &  polygons_pt,
Vector< Vector< double > > &  output_holes_coordinates 
)
protected

Keeps those vertices that define a hole, those that are inside closed internal boundaries in the new polygons that define the domain. Delete those outside/inside the outer polygons (this is required since Triangle can not deal with vertices that define holes outside the new outer polygons of the domain)

Definition at line 10801 of file triangle_mesh.template.cc.

References oomph::TriangleMesh< ELEMENT >::sort_polylines_helper(), oomph::TriangleMesh< ELEMENT >::Point::x, and oomph::TriangleMesh< ELEMENT >::Point::y.

◆ update_triangulateio() [1/2]

template<class ELEMENT>
void oomph::TriangleMesh< ELEMENT >::update_triangulateio ( Vector< Vector< double > > &  internal_point)
inline

Update the TriangulateIO object to the current nodal position and the centre hole coordinates.

Definition at line 907 of file triangle_mesh.template.h.

◆ update_triangulateio() [2/2]

template<class ELEMENT>
void oomph::TriangleMesh< ELEMENT >::update_triangulateio ( )
inline

Update the triangulateio object to the current nodal positions.

Definition at line 927 of file triangle_mesh.template.h.

Member Data Documentation

◆ Boundary_marked_as_shared_boundary

template<class ELEMENT>
std::map<unsigned, std::vector<bool> > oomph::TriangleMesh< ELEMENT >::Boundary_marked_as_shared_boundary
protected

Flag to indicate if an internal boundary will be used as shared boundary because there is overlapping of the internal boundary with the shared boundary.

Definition at line 1853 of file triangle_mesh.template.h.

◆ Boundary_subpolylines

template<class ELEMENT>
std::map<unsigned, Vector<TriangleMeshPolyLine*> > oomph::TriangleMesh< ELEMENT >::Boundary_subpolylines
protected

The polylines that will temporary represent the boundary that was splitted in the distribution process. Used to ease the sending of info. to Triangle during the adaptation process.

Definition at line 1848 of file triangle_mesh.template.h.

◆ Boundary_was_splitted

template<class ELEMENT>
std::map<unsigned, bool> oomph::TriangleMesh< ELEMENT >::Boundary_was_splitted
protected

Flag to indicate if a polyline has been splitted during the distribution process, the boundary id of the polyline is used to indicate if spplited.

Definition at line 1843 of file triangle_mesh.template.h.

◆ Face_index_at_shared_boundary

template<class ELEMENT>
std::map<unsigned, Vector<int> > oomph::TriangleMesh< ELEMENT >::Face_index_at_shared_boundary
protected

For the e-th finite element on shared boundary b, this is the index of the face that lies along that boundary.

Definition at line 1835 of file triangle_mesh.template.h.

◆ Final_shared_boundary_id

template<class ELEMENT>
unsigned oomph::TriangleMesh< ELEMENT >::Final_shared_boundary_id
protected

The final boundary id for shared boundaries.

Definition at line 1805 of file triangle_mesh.template.h.

◆ First_time_compute_holes_left_by_halo_elements

template<class ELEMENT>
bool oomph::TriangleMesh< ELEMENT >::First_time_compute_holes_left_by_halo_elements
protected

Flag to know if it is the first time we are going to compute the holes left by the halo elements.

Definition at line 1889 of file triangle_mesh.template.h.

◆ Initial_shared_boundary_id

template<class ELEMENT>
unsigned oomph::TriangleMesh< ELEMENT >::Initial_shared_boundary_id
protected

The initial boundary id for shared boundaries.

Definition at line 1802 of file triangle_mesh.template.h.

◆ Oomph_vertex_nodes_id

template<class ELEMENT>
Vector<unsigned> oomph::TriangleMesh< ELEMENT >::Oomph_vertex_nodes_id
protected

Vector storing oomph-lib node number for all vertex nodes in the TriangulateIO representation of the mesh.

Definition at line 1278 of file triangle_mesh.template.h.

◆ Original_extra_holes_coordinates

template<class ELEMENT>
Vector<Vector<double> > oomph::TriangleMesh< ELEMENT >::Original_extra_holes_coordinates
protected

Backup the original extra holes coordinates.

Definition at line 1892 of file triangle_mesh.template.h.

◆ Regions_areas

template<class ELEMENT>
std::map<unsigned, double> oomph::TriangleMesh< ELEMENT >::Regions_areas
protected

Target areas for regions; defaults to 0.0 which (luckily) implies "no specific target area" for triangle!

Definition at line 1118 of file triangle_mesh.template.h.

◆ Shared_boundaries_ids

template<class ELEMENT>
Vector<Vector<Vector<unsigned> > > oomph::TriangleMesh< ELEMENT >::Shared_boundaries_ids
protected

Stores the boundaries ids created by the interaction of two processors Shared_boundaries_ids[iproc][jproc] = Vector of shared boundaries ids "iproc" processor shares boundaries with "jproc" processor.

Definition at line 1810 of file triangle_mesh.template.h.

◆ Shared_boundary_element_pt

template<class ELEMENT>
std::map<unsigned, Vector<FiniteElement*> > oomph::TriangleMesh< ELEMENT >::Shared_boundary_element_pt
protected

Stores the boundary elements adjacent to the shared boundaries, these elements are a subset of the halo and haloed elements.

Definition at line 1831 of file triangle_mesh.template.h.

◆ Shared_boundary_from_processors

template<class ELEMENT>
std::map<unsigned, Vector<unsigned> > oomph::TriangleMesh< ELEMENT >::Shared_boundary_from_processors
protected

Stores the processors involved in the generation of a shared boundary, in 2D two processors give rise to the creation of a shared boundary.

Definition at line 1815 of file triangle_mesh.template.h.

◆ Shared_boundary_node_pt

template<class ELEMENT>
std::map<unsigned, Vector<Node*> > oomph::TriangleMesh< ELEMENT >::Shared_boundary_node_pt
protected

Stores the boundary nodes adjacent to the shared boundaries, these nodes are a subset of the halo and haloed nodes.

Definition at line 1839 of file triangle_mesh.template.h.

◆ Shared_boundary_overlaps_internal_boundary

template<class ELEMENT>
std::map<unsigned, unsigned> oomph::TriangleMesh< ELEMENT >::Shared_boundary_overlaps_internal_boundary
protected

Stores information about those shared boundaries that lie over or over a segment of an internal boundary (only used when using internal boundaries in the domain)

Definition at line 1820 of file triangle_mesh.template.h.

◆ Shared_boundary_polyline_pt

template<class ELEMENT>
Vector<Vector<Vector<TriangleMeshPolyLine*> > > oomph::TriangleMesh< ELEMENT >::Shared_boundary_polyline_pt
protected

Stores the polyline representation of the shared boundaries Shared_boundary_polyline_pt[iproc][ncurve][npolyline] = polyline_pt.

Definition at line 1824 of file triangle_mesh.template.h.

◆ Time_stepper_pt

template<class ELEMENT>
TimeStepper* oomph::TriangleMesh< ELEMENT >::Time_stepper_pt

Timestepper used to build elements.

Definition at line 1108 of file triangle_mesh.template.h.

◆ Tmp_mesh_pt

template<class ELEMENT>
TriangleScaffoldMesh* oomph::TriangleMesh< ELEMENT >::Tmp_mesh_pt
protected

Temporary scaffold mesh.

Definition at line 1274 of file triangle_mesh.template.h.

◆ Triangulateio_exists

template<class ELEMENT>
bool oomph::TriangleMesh< ELEMENT >::Triangulateio_exists
protected

Boolean defining if Triangulateio object has been built or not.

Definition at line 1269 of file triangle_mesh.template.h.

◆ Use_attributes

template<class ELEMENT>
bool oomph::TriangleMesh< ELEMENT >::Use_attributes

Boolean flag to indicate whether to use attributes or not (required for multidomain meshes)

Definition at line 1112 of file triangle_mesh.template.h.


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