oomph::TriangleMeshCurve Class Referenceabstract

#include <unstructured_two_d_mesh_geometry_base.h>

+ Inheritance diagram for oomph::TriangleMeshCurve:

Public Member Functions

 TriangleMeshCurve (const Vector< TriangleMeshCurveSection * > &curve_section_pt)
 Empty constructor. More...
 
virtual ~TriangleMeshCurve ()
 Empty destructor. More...
 
virtual unsigned nvertices () const =0
 Number of vertices. More...
 
virtual unsigned nsegments () const =0
 Total number of segments. More...
 
unsigned max_boundary_id ()
 Return max boundary id of associated curves. More...
 
virtual unsigned ncurve_section () const
 Number of constituent 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 void output (std::ostream &outfile, const unsigned &n_sample=50)=0
 Output each sub-boundary at n_sample (default: 50) points. More...
 
virtual TriangleMeshCurveSectioncurve_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

Vector< TriangleMeshCurveSection * > Curve_section_pt
 Vector of curve sections. More...
 

Private Attributes

double Polyline_refinement_tolerance
 Tolerance for refinement of polylines (neg if refinement is disabled) More...
 
double Polyline_unrefinement_tolerance
 Tolerance for unrefinement of polylines (neg if refinement is disabled) More...
 

Detailed Description

//////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// closed curves and open curves. All TriangleMeshCurves are composed of a Vector of TriangleMeshCurveSections

Constructor & Destructor Documentation

◆ TriangleMeshCurve()

oomph::TriangleMeshCurve::TriangleMeshCurve ( const Vector< TriangleMeshCurveSection * > &  curve_section_pt)
inline

Empty constructor.

1143  {
1144  }
double Polyline_unrefinement_tolerance
Tolerance for unrefinement of polylines (neg if refinement is disabled)
Definition: unstructured_two_d_mesh_geometry_base.h:1328
Vector< TriangleMeshCurveSection * > Curve_section_pt
Vector of curve sections.
Definition: unstructured_two_d_mesh_geometry_base.h:1321
virtual TriangleMeshCurveSection * curve_section_pt(const unsigned &i) const
Pointer to i-th constituent curve section.
Definition: unstructured_two_d_mesh_geometry_base.h:1308
double Polyline_refinement_tolerance
Tolerance for refinement of polylines (neg if refinement is disabled)
Definition: unstructured_two_d_mesh_geometry_base.h:1325

◆ ~TriangleMeshCurve()

virtual oomph::TriangleMeshCurve::~TriangleMeshCurve ( )
inlinevirtual

Empty destructor.

1147 {}

Member Function Documentation

◆ curve_section_pt() [1/2]

virtual TriangleMeshCurveSection*& oomph::TriangleMeshCurve::curve_section_pt ( const unsigned i)
inlinevirtual

Pointer to i-th constituent curve section.

1315  {
1316  return Curve_section_pt[i];
1317  }
int i
Definition: BiCGSTAB_step_by_step.cpp:9

References Curve_section_pt, and i.

◆ curve_section_pt() [2/2]

virtual TriangleMeshCurveSection* oomph::TriangleMeshCurve::curve_section_pt ( const unsigned i) const
inlinevirtual

Pointer to i-th constituent curve section.

1309  {
1310  return Curve_section_pt[i];
1311  }

References Curve_section_pt, and i.

Referenced by oomph::TriangleMeshClosedCurve::TriangleMeshClosedCurve().

◆ disable_polyline_refinement()

void oomph::TriangleMeshCurve::disable_polyline_refinement ( )
inline

Disable refinement of polylines.

1227  {
1229  // Disable the refinement tolerance for all the
1230  // curve sections on the TriangleMeshCurve
1231  unsigned n_curve_sections = Curve_section_pt.size();
1232  for (unsigned i = 0; i < n_curve_sections; i++)
1233  {
1234  Curve_section_pt[i]->disable_refinement_tolerance();
1235  }
1236  }

References Curve_section_pt, i, and Polyline_refinement_tolerance.

◆ disable_polyline_unrefinement()

void oomph::TriangleMeshCurve::disable_polyline_unrefinement ( )
inline

Disable unrefinement of polylines.

1292  {
1294  // Disable the unrefinement tolerance for all the
1295  // curve sections on the TriangleMeshCurve
1296  unsigned n_curve_sections = Curve_section_pt.size();
1297  for (unsigned i = 0; i < n_curve_sections; i++)
1298  {
1299  Curve_section_pt[i]->disable_unrefinement_tolerance();
1300  }
1301  }

References Curve_section_pt, i, and Polyline_unrefinement_tolerance.

◆ enable_polyline_refinement()

void oomph::TriangleMeshCurve::enable_polyline_refinement ( const double tolerance = 0.08)
inline

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.

1184  {
1185  Polyline_refinement_tolerance = tolerance;
1186  // Establish the refinement tolerance for all the
1187  // curve sections on the TriangleMeshCurve
1188  unsigned n_curve_sections = Curve_section_pt.size();
1189  for (unsigned i = 0; i < n_curve_sections; i++)
1190  {
1191  Curve_section_pt[i]->set_refinement_tolerance(
1193  }
1194  }

References Curve_section_pt, i, and Polyline_refinement_tolerance.

◆ enable_polyline_unrefinement()

void oomph::TriangleMeshCurve::enable_polyline_unrefinement ( const double tolerance = 0.04)
inline

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.

1246  {
1247  Polyline_unrefinement_tolerance = tolerance;
1248  // Establish the unrefinement tolerance for all the
1249  // curve sections on the TriangleMeshCurve
1250  unsigned n_curve_sections = Curve_section_pt.size();
1251  for (unsigned i = 0; i < n_curve_sections; i++)
1252  {
1253  Curve_section_pt[i]->set_unrefinement_tolerance(
1255  }
1256  }

References Curve_section_pt, i, and Polyline_unrefinement_tolerance.

◆ max_boundary_id()

unsigned oomph::TriangleMeshCurve::max_boundary_id ( )
inline

Return max boundary id of associated curves.

1157  {
1158  unsigned max = 0;
1159  unsigned n_curve_section = ncurve_section();
1160  for (unsigned i = 0; i < n_curve_section; i++)
1161  {
1162  unsigned boundary_id = Curve_section_pt[i]->boundary_id();
1163  if (boundary_id > max)
1164  {
1165  max = boundary_id;
1166  }
1167  }
1168  return max;
1169  }
virtual unsigned ncurve_section() const
Number of constituent curves.
Definition: unstructured_two_d_mesh_geometry_base.h:1172
#define max(a, b)
Definition: datatypes.h:23

References Curve_section_pt, i, max, and ncurve_section().

◆ ncurve_section()

virtual unsigned oomph::TriangleMeshCurve::ncurve_section ( ) const
inlinevirtual

◆ nsegments()

virtual unsigned oomph::TriangleMeshCurve::nsegments ( ) const
pure virtual

Total number of segments.

Implemented in oomph::TriangleMeshOpenCurve, and oomph::TriangleMeshClosedCurve.

◆ nvertices()

virtual unsigned oomph::TriangleMeshCurve::nvertices ( ) const
pure virtual

Number of vertices.

Implemented in oomph::TriangleMeshOpenCurve, and oomph::TriangleMeshClosedCurve.

◆ output()

virtual void oomph::TriangleMeshCurve::output ( std::ostream &  outfile,
const unsigned n_sample = 50 
)
pure virtual

Output each sub-boundary at n_sample (default: 50) points.

Implemented in oomph::TriangleMeshOpenCurve, and oomph::TriangleMeshClosedCurve.

◆ polyline_refinement_tolerance()

double oomph::TriangleMeshCurve::polyline_refinement_tolerance ( )
inline

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.

1221  {
1223  }

References Polyline_refinement_tolerance.

◆ polyline_unrefinement_tolerance()

double oomph::TriangleMeshCurve::polyline_unrefinement_tolerance ( )
inline

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.

1286  {
1288  }

References Polyline_unrefinement_tolerance.

◆ set_polyline_refinement_tolerance()

void oomph::TriangleMeshCurve::set_polyline_refinement_tolerance ( const double tolerance)
inline

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()

1204  {
1205  Polyline_refinement_tolerance = tolerance;
1206  // Establish the refinement tolerance for all the
1207  // curve sections on the TriangleMeshCurve
1208  unsigned n_curve_sections = Curve_section_pt.size();
1209  for (unsigned i = 0; i < n_curve_sections; i++)
1210  {
1211  Curve_section_pt[i]->set_refinement_tolerance(
1213  }
1214  }

References Curve_section_pt, i, and Polyline_refinement_tolerance.

◆ set_polyline_unrefinement_tolerance()

void oomph::TriangleMeshCurve::set_polyline_unrefinement_tolerance ( const double tolerance)
inline

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()

1269  {
1270  Polyline_unrefinement_tolerance = tolerance;
1271  // Establish the unrefinement tolerance for all the
1272  // curve sections on the TriangleMeshCurve
1273  unsigned n_curve_sections = Curve_section_pt.size();
1274  for (unsigned i = 0; i < n_curve_sections; i++)
1275  {
1276  Curve_section_pt[i]->set_unrefinement_tolerance(
1278  }
1279  }

References Curve_section_pt, i, and Polyline_unrefinement_tolerance.

Member Data Documentation

◆ Curve_section_pt

◆ Polyline_refinement_tolerance

double oomph::TriangleMeshCurve::Polyline_refinement_tolerance
private

Tolerance for refinement of polylines (neg if refinement is disabled)

Referenced by disable_polyline_refinement(), enable_polyline_refinement(), polyline_refinement_tolerance(), and set_polyline_refinement_tolerance().

◆ Polyline_unrefinement_tolerance

double oomph::TriangleMeshCurve::Polyline_unrefinement_tolerance
private

Tolerance for unrefinement of polylines (neg if refinement is disabled)

Referenced by disable_polyline_unrefinement(), enable_polyline_unrefinement(), polyline_unrefinement_tolerance(), and set_polyline_unrefinement_tolerance().


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