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

Class definining a curvilinear triangle mesh boundary in terms of a GeomObject. Curvlinear equivalent of PolyLine. More...

#include <unstructured_two_d_mesh_geometry_base.h>

+ Inheritance diagram for oomph::TriangleMeshCurviLine:

Public Member Functions

 TriangleMeshCurviLine (GeomObject *geom_object_pt, const double &zeta_start, const double &zeta_end, const unsigned &nsegment, const unsigned &boundary_id, const bool &space_vertices_evenly_in_arclength=true, const unsigned &boundary_chunk=0)
 Constructor: Specify GeomObject, the start and end coordinates of the relevant boundary in terms of the GeomObject's intrinsic coordinate, the number of (initially straight-line) segments that this GeomObject is to be split up into, and the boundary ID. The final optional boolean argument specifies if vertices in polygonhal represenation are spaced (approximately) evenly in arclength along the GeomObject [true, default] or in equal increments in zeta. This is the curvlinear equivalent of PolyLine. More...
 
virtual ~TriangleMeshCurviLine ()
 Empty Destuctor. More...
 
GeomObjectgeom_object_pt ()
 Pointer to GeomObject that represents this part of the boundary. More...
 
double zeta_start ()
 Start coordinate in terms of the GeomObject's intrinsic coordinate. More...
 
double zeta_end ()
 End coordinate in terms of the GeomObject's intrinsic coordinate. More...
 
unsigned nsegment () const
 Number of (initially straight-line) segments that this part of the boundary is to be represented by. More...
 
unsigned & nsegment ()
 Number of (initially straight-line) segments that this part of the boundary is to be represented by. This version allows the change of the 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...
 
void output (std::ostream &outfile, const unsigned &n_sample=50)
 Output curvilinear boundary at n_sample (default: 50) points. More...
 
bool space_vertices_evenly_in_arclength () const
 Boolean to indicate if vertices in polygonal representation of the Curvline are spaced (approximately) evenly in arclength along the GeomObject [true] or in equal increments in zeta [false]. More...
 
unsigned nvertex () const
 Number of vertices. 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...
 
bool are_there_connection_points ()
 Does the vector for storing connections has elements? More...
 
Vector< double > * connection_points_pt ()
 Returns the connection points vector. More...
 
void add_connection_point (const double &z_value, const double &tol=1.0e-12)
 Add the connection point (z_value) to the connection points that receive the curviline. 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

GeomObjectGeom_object_pt
 Pointer to GeomObject that represents this part of the boundary. More...
 
double Zeta_start
 Start coordinate in terms of the GeomObject's intrinsic coordinate. More...
 
double Zeta_end
 End coordinate in terms of the GeomObject's intrinsic coordinate. More...
 
unsigned Nsegment
 Number of (initially straight-line) segments that this part of the boundary is to be represented by. More...
 
unsigned Boundary_id
 Boundary ID. More...
 
bool Space_vertices_evenly_in_arclength
 Boolean to indicate if vertices in polygonal representation of the Curviline are spaced (approximately) evenly in arclength along the GeomObject [true] or in equal increments in zeta [false]. More...
 
unsigned Boundary_chunk
 Boundary chunk (Used when a boundary is represented by more than one polyline. More...
 
Vector< double > Connection_points_pt
 Stores the information for connections received on the curviline. Used when converting to 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 definining a curvilinear triangle mesh boundary in terms of a GeomObject. Curvlinear equivalent of PolyLine.

Definition at line 661 of file unstructured_two_d_mesh_geometry_base.h.

Constructor & Destructor Documentation

◆ TriangleMeshCurviLine()

oomph::TriangleMeshCurviLine::TriangleMeshCurviLine ( GeomObject geom_object_pt,
const double &  zeta_start,
const double &  zeta_end,
const unsigned &  nsegment,
const unsigned &  boundary_id,
const bool &  space_vertices_evenly_in_arclength = true,
const unsigned &  boundary_chunk = 0 
)
inline

Constructor: Specify GeomObject, the start and end coordinates of the relevant boundary in terms of the GeomObject's intrinsic coordinate, the number of (initially straight-line) segments that this GeomObject is to be split up into, and the boundary ID. The final optional boolean argument specifies if vertices in polygonhal represenation are spaced (approximately) evenly in arclength along the GeomObject [true, default] or in equal increments in zeta. This is the curvlinear equivalent of PolyLine.

Definition at line 673 of file unstructured_two_d_mesh_geometry_base.h.

◆ ~TriangleMeshCurviLine()

virtual oomph::TriangleMeshCurviLine::~TriangleMeshCurviLine ( )
inlinevirtual

Empty Destuctor.

Definition at line 693 of file unstructured_two_d_mesh_geometry_base.h.

Member Function Documentation

◆ add_connection_point()

void oomph::TriangleMeshCurviLine::add_connection_point ( const double &  z_value,
const double &  tol = 1.0e-12 
)
inline

Add the connection point (z_value) to the connection points that receive the curviline.

Definition at line 800 of file unstructured_two_d_mesh_geometry_base.h.

References Connection_points_pt, i, Zeta_end, and Zeta_start.

Referenced by oomph::TriangleMeshCurveSection::connect_final_vertex_to_curviline(), and oomph::TriangleMeshCurveSection::connect_initial_vertex_to_curviline().

◆ are_there_connection_points()

bool oomph::TriangleMeshCurviLine::are_there_connection_points ( )
inline

Does the vector for storing connections has elements?

Definition at line 787 of file unstructured_two_d_mesh_geometry_base.h.

References Connection_points_pt.

Referenced by oomph::UnstructuredTwoDMeshGeometryBase::curviline_to_polyline().

◆ boundary_chunk()

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

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

Implements oomph::TriangleMeshCurveSection.

Definition at line 736 of file unstructured_two_d_mesh_geometry_base.h.

References Boundary_chunk.

Referenced by oomph::TriangleMeshCurveSection::connect_final_vertex_to_curviline(), and oomph::TriangleMeshCurveSection::connect_initial_vertex_to_curviline().

◆ boundary_id()

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

◆ connection_points_pt()

Vector<double>* oomph::TriangleMeshCurviLine::connection_points_pt ( )
inline

◆ final_vertex_coordinate()

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

Get last vertex coordinates.

Implements oomph::TriangleMeshCurveSection.

Definition at line 779 of file unstructured_two_d_mesh_geometry_base.h.

References Geom_object_pt, oomph::GeomObject::position(), and Zeta_end.

◆ geom_object_pt()

GeomObject* oomph::TriangleMeshCurviLine::geom_object_pt ( )
inline

◆ initial_vertex_coordinate()

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

Get first vertex coordinates.

Implements oomph::TriangleMeshCurveSection.

Definition at line 771 of file unstructured_two_d_mesh_geometry_base.h.

References Geom_object_pt, oomph::GeomObject::position(), and Zeta_start.

◆ nsegment() [1/2]

unsigned& oomph::TriangleMeshCurviLine::nsegment ( )
inline

Number of (initially straight-line) segments that this part of the boundary is to be represented by. This version allows the change of the number of segments.

Definition at line 723 of file unstructured_two_d_mesh_geometry_base.h.

References Nsegment.

◆ nsegment() [2/2]

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

Number of (initially straight-line) segments that this part of the boundary is to be represented by.

Implements oomph::TriangleMeshCurveSection.

Definition at line 715 of file unstructured_two_d_mesh_geometry_base.h.

References Nsegment.

Referenced by oomph::UnstructuredTwoDMeshGeometryBase::create_vertex_coordinates_for_polyline_connections(), and oomph::UnstructuredTwoDMeshGeometryBase::create_vertex_coordinates_for_polyline_no_connections().

◆ nvertex()

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

Number of vertices.

Implements oomph::TriangleMeshCurveSection.

Definition at line 765 of file unstructured_two_d_mesh_geometry_base.h.

◆ output()

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

Output curvilinear boundary at n_sample (default: 50) points.

Implements oomph::TriangleMeshCurveSection.

Definition at line 742 of file unstructured_two_d_mesh_geometry_base.h.

References Boundary_id, Geom_object_pt, i, oomph::GeomObject::position(), Zeta_end, and Zeta_start.

◆ space_vertices_evenly_in_arclength()

bool oomph::TriangleMeshCurviLine::space_vertices_evenly_in_arclength ( ) const
inline

Boolean to indicate if vertices in polygonal representation of the Curvline are spaced (approximately) evenly in arclength along the GeomObject [true] or in equal increments in zeta [false].

Definition at line 759 of file unstructured_two_d_mesh_geometry_base.h.

References Space_vertices_evenly_in_arclength.

Referenced by oomph::UnstructuredTwoDMeshGeometryBase::create_vertex_coordinates_for_polyline_connections(), and oomph::UnstructuredTwoDMeshGeometryBase::create_vertex_coordinates_for_polyline_no_connections().

◆ zeta_end()

double oomph::TriangleMeshCurviLine::zeta_end ( )
inline

◆ zeta_start()

double oomph::TriangleMeshCurviLine::zeta_start ( )
inline

Member Data Documentation

◆ Boundary_chunk

unsigned oomph::TriangleMeshCurviLine::Boundary_chunk
private

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

Definition at line 856 of file unstructured_two_d_mesh_geometry_base.h.

Referenced by boundary_chunk().

◆ Boundary_id

unsigned oomph::TriangleMeshCurviLine::Boundary_id
private

Boundary ID.

Definition at line 847 of file unstructured_two_d_mesh_geometry_base.h.

Referenced by boundary_id(), and output().

◆ Connection_points_pt

Vector<double> oomph::TriangleMeshCurviLine::Connection_points_pt
private

Stores the information for connections received on the curviline. Used when converting to polyline.

Definition at line 860 of file unstructured_two_d_mesh_geometry_base.h.

Referenced by add_connection_point(), are_there_connection_points(), and connection_points_pt().

◆ Geom_object_pt

GeomObject* oomph::TriangleMeshCurviLine::Geom_object_pt
private

Pointer to GeomObject that represents this part of the boundary.

Definition at line 834 of file unstructured_two_d_mesh_geometry_base.h.

Referenced by final_vertex_coordinate(), geom_object_pt(), initial_vertex_coordinate(), and output().

◆ Nsegment

unsigned oomph::TriangleMeshCurviLine::Nsegment
private

Number of (initially straight-line) segments that this part of the boundary is to be represented by.

Definition at line 844 of file unstructured_two_d_mesh_geometry_base.h.

Referenced by nsegment().

◆ Space_vertices_evenly_in_arclength

bool oomph::TriangleMeshCurviLine::Space_vertices_evenly_in_arclength
private

Boolean to indicate if vertices in polygonal representation of the Curviline are spaced (approximately) evenly in arclength along the GeomObject [true] or in equal increments in zeta [false].

Definition at line 852 of file unstructured_two_d_mesh_geometry_base.h.

Referenced by space_vertices_evenly_in_arclength().

◆ Zeta_end

double oomph::TriangleMeshCurviLine::Zeta_end
private

End coordinate in terms of the GeomObject's intrinsic coordinate.

Definition at line 840 of file unstructured_two_d_mesh_geometry_base.h.

Referenced by add_connection_point(), final_vertex_coordinate(), output(), and zeta_end().

◆ Zeta_start

double oomph::TriangleMeshCurviLine::Zeta_start
private

Start coordinate in terms of the GeomObject's intrinsic coordinate.

Definition at line 837 of file unstructured_two_d_mesh_geometry_base.h.

Referenced by add_connection_point(), initial_vertex_coordinate(), output(), and zeta_start().


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