//////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// More...
#include <unstructured_two_d_mesh_geometry_base.h>
Public Member Functions | |
TriangleMeshPolygon (const Vector< TriangleMeshCurveSection * > &boundary_polyline_pt, const Vector< double > &internal_point_pt=Vector< double >(0), const bool &is_internal_point_fixed=false) | |
Constructor: Specify vector of pointers to TriangleMeshCurveSection that define the boundary of the segments of the polygon. Each TriangleMeshCurveSection has its own boundary ID and can contain multiple (straight-line) segments. For consistency across the various uses of this class, we insist that the closed boundary is represented by at least two separate TriangleMeshCurveSection whose joint vertices must be specified in both. (This is to allow the setup of unique boundary coordinate(s) around the polygon.) This may seem slightly annoying in cases where a polygon really only represents a single boundary, but... Note: The specified vector of pointers must consist of only TriangleMeshPolyLine elements. There is a checking on the PARANOID mode for this constraint. More... | |
virtual | ~TriangleMeshPolygon () |
Empty virtual destructor. More... | |
unsigned | ncurve_section () const |
Number of constituent curves. More... | |
unsigned | npolyline () const |
Number of constituent polylines. More... | |
TriangleMeshPolyLine * | polyline_pt (const unsigned &i) const |
Pointer to i-th constituent polyline. More... | |
TriangleMeshPolyLine * | polyline_pt (const unsigned &i) |
Pointer to i-th constituent polyline. More... | |
Vector< unsigned > | polygon_boundary_id () |
Return vector of boundary ids of associated polylines. More... | |
bool | is_redistribution_of_segments_between_polylines_enabled () |
Is re-distribution of polyline segments in the curve between different boundaries during adaptation enabled? More... | |
void | enable_redistribution_of_segments_between_polylines () |
Enable re-distribution of polyline segments in the curve between different boundaries during adaptation. More... | |
void | disable_redistribution_of_segments_between_polylines () |
Disable re-distribution of polyline segments in the curve between different boundaries during adaptation. More... | |
bool | can_update_reference_configuration () const |
Test whether curve can update reference. More... | |
virtual void | reset_reference_configuration () |
Virtual function that should be overloaded to update the polygons reference configuration. More... | |
bool | is_fixed () const |
Test whether the polygon is fixed or not. More... | |
void | set_fixed () |
Set the polygon to be fixed. More... | |
void | set_unfixed () |
Set the polygon to be allowed to move (default) More... | |
Public Member Functions inherited from oomph::TriangleMeshClosedCurve | |
TriangleMeshClosedCurve (const Vector< TriangleMeshCurveSection * > &curve_section_pt, const Vector< double > &internal_point_pt=Vector< double >(0), const bool &is_internal_point_fixed=false) | |
Constructor prototype. More... | |
virtual | ~TriangleMeshClosedCurve () |
Empty destructor. More... | |
unsigned | nvertices () const |
Number of vertices. More... | |
unsigned | nsegments () const |
Total number of segments. More... | |
void | output (std::ostream &outfile, const unsigned &n_sample=50) |
Output each sub-boundary at n_sample (default: 50) points. More... | |
Vector< double > | internal_point () const |
Coordinates of the internal point. More... | |
Vector< double > & | internal_point () |
Coordinates of the internal point. More... | |
void | fix_internal_point () |
Fix the internal point (i.e. do not allow our automatic machinery to update it) More... | |
void | unfix_internal_point () |
Unfix the internal point (i.e. allow our automatic machinery to update it) More... | |
bool | is_internal_point_fixed () const |
Test whether the internal point is fixed. More... | |
Public Member Functions inherited from oomph::TriangleMeshCurve | |
TriangleMeshCurve (const Vector< TriangleMeshCurveSection * > &curve_section_pt) | |
Empty constructor. More... | |
virtual | ~TriangleMeshCurve () |
Empty destructor. More... | |
unsigned | max_boundary_id () |
Return max boundary id of associated curves. More... | |
void | enable_polyline_refinement (const double &tolerance=0.08) |
Enable refinement of polylines 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_polyline_refinement_tolerance (const double &tolerance) |
Set tolerance for refinement of polylines 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 | polyline_refinement_tolerance () |
Get tolerance for refinement of polylines 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_polyline_refinement () |
Disable refinement of polylines. More... | |
void | enable_polyline_unrefinement (const double &tolerance=0.04) |
Enable unrefinement of polylines 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_polyline_unrefinement_tolerance (const double &tolerance) |
Set tolerance for unrefinement of polylines 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_polyline_unrefinement() More... | |
double | polyline_unrefinement_tolerance () |
Get tolerance for unrefinement of polylines 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_polyline_unrefinement () |
Disable unrefinement of polylines. More... | |
virtual TriangleMeshCurveSection * | curve_section_pt (const unsigned &i) const |
Pointer to i-th constituent curve section. More... | |
virtual TriangleMeshCurveSection *& | curve_section_pt (const unsigned &i) |
Pointer to i-th constituent curve section. More... | |
Protected Attributes | |
bool | Enable_redistribution_of_segments_between_polylines |
Is re-distribution of polyline segments between different boundaries during adaptation enabled? (Default: false) More... | |
bool | Can_update_configuration |
Boolean flag to indicate whether the polygon can update its own reference configuration after it has moved i.e. if it is upgraded to a rigid body rather than being a free surface (default false) More... | |
Protected Attributes inherited from oomph::TriangleMeshClosedCurve | |
Vector< double > | Internal_point_pt |
Vector of vertex coordinates. More... | |
bool | Is_internal_point_fixed |
Indicate whether the internal point should be updated automatically. More... | |
Protected Attributes inherited from oomph::TriangleMeshCurve | |
Vector< TriangleMeshCurveSection * > | Curve_section_pt |
Vector of curve sections. More... | |
Private Attributes | |
bool | Polygon_fixed |
Boolean flag to indicate whether the polygon can move (default false because if it doesn't move this will just lead to wasted work) More... | |
//////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////
Class defining a closed polygon for the Triangle mesh generation
Definition at line 1450 of file unstructured_two_d_mesh_geometry_base.h.
oomph::TriangleMeshPolygon::TriangleMeshPolygon | ( | const Vector< TriangleMeshCurveSection * > & | boundary_polyline_pt, |
const Vector< double > & | internal_point_pt = Vector<double>(0) , |
||
const bool & | is_internal_point_fixed = false |
||
) |
Constructor: Specify vector of pointers to TriangleMeshCurveSection that define the boundary of the segments of the polygon. Each TriangleMeshCurveSection has its own boundary ID and can contain multiple (straight-line) segments. For consistency across the various uses of this class, we insist that the closed boundary is represented by at least two separate TriangleMeshCurveSection whose joint vertices must be specified in both. (This is to allow the setup of unique boundary coordinate(s) around the polygon.) This may seem slightly annoying in cases where a polygon really only represents a single boundary, but... Note: The specified vector of pointers must consist of only TriangleMeshPolyLine elements. There is a checking on the PARANOID mode for this constraint.
////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////
Constructor: Specify vector of pointers to TriangleMeshCurveSection that define the boundary of the segments of the polygon. Each TriangleMeshCurveSection has its own boundary ID and can contain multiple (straight-line) segments. For consistency across the various uses of this class, we insist that the closed boundary is represented by at least two separate TriangleMeshCurveSection whose joint vertices must be specified in both. (This is to allow the setup of unique boundary coordinate(s) around the polygon.) This may seem slightly annoying in cases where a polygon really only represents a single boundary, but... Note: The specified vector of pointers must consist of only TriangleMeshPolyLine elements. There is a checking on the PARANOID mode for this constraint
Definition at line 1577 of file unstructured_two_d_mesh_geometry_base.cc.
References i, oomph::TriangleMeshClosedCurve::Internal_point_pt, npolyline(), oomph::TriangleMeshPolyLine::nvertex(), polyline_pt(), oomph::ToleranceForVertexMismatchInPolygons::Tolerable_error, and oomph::TriangleMeshPolyLine::vertex_coordinate().
|
inlinevirtual |
Empty virtual destructor.
Definition at line 1473 of file unstructured_two_d_mesh_geometry_base.h.
|
inline |
Test whether curve can update reference.
Definition at line 1572 of file unstructured_two_d_mesh_geometry_base.h.
References Can_update_configuration.
Referenced by oomph::RefineableTriangleMesh< ELEMENT >::surface_remesh_for_inner_hole_boundaries().
|
inline |
Disable re-distribution of polyline segments in the curve between different boundaries during adaptation.
Definition at line 1566 of file unstructured_two_d_mesh_geometry_base.h.
References Enable_redistribution_of_segments_between_polylines.
|
inline |
Enable re-distribution of polyline segments in the curve between different boundaries during adaptation.
Definition at line 1559 of file unstructured_two_d_mesh_geometry_base.h.
References Enable_redistribution_of_segments_between_polylines.
|
inline |
Test whether the polygon is fixed or not.
Definition at line 1598 of file unstructured_two_d_mesh_geometry_base.h.
References Polygon_fixed.
|
inline |
Is re-distribution of polyline segments in the curve between different boundaries during adaptation enabled?
Definition at line 1552 of file unstructured_two_d_mesh_geometry_base.h.
References Enable_redistribution_of_segments_between_polylines.
Referenced by oomph::RefineableTriangleMesh< ELEMENT >::get_face_mesh_representation().
|
inlinevirtual |
Number of constituent curves.
Reimplemented from oomph::TriangleMeshCurve.
Definition at line 1476 of file unstructured_two_d_mesh_geometry_base.h.
References npolyline().
Referenced by oomph::ImmersedRigidBodyTriangleMeshPolygon::reset_reference_configuration().
|
inline |
Number of constituent polylines.
Definition at line 1482 of file unstructured_two_d_mesh_geometry_base.h.
References oomph::TriangleMeshCurve::Curve_section_pt.
Referenced by oomph::RefineableTriangleMesh< ELEMENT >::add_vertices_for_non_deletion(), oomph::ImmersedRigidBodyTriangleMeshPolygon::assign_zeta(), oomph::RefineableTriangleMesh< ELEMENT >::create_temporary_boundary_connections(), oomph::RefineableTriangleMesh< ELEMENT >::get_face_mesh_representation(), oomph::ImmersedRigidBodyTriangleMeshPolygon::get_initial_position(), ncurve_section(), polygon_boundary_id(), oomph::RefineableTriangleMesh< ELEMENT >::restore_boundary_connections(), oomph::RefineableTriangleMesh< ELEMENT >::surface_remesh_for_inner_hole_boundaries(), TriangleMeshPolygon(), oomph::RefineableTriangleMesh< ELEMENT >::update_polygon_after_restart(), oomph::RefineableTriangleMesh< ELEMENT >::update_polygon_using_elements_area(), and oomph::RefineableTriangleMesh< ELEMENT >::update_polygon_using_face_mesh().
|
inline |
Return vector of boundary ids of associated polylines.
Definition at line 1536 of file unstructured_two_d_mesh_geometry_base.h.
References oomph::TriangleMeshCurve::Curve_section_pt, and npolyline().
|
inline |
Pointer to i-th constituent polyline.
Definition at line 1512 of file unstructured_two_d_mesh_geometry_base.h.
References oomph::TriangleMeshCurve::Curve_section_pt, and i.
|
inline |
Pointer to i-th constituent polyline.
Definition at line 1488 of file unstructured_two_d_mesh_geometry_base.h.
References oomph::TriangleMeshCurve::Curve_section_pt, and i.
Referenced by oomph::RefineableTriangleMesh< ELEMENT >::add_vertices_for_non_deletion(), oomph::ImmersedRigidBodyTriangleMeshPolygon::assign_zeta(), oomph::RefineableTriangleMesh< ELEMENT >::create_temporary_boundary_connections(), oomph::RefineableTriangleMesh< ELEMENT >::get_face_mesh_representation(), oomph::ImmersedRigidBodyTriangleMeshPolygon::get_initial_position(), oomph::ImmersedRigidBodyTriangleMeshPolygon::ImmersedRigidBodyTriangleMeshPolygon(), oomph::ImmersedRigidBodyTriangleMeshPolygon::reset_reference_configuration(), oomph::RefineableTriangleMesh< ELEMENT >::restore_boundary_connections(), oomph::RefineableTriangleMesh< ELEMENT >::surface_remesh_for_inner_hole_boundaries(), TriangleMeshPolygon(), oomph::RefineableTriangleMesh< ELEMENT >::update_polygon_after_restart(), oomph::RefineableTriangleMesh< ELEMENT >::update_polygon_using_elements_area(), and oomph::RefineableTriangleMesh< ELEMENT >::update_polygon_using_face_mesh().
|
inlinevirtual |
Virtual function that should be overloaded to update the polygons reference configuration.
Reimplemented in oomph::ImmersedRigidBodyTriangleMeshPolygon.
Definition at line 1579 of file unstructured_two_d_mesh_geometry_base.h.
Referenced by oomph::RefineableTriangleMesh< ELEMENT >::surface_remesh_for_inner_hole_boundaries().
|
inline |
Set the polygon to be fixed.
Definition at line 1604 of file unstructured_two_d_mesh_geometry_base.h.
References Polygon_fixed.
|
inline |
Set the polygon to be allowed to move (default)
Definition at line 1610 of file unstructured_two_d_mesh_geometry_base.h.
References Polygon_fixed.
|
protected |
Boolean flag to indicate whether the polygon can update its own reference configuration after it has moved i.e. if it is upgraded to a rigid body rather than being a free surface (default false)
Definition at line 1624 of file unstructured_two_d_mesh_geometry_base.h.
Referenced by can_update_reference_configuration(), and oomph::ImmersedRigidBodyTriangleMeshPolygon::ImmersedRigidBodyTriangleMeshPolygon().
|
protected |
Is re-distribution of polyline segments between different boundaries during adaptation enabled? (Default: false)
Definition at line 1618 of file unstructured_two_d_mesh_geometry_base.h.
Referenced by disable_redistribution_of_segments_between_polylines(), enable_redistribution_of_segments_between_polylines(), and is_redistribution_of_segments_between_polylines_enabled().
|
private |
Boolean flag to indicate whether the polygon can move (default false because if it doesn't move this will just lead to wasted work)
Definition at line 1630 of file unstructured_two_d_mesh_geometry_base.h.
Referenced by is_fixed(), set_fixed(), and set_unfixed().