![]() |
|
Class defining a closed polygon for the Triangle mesh generation. 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) | |
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 () |
void | enable_redistribution_of_segments_between_polylines () |
void | disable_redistribution_of_segments_between_polylines () |
bool | can_update_reference_configuration () const |
Test whether curve can update reference. More... | |
virtual void | reset_reference_configuration () |
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... | |
![]() | |
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 () |
void | unfix_internal_point () |
bool | is_internal_point_fixed () const |
Test whether the internal point is fixed. More... | |
![]() | |
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) |
void | set_polyline_refinement_tolerance (const double &tolerance) |
double | polyline_refinement_tolerance () |
void | disable_polyline_refinement () |
Disable refinement of polylines. More... | |
void | enable_polyline_unrefinement (const double &tolerance=0.04) |
void | set_polyline_unrefinement_tolerance (const double &tolerance) |
double | polyline_unrefinement_tolerance () |
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 |
bool | Can_update_configuration |
![]() | |
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... | |
![]() | |
Vector< TriangleMeshCurveSection * > | Curve_section_pt |
Vector of curve sections. More... | |
Private Attributes | |
bool | Polygon_fixed |
Class defining a closed polygon for the Triangle mesh generation.
//////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////
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
References calibrate::error, i, oomph::TriangleMeshClosedCurve::Internal_point_pt, j, max, min, npolyline(), oomph::TriangleMeshPolyLine::nvertex(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION, p, p1, polyline_pt(), Eigen::bfloat16_impl::pow(), sqrt(), oomph::ToleranceForVertexMismatchInPolygons::Tolerable_error, v1(), v2(), and oomph::TriangleMeshPolyLine::vertex_coordinate().
|
inlinevirtual |
|
inline |
Test whether curve can update reference.
References Can_update_configuration.
|
inline |
Disable re-distribution of polyline segments in the curve between different boundaries during adaptation
References Enable_redistribution_of_segments_between_polylines.
|
inline |
Enable re-distribution of polyline segments in the curve between different boundaries during adaptation
References Enable_redistribution_of_segments_between_polylines.
|
inline |
Test whether the polygon is fixed or not.
References Polygon_fixed.
|
inline |
Is re-distribution of polyline segments in the curve between different boundaries during adaptation enabled?
References Enable_redistribution_of_segments_between_polylines.
|
inlinevirtual |
Number of constituent curves.
Reimplemented from oomph::TriangleMeshCurve.
References npolyline().
Referenced by oomph::ImmersedRigidBodyTriangleMeshPolygon::reset_reference_configuration().
|
inline |
Number of constituent polylines.
References oomph::TriangleMeshCurve::Curve_section_pt.
Referenced by oomph::ImmersedRigidBodyTriangleMeshPolygon::assign_zeta(), oomph::ImmersedRigidBodyTriangleMeshPolygon::get_initial_position(), ncurve_section(), polygon_boundary_id(), and TriangleMeshPolygon().
Return vector of boundary ids of associated polylines.
References oomph::TriangleMeshCurve::Curve_section_pt, and npolyline().
|
inline |
Pointer to i-th constituent polyline.
References oomph::TriangleMeshCurve::Curve_section_pt, i, OOMPH_CURRENT_FUNCTION, and OOMPH_EXCEPTION_LOCATION.
|
inline |
Pointer to i-th constituent polyline.
References oomph::TriangleMeshCurve::Curve_section_pt, i, OOMPH_CURRENT_FUNCTION, and OOMPH_EXCEPTION_LOCATION.
Referenced by oomph::ImmersedRigidBodyTriangleMeshPolygon::assign_zeta(), oomph::ImmersedRigidBodyTriangleMeshPolygon::get_initial_position(), oomph::ImmersedRigidBodyTriangleMeshPolygon::ImmersedRigidBodyTriangleMeshPolygon(), oomph::ImmersedRigidBodyTriangleMeshPolygon::reset_reference_configuration(), and TriangleMeshPolygon().
|
inlinevirtual |
Virtual function that should be overloaded to update the polygons reference configuration
Reimplemented in oomph::ImmersedRigidBodyTriangleMeshPolygon.
References OOMPH_CURRENT_FUNCTION, and OOMPH_EXCEPTION_LOCATION.
|
inline |
|
inline |
Set the polygon to be allowed to move (default)
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)
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)
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)
Referenced by is_fixed(), set_fixed(), and set_unfixed().