Public Member Functions | Private Attributes | List of all members
oomph::TriangleMeshPolyLine Class Reference

Class defining a polyline for use in Triangle Mesh generation. More...

#include <unstructured_two_d_mesh_geometry_base.h>

+ Inheritance diagram for oomph::TriangleMeshPolyLine:

Public Member Functions

 TriangleMeshPolyLine (const Vector< Vector< double >> &vertex_coordinate, const unsigned &boundary_id, const unsigned &boundary_chunk=0)
 Constructor: Takes vectors of vertex coordinates in order Also allows the optional specification of a boundary ID – useful in a mesh generation context. If not specified it defaults to zero. More...
 
virtual ~TriangleMeshPolyLine ()
 Empty destructor. More...
 
unsigned nvertex () const
 Number of vertices. More...
 
unsigned nsegment () const
 Number of segments. More...
 
unsigned boundary_id () const
 Boundary id. More...
 
unsigned boundary_chunk () const
 Boundary chunk (Used when a boundary is represented by more than one polyline. More...
 
Vector< double > vertex_coordinate (const unsigned &i) const
 Coordinate vector of i-th vertex (const version) More...
 
Vector< double > & vertex_coordinate (const unsigned &i)
 Coordinate vector of i-th vertex. More...
 
void initial_vertex_coordinate (Vector< double > &vertex)
 Get first vertex coordinates. More...
 
void final_vertex_coordinate (Vector< double > &vertex)
 Get last vertex coordinates. More...
 
void output (std::ostream &outfile, const unsigned &n_sample=50)
 Output the polyline – n_sample is ignored. More...
 
void reverse ()
 Reverse the polyline, this includes the connection information and the vertices order. More...
 
- Public Member Functions inherited from oomph::TriangleMeshCurveSection
 TriangleMeshCurveSection ()
 Empty constructor. Initialises the curve section as non connected. More...
 
virtual ~TriangleMeshCurveSection ()
 Empty destructor. More...
 
void enable_refinement_tolerance (const double &tolerance=0.08)
 Enable refinement of curve section to create a better representation of curvilinear boundaries (e.g. in free-surface problems). See tutorial for interpretation of the optional argument which specifies the refinement tolerance. It defaults to 0.08 and the smaller the number the finer the surface representation. More...
 
void set_refinement_tolerance (const double &tolerance)
 Set tolerance for refinement of curve sections to create a better representation of curvilinear boundaries (e.g. in free-surface problems). See tutorial for interpretation of the refinement tolerance. (The smaller the number the finer the surface representation). If set to a negative value, we're switching off refinement – equivalent to calling disable_polyline_refinement() More...
 
double refinement_tolerance ()
 Get tolerance for refinement of curve sections to create a better representation of curvilinear boundaries (e.g. in free-surface problems). See tutorial for interpretation. If it's negative refinement is disabled. More...
 
void disable_refinement_tolerance ()
 Disable refinement of curve section. More...
 
void enable_unrefinement_tolerance (const double &tolerance=0.04)
 Enable unrefinement of curve sections to avoid unnecessarily large numbers of elements on of curvilinear boundaries (e.g. in free-surface problems). See tutorial for interpretation of the optional argument which specifies the unrefinement tolerance. It defaults to 0.04 and the larger the number the more agressive we are when removing unnecessary vertices on gently curved polylines. More...
 
void set_unrefinement_tolerance (const double &tolerance)
 Set tolerance for unrefinement of curve sections to avoid unnecessarily large numbers of elements on of curvilinear boundaries (e.g. in free-surface problems). See tutorial for interpretation of the optional argument which specifies the unrefinement tolerance. It defaults to 0.04 and the larger the number the more agressive we are when removing unnecessary vertices on gently curved polylines. If set to a negative value, we're switching off unrefinement – equivalent to calling disable_curve_section_unrefinement() More...
 
double unrefinement_tolerance ()
 Get tolerance for unrefinement of curve section to create a better representation of curvilinear boundaries (e.g. in free-surface problems). See tutorial for interpretation. If it's negative unrefinement is disabled. More...
 
void disable_unrefinement_tolerance ()
 Disable unrefinement of curve sections. More...
 
void set_maximum_length (const double &maximum_length)
 Allows to specify the maximum distance between two vertices that define the associated polyline of the curve section, it only takes effect on the unrefinement and refinement steps. More...
 
void disable_use_maximum_length ()
 Disables the use of the maximum length criteria on the unrefinement or refinement steps. More...
 
double maximum_length ()
 Gets access to the maximum length variable. More...
 
void connect_initial_vertex_to_polyline (TriangleMeshPolyLine *polyline_pt, const unsigned &vertex_number, const double &tolerance_for_connection=1.0e-14)
 Connects the initial vertex of the curve section to a desired target polyline by specifying the vertex number. There is a checking which verifies that the initial vertex is close enough to the destination vertex on the target polyline by no more than the specified tolerance. More...
 
void connect_final_vertex_to_polyline (TriangleMeshPolyLine *polyline_pt, const unsigned &vertex_number, const double &tolerance_for_connection=1.0e-14)
 Connects the final vertex of the curve section to a desired target polyline by specifying the vertex number. There is a checking which verifies that the final vertex is close enough to the destination vertex on the target polyline by no more than the specified tolerance. More...
 
void connect_initial_vertex_to_curviline (TriangleMeshCurviLine *curviline_pt, const double &s_value, const double &tolerance_for_connection=1.0e-14)
 Connects the initial vertex of the curve section to a desired target curviline by specifying the s value (intrinsic value on the geometric object of the curviline) where to connect on the target curviline. There is a checking which verifies that the initial vertex and the coordinates on the given s value are close enough by no more than the given tolerance. More...
 
void connect_final_vertex_to_curviline (TriangleMeshCurviLine *curviline_pt, const double &s_value, const double &tolerance_for_connection=1.0e-14)
 Connects the final vertex of the curve section to a desired target curviline by specifying the s value (intrinsic value on the geometric object of the curviline) where to connect on the target curviline. There is a checking which verifies that the final vertex and the coordinates on the given s value are close enough by no more than the given tolerance. More...
 
bool is_initial_vertex_connected () const
 Test whether initial vertex is connected or not. More...
 
void set_initial_vertex_connected ()
 Sets the initial vertex as connected. More...
 
void unset_initial_vertex_connected ()
 Sets the initial vertex as non connected. More...
 
void suspend_initial_vertex_connected ()
 Set the initial vertex connection as suspended, it will be resumed when the method to resume the connections is called This method is only used in a distributed context, when the boundary to connect is no longer part of the domain in the processor. More...
 
void resume_initial_vertex_connected ()
 Resumes the initial vertex connection, it may be that after load balancing the boundary to which the connection was suspended be part of the domain. More...
 
bool is_final_vertex_connected () const
 Test whether final vertex is connected or not. More...
 
void set_final_vertex_connected ()
 Sets the final vertex as connected. More...
 
void unset_final_vertex_connected ()
 Sets the final vertex as non connected. More...
 
void suspend_final_vertex_connected ()
 Set the final vertex connection as suspended, it will be resumed when the method to resume the connections is called This method is only used in a distributed context, when the boundary to connect is no longer part of the domain in the processor. More...
 
void resume_final_vertex_connected ()
 Resumes the final vertex connection, it may be that after load balancing the boundary to which the connection was suspended be part of the domain. More...
 
unsigned initial_vertex_connected_bnd_id () const
 Gets the id to which the initial end is connected. More...
 
unsigned & initial_vertex_connected_bnd_id ()
 Sets the id to which the initial end is connected. More...
 
unsigned initial_vertex_connected_n_vertex () const
 Gets the vertex number to which the initial end is connected. More...
 
unsigned & initial_vertex_connected_n_vertex ()
 Sets the vertex number to which the initial end is connected. More...
 
unsigned initial_vertex_connected_n_chunk () const
 Gets the boundary chunk to which the initial end is connected. More...
 
unsigned & initial_vertex_connected_n_chunk ()
 Sets the boundary chunk to which the initial end is connected. More...
 
unsigned final_vertex_connected_bnd_id () const
 Gets the id to which the final end is connected. More...
 
unsigned & final_vertex_connected_bnd_id ()
 Sets the id to which the final end is connected. More...
 
unsigned final_vertex_connected_n_vertex () const
 Sets the vertex number to which the final end is connected. More...
 
unsigned & final_vertex_connected_n_vertex ()
 Gets the vertex number to which the final end is connected. More...
 
unsigned final_vertex_connected_n_chunk () const
 Gets the boundary chunk to which the final end is connected. More...
 
unsigned & final_vertex_connected_n_chunk ()
 Sets the boundary chunk to which the final end is connected. More...
 
bool is_initial_vertex_connected_to_curviline () const
 Test whether the initial vertex is connected to a curviline. More...
 
void set_initial_vertex_connected_to_curviline ()
 Sets the initial vertex as connected to a curviline. More...
 
void unset_initial_vertex_connected_to_curviline ()
 Sets the initial vertex as non connected to a curviline. More...
 
bool is_final_vertex_connected_to_curviline () const
 Test whether the final vertex is connected to a curviline. More...
 
void set_final_vertex_connected_to_curviline ()
 Sets the final vertex as connected to a curviline. More...
 
void unset_final_vertex_connected_to_curviline ()
 Sets the final vertex as non connected to a curviline. More...
 
double initial_s_connection_value () const
 Gets the s value to which the initial end is connected. More...
 
double & initial_s_connection_value ()
 Sets the s value to which the initial end is connected. More...
 
double final_s_connection_value () const
 Gets the s value to which the final end is connected. More...
 
double & final_s_connection_value ()
 Sets the s value to which the final end is connected. More...
 
double tolerance_for_s_connection () const
 Gets the tolerance value for connections among curvilines. More...
 
double & tolerance_for_s_connection ()
 Sets the tolerance value for connections among curvilines. More...
 

Private Attributes

Vector< Vector< double > > Vertex_coordinate
 Vector of Vector of vertex coordinates. More...
 
unsigned Boundary_id
 Boundary ID. More...
 
unsigned Boundary_chunk
 Boundary chunk (Used when a boundary is represented by more than one polyline. More...
 

Additional Inherited Members

- Protected Attributes inherited from oomph::TriangleMeshCurveSection
bool Initial_vertex_connected
 Used for stating if the initial end is connected to another boundary. More...
 
bool Final_vertex_connected
 Used for stating if the final end is connected to another boundary. More...
 
bool Initial_vertex_connected_suspended
 Indicates if the connection is suspended because the boundary to connect is no longer part of the domain (only used in a distributed context) More...
 
bool Final_vertex_connected_suspended
 Indicates if the connection is suspended because the boundary to connect is no longer part of the domain (only used in a distributed context) More...
 
unsigned Initial_vertex_connected_bnd_id
 Stores the id to which the initial end is connected. More...
 
unsigned Initial_vertex_connected_n_vertex
 Stores the vertex number used for connection with the initial end. More...
 
unsigned Initial_vertex_connected_n_chunk
 Stores the chunk number of the boundary to which is connected th initial end. More...
 
unsigned Final_vertex_connected_bnd_id
 Stores the id to which the initial end is connected. More...
 
unsigned Final_vertex_connected_n_vertex
 Stores the vertex number used for connection with the final end. More...
 
unsigned Final_vertex_connected_n_chunk
 Stores the chunk number of the boundary to which is connected th initial end. More...
 
bool Initial_vertex_connected_to_curviline
 States if the initial vertex is connected to a curviline. More...
 
bool Final_vertex_connected_to_curviline
 States if the final vertex is connected to a curviline. More...
 
double Initial_s_connection_value
 Stores the s value used for connecting the initial end with a curviline. More...
 
double Final_s_connection_value
 Stores the s value used for connecting the final end with a curviline. More...
 
double Tolerance_for_s_connection
 Tolerance used for connecting the ends to a curviline. More...
 

Detailed Description

Class defining a polyline for use in Triangle Mesh generation.

Definition at line 867 of file unstructured_two_d_mesh_geometry_base.h.

Constructor & Destructor Documentation

◆ TriangleMeshPolyLine()

oomph::TriangleMeshPolyLine::TriangleMeshPolyLine ( const Vector< Vector< double >> &  vertex_coordinate,
const unsigned &  boundary_id,
const unsigned &  boundary_chunk = 0 
)
inline

Constructor: Takes vectors of vertex coordinates in order Also allows the optional specification of a boundary ID – useful in a mesh generation context. If not specified it defaults to zero.

Definition at line 873 of file unstructured_two_d_mesh_geometry_base.h.

References i, and Vertex_coordinate.

◆ ~TriangleMeshPolyLine()

virtual oomph::TriangleMeshPolyLine::~TriangleMeshPolyLine ( )
inlinevirtual

Empty destructor.

Definition at line 901 of file unstructured_two_d_mesh_geometry_base.h.

Member Function Documentation

◆ boundary_chunk()

unsigned oomph::TriangleMeshPolyLine::boundary_chunk ( ) const
inlinevirtual

◆ boundary_id()

unsigned oomph::TriangleMeshPolyLine::boundary_id ( ) const
inlinevirtual

◆ final_vertex_coordinate()

void oomph::TriangleMeshPolyLine::final_vertex_coordinate ( Vector< double > &  vertex)
inlinevirtual

◆ initial_vertex_coordinate()

void oomph::TriangleMeshPolyLine::initial_vertex_coordinate ( Vector< double > &  vertex)
inlinevirtual

◆ nsegment()

unsigned oomph::TriangleMeshPolyLine::nsegment ( ) const
inlinevirtual

Number of segments.

Implements oomph::TriangleMeshCurveSection.

Definition at line 910 of file unstructured_two_d_mesh_geometry_base.h.

References Vertex_coordinate.

◆ nvertex()

unsigned oomph::TriangleMeshPolyLine::nvertex ( ) const
inlinevirtual

Number of vertices.

Implements oomph::TriangleMeshCurveSection.

Definition at line 904 of file unstructured_two_d_mesh_geometry_base.h.

References Vertex_coordinate.

Referenced by oomph::UnstructuredTwoDMeshGeometryBase::add_base_vertex_info_helper(), oomph::ImmersedRigidBodyTriangleMeshPolygon::assign_zeta(), oomph::UnstructuredTwoDMeshGeometryBase::build_triangulateio(), oomph::TriangleMeshCurveSection::connect_final_vertex_to_polyline(), oomph::TriangleMeshCurveSection::connect_initial_vertex_to_polyline(), oomph::TriangleMesh< ELEMENT >::create_distributed_domain_representation(), oomph::RefineableTriangleMesh< ELEMENT >::create_polylines_from_polyfiles(), oomph::TriangleMesh< ELEMENT >::create_shared_polylines_connections(), final_vertex_coordinate(), oomph::UnstructuredTwoDMeshGeometryBase::get_connected_vertex_number_on_destination_polyline(), oomph::RefineableTriangleMesh< ELEMENT >::get_connected_vertex_number_on_dst_boundary(), oomph::ImmersedRigidBodyTriangleMeshPolygon::get_initial_position(), oomph::ImmersedRigidBodyTriangleMeshPolygon::reset_reference_configuration(), oomph::RefineableTriangleMesh< ELEMENT >::restore_polyline_connections_helper(), oomph::RefineableTriangleMesh< ELEMENT >::surface_remesh_for_inner_hole_boundaries(), oomph::TriangleMeshClosedCurve::TriangleMeshClosedCurve(), oomph::TriangleMeshOpenCurve::TriangleMeshOpenCurve(), oomph::TriangleMeshPolygon::TriangleMeshPolygon(), and oomph::TriangleMesh< ELEMENT >::update_holes_information_helper().

◆ output()

void oomph::TriangleMeshPolyLine::output ( std::ostream &  outfile,
const unsigned &  n_sample = 50 
)
inlinevirtual

Output the polyline – n_sample is ignored.

Implements oomph::TriangleMeshCurveSection.

Definition at line 953 of file unstructured_two_d_mesh_geometry_base.h.

References Boundary_id, i, and Vertex_coordinate.

◆ reverse()

void oomph::TriangleMeshPolyLine::reverse ( )
inline

Reverse the polyline, this includes the connection information and the vertices order.

Definition at line 967 of file unstructured_two_d_mesh_geometry_base.h.

References oomph::TriangleMeshCurveSection::final_s_connection_value(), oomph::TriangleMeshCurveSection::final_vertex_connected_bnd_id(), oomph::TriangleMeshCurveSection::final_vertex_connected_n_chunk(), oomph::TriangleMeshCurveSection::final_vertex_connected_n_vertex(), oomph::TriangleMeshCurveSection::initial_s_connection_value(), oomph::TriangleMeshCurveSection::initial_vertex_connected_bnd_id(), oomph::TriangleMeshCurveSection::initial_vertex_connected_n_chunk(), oomph::TriangleMeshCurveSection::initial_vertex_connected_n_vertex(), oomph::TriangleMeshCurveSection::is_final_vertex_connected(), oomph::TriangleMeshCurveSection::is_final_vertex_connected_to_curviline(), oomph::TriangleMeshCurveSection::is_initial_vertex_connected(), oomph::TriangleMeshCurveSection::is_initial_vertex_connected_to_curviline(), oomph::TriangleMeshCurveSection::set_final_vertex_connected(), oomph::TriangleMeshCurveSection::set_final_vertex_connected_to_curviline(), oomph::TriangleMeshCurveSection::set_initial_vertex_connected(), oomph::TriangleMeshCurveSection::set_initial_vertex_connected_to_curviline(), oomph::TriangleMeshCurveSection::tolerance_for_s_connection(), oomph::TriangleMeshCurveSection::unset_final_vertex_connected(), oomph::TriangleMeshCurveSection::unset_final_vertex_connected_to_curviline(), oomph::TriangleMeshCurveSection::unset_initial_vertex_connected(), oomph::TriangleMeshCurveSection::unset_initial_vertex_connected_to_curviline(), and Vertex_coordinate.

Referenced by oomph::TriangleMesh< ELEMENT >::sort_polylines_helper(), oomph::RefineableTriangleMesh< ELEMENT >::update_open_curve_after_restart(), oomph::RefineableTriangleMesh< ELEMENT >::update_open_curve_using_elements_area(), oomph::RefineableTriangleMesh< ELEMENT >::update_open_curve_using_face_mesh(), oomph::RefineableTriangleMesh< ELEMENT >::update_polygon_after_restart(), oomph::RefineableTriangleMesh< ELEMENT >::update_polygon_using_elements_area(), and oomph::RefineableTriangleMesh< ELEMENT >::update_polygon_using_face_mesh().

◆ vertex_coordinate() [1/2]

Vector<double>& oomph::TriangleMeshPolyLine::vertex_coordinate ( const unsigned &  i)
inline

Coordinate vector of i-th vertex.

Definition at line 935 of file unstructured_two_d_mesh_geometry_base.h.

References i, and Vertex_coordinate.

◆ vertex_coordinate() [2/2]

Vector<double> oomph::TriangleMeshPolyLine::vertex_coordinate ( const unsigned &  i) const
inline

Coordinate vector of i-th vertex (const version)

Definition at line 929 of file unstructured_two_d_mesh_geometry_base.h.

References i, and Vertex_coordinate.

Referenced by oomph::ImmersedRigidBodyTriangleMeshPolygon::assign_zeta(), oomph::UnstructuredTwoDMeshGeometryBase::build_triangulateio(), oomph::TriangleMeshCurveSection::connect_final_vertex_to_polyline(), oomph::TriangleMeshCurveSection::connect_initial_vertex_to_polyline(), oomph::RefineableTriangleMesh< ELEMENT >::create_polylines_from_polyfiles(), oomph::TriangleMesh< ELEMENT >::create_shared_polylines_connections(), oomph::RefineableTriangleMesh< ELEMENT >::create_sorted_face_mesh_representation(), oomph::UnstructuredTwoDMeshGeometryBase::get_connected_vertex_number_on_destination_polyline(), oomph::RefineableTriangleMesh< ELEMENT >::get_connected_vertex_number_on_dst_boundary(), oomph::ImmersedRigidBodyTriangleMeshPolygon::get_initial_position(), oomph::ImmersedRigidBodyTriangleMeshPolygon::ImmersedRigidBodyTriangleMeshPolygon(), oomph::ImmersedRigidBodyTriangleMeshPolygon::reset_reference_configuration(), oomph::RefineableTriangleMesh< ELEMENT >::restore_polyline_connections_helper(), oomph::RefineableTriangleMesh< ELEMENT >::surface_remesh_for_inner_hole_boundaries(), oomph::TriangleMeshClosedCurve::TriangleMeshClosedCurve(), oomph::TriangleMeshOpenCurve::TriangleMeshOpenCurve(), oomph::TriangleMeshPolygon::TriangleMeshPolygon(), oomph::TriangleMesh< ELEMENT >::update_holes_information_helper(), oomph::RefineableTriangleMesh< ELEMENT >::update_open_curve_after_restart(), oomph::RefineableTriangleMesh< ELEMENT >::update_open_curve_using_elements_area(), oomph::RefineableTriangleMesh< ELEMENT >::update_polygon_after_restart(), oomph::RefineableTriangleMesh< ELEMENT >::update_polygon_using_elements_area(), and oomph::RefineableTriangleMesh< ELEMENT >::update_polygon_using_face_mesh().

Member Data Documentation

◆ Boundary_chunk

unsigned oomph::TriangleMeshPolyLine::Boundary_chunk
private

Boundary chunk (Used when a boundary is represented by more than one polyline.

Definition at line 1100 of file unstructured_two_d_mesh_geometry_base.h.

Referenced by boundary_chunk().

◆ Boundary_id

unsigned oomph::TriangleMeshPolyLine::Boundary_id
private

Boundary ID.

Definition at line 1096 of file unstructured_two_d_mesh_geometry_base.h.

Referenced by boundary_id(), and output().

◆ Vertex_coordinate

Vector<Vector<double> > oomph::TriangleMeshPolyLine::Vertex_coordinate
private

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