oomph::TriangleMeshPolygon Class Reference

Class defining a closed polygon for the Triangle mesh generation. More...

#include <unstructured_two_d_mesh_geometry_base.h>

+ Inheritance diagram for oomph::TriangleMeshPolygon:

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...
 
TriangleMeshPolyLinepolyline_pt (const unsigned &i) const
 Pointer to i-th constituent polyline. More...
 
TriangleMeshPolyLinepolyline_pt (const unsigned &i)
 Pointer to i-th constituent polyline. More...
 
Vector< unsignedpolygon_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...
 
- 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< doubleinternal_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...
 
- 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)
 
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 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

bool Enable_redistribution_of_segments_between_polylines
 
bool Can_update_configuration
 
- Protected Attributes inherited from oomph::TriangleMeshClosedCurve
Vector< doubleInternal_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
 

Detailed Description

Class defining a closed polygon for the Triangle mesh generation.

//////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////

Constructor & Destructor Documentation

◆ TriangleMeshPolygon()

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

1581  : TriangleMeshCurve(boundary_polyline_pt),
1583  boundary_polyline_pt, internal_point_pt, is_internal_point_fixed),
1585  Can_update_configuration(false),
1586  Polygon_fixed(false)
1587  {
1588  // Get the number of polylines
1589  const unsigned n_bound = boundary_polyline_pt.size();
1590 
1591  // Check that all the constituent TriangleMeshCurveSection are
1592  // instance of TriangleMeshPolyLine
1593  for (unsigned p = 0; p < n_bound; p++)
1594  {
1595  TriangleMeshPolyLine* tmp_polyline_pt =
1596  dynamic_cast<TriangleMeshPolyLine*>(boundary_polyline_pt[p]);
1597  if (tmp_polyline_pt == 0)
1598  {
1599  std::ostringstream error_stream;
1600  error_stream << "The (" << p << ") TriangleMeshCurveSection is not a "
1601  << "TriangleMeshPolyLine.\nThe TriangleMeshPolygon object"
1602  << "is constituent of only TriangleMeshPolyLine objects.\n"
1603  << "Verify that all the constituent elements of the "
1604  << "TriangleMeshPolygon\nare instantiated as "
1605  << "TriangleMeshPolyLines." << std::endl;
1606  throw OomphLibError(
1607  error_stream.str(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION);
1608  }
1609  }
1610 
1611  // Check that the polylines are contiguous
1612  bool contiguous = true;
1613  unsigned i_offensive = 0;
1614 
1615  // Need at least two
1616  if (n_bound < 2)
1617  {
1618  std::ostringstream error_stream;
1619  error_stream
1620  << "Sorry -- I'm afraid we insist that a closed curve is\n"
1621  << "specified by at least two separate TriangleMeshPolyLines.\n"
1622  << "You've only specified (" << n_bound << ")" << std::endl;
1623  throw OomphLibError(error_stream.str(),
1624  "TriangleMeshPolygon::TriangleMeshPolygon()",
1626  } // if (n_bound<2)
1627 
1628  // Does the last node of the polyline connect to the first one of the
1629  // next one (only up the last but one!)
1630  for (unsigned i = 0; i < n_bound - 1; i++)
1631  {
1632  // Get vector last vertex in current polyline
1633  unsigned last_vertex = (polyline_pt(i)->nvertex()) - 1;
1634  Vector<double> v1 = polyline_pt(i)->vertex_coordinate(last_vertex);
1635 
1636  // Get vector to first vertex in next polyline
1637  Vector<double> v2 = polyline_pt(i + 1)->vertex_coordinate(0);
1638 
1639  // Work out error
1640  double error = sqrt(pow(v1[0] - v2[0], 2) + pow(v1[1] - v2[1], 2));
1641 
1642  // Is error accetable?
1644  {
1645  contiguous = false;
1646  i_offensive = i;
1647  break;
1648  }
1649  // Align
1650  else
1651  {
1652  polyline_pt(i + 1)->vertex_coordinate(0) =
1653  polyline_pt(i)->vertex_coordinate(last_vertex);
1654  }
1655  }
1656 
1657  // Does the last one connect to the first one?
1658 
1659  // Get vector last vertex last polyline
1660  unsigned last_vertex = (polyline_pt(n_bound - 1)->nvertex()) - 1;
1661  Vector<double> v1 =
1662  polyline_pt(n_bound - 1)->vertex_coordinate(last_vertex);
1663 
1664  // Get vector first vertex first polyline
1665  Vector<double> v2 = polyline_pt(0)->vertex_coordinate(0);
1666  double error = sqrt(pow(v1[0] - v2[0], 2) + pow(v1[1] - v2[1], 2));
1667 
1669  {
1670  contiguous = false;
1671  i_offensive = n_bound - 1;
1672  }
1673  else
1674  {
1676  polyline_pt(n_bound - 1)->vertex_coordinate(last_vertex);
1677  }
1678 
1679  if (!contiguous)
1680  {
1681  std::ostringstream error_stream;
1682  error_stream
1683  << "The polylines specified \n"
1684  << "should define a closed geometry, i.e. the first/last vertex of\n"
1685  << "adjacent polylines should match.\n\n"
1686  << "Your polyline number " << i_offensive
1687  << " has no contiguous neighbour, when judged \nwith the tolerance of "
1689  << " which is specified in the namespace \nvariable "
1690  << "ToleranceForVertexMismatchInPolygons::Tolerable_error.\n\n"
1691  << "Feel free to adjust this or to recompile the code without\n"
1692  << "paranoia if you think this is OK...\n"
1693  << std::endl;
1694  throw OomphLibError(error_stream.str(),
1695  "TriangleMeshPolygon::TriangleMeshPolygon()",
1697  }
1698 
1699  // Check if internal point is actually located in bounding polygon
1700  // Reference: http://paulbourke.net/geometry/insidepoly/
1701 
1702  // Only checked if there is an internal hole
1703  if (!Internal_point_pt.empty())
1704  {
1705  // Vertex coordinates
1706  Vector<Vector<double>> polygon_vertex;
1707 
1708  // Total number of vertices
1709  unsigned nvertex = 0;
1710 
1711  // Storage for first/last point on polyline for contiguousness check
1712  Vector<double> last_vertex(2);
1713  Vector<double> first_vertex(2);
1714 
1715  // Get vertices
1716  unsigned npolyline = boundary_polyline_pt.size();
1717  for (unsigned i = 0; i < npolyline; i++)
1718  {
1719  // Number of vertices
1720  unsigned nvert = boundary_polyline_pt[i]->nvertex();
1721  for (unsigned j = 0; j < nvert; j++)
1722  {
1723  // Check contiguousness
1724  if ((i > 1) && (j == 0))
1725  {
1726  first_vertex = polyline_pt(i)->vertex_coordinate(j);
1727  double dist = sqrt(pow(first_vertex[0] - last_vertex[0], 2) +
1728  pow(first_vertex[1] - last_vertex[1], 2));
1730  {
1731  std::ostringstream error_stream;
1732  error_stream
1733  << "The start and end points of polylines " << i << " and "
1734  << i + 1 << " don't match when judged\n"
1735  << "with the tolerance ("
1737  << ") which is specified in the namespace \nvariable "
1738  << "ToleranceForVertexMismatchInPolygons::"
1739  << "Tolerable_error.\n\n"
1740  << "Feel free to adjust this or to recompile the "
1741  << "code without\n"
1742  << "paranoia if you think this is OK...\n"
1743  << std::endl;
1744  throw OomphLibError(error_stream.str(),
1745  "TriangleMeshPolygon::TriangleMeshPolygon()",
1747  }
1748  }
1749  // Get vertex (ignore end point)
1750  if (j < nvert - 1)
1751  {
1752  polygon_vertex.push_back(polyline_pt(i)->vertex_coordinate(j));
1753  }
1754  // Prepare for check of contiguousness
1755  else
1756  {
1757  last_vertex = polyline_pt(i)->vertex_coordinate(j);
1758  }
1759  }
1760  }
1761 
1762  // Total number of vertices
1763  nvertex = polygon_vertex.size();
1764 
1765  // Counter for number of intersections
1766  unsigned intersect_counter = 0;
1767 
1768  // Get first vertex
1769  Vector<double> p1 = polygon_vertex[0];
1770  for (unsigned i = 1; i <= nvertex; i++)
1771  {
1772  // Get second vertex by wrap-around
1773  Vector<double> p2 = polygon_vertex[i % nvertex];
1774 
1775  if (Internal_point_pt[1] > std::min(p1[1], p2[1]))
1776  {
1777  if (Internal_point_pt[1] <= std::max(p1[1], p2[1]))
1778  {
1779  if (Internal_point_pt[0] <= std::max(p1[0], p2[0]))
1780  {
1781  if (p1[1] != p2[1])
1782  {
1783  double xintersect = (Internal_point_pt[1] - p1[1]) *
1784  (p2[0] - p1[0]) / (p2[1] - p1[1]) +
1785  p1[0];
1786  if ((p1[0] == p2[0]) || (Internal_point_pt[0] <= xintersect))
1787  {
1788  intersect_counter++;
1789  }
1790  }
1791  }
1792  }
1793  }
1794  p1 = p2;
1795  }
1796 
1797  // Even number of intersections: outside
1798  if (intersect_counter % 2 == 0)
1799  {
1800  std::ostringstream error_stream;
1801  error_stream
1802  << "The internal point at " << Internal_point_pt[0] << " "
1803  << Internal_point_pt[1]
1804  << " isn't in the polygon that describes the internal closed "
1805  << "curve!\nPolygon vertices are at: \n";
1806  for (unsigned i = 0; i < nvertex; i++)
1807  {
1808  error_stream << polygon_vertex[i][0] << " " << polygon_vertex[i][1]
1809  << "\n";
1810  }
1811  error_stream
1812  << "This may be because the internal point is defined by a\n"
1813  << "GeomObject that has deformed so much that it's \n"
1814  << "swept over the (initial) internal point.\n"
1815  << "If so, you should update the position of the internal point. \n"
1816  << "This could be done automatically by generating \n"
1817  << "an internal mesh inside the polygon and using one\n"
1818  << "of its internal nodes as the internal point. Actually not \n"
1819  << "why triangle doesn't do that automatically....\n";
1820  throw OomphLibError(error_stream.str(),
1821  "TriangleMeshPolygon::TriangleMeshPolygon()",
1823  }
1824  }
1825  }
AnnoyingScalar sqrt(const AnnoyingScalar &x)
Definition: AnnoyingScalar.h:134
int i
Definition: BiCGSTAB_step_by_step.cpp:9
Vector3f p1
Definition: MatrixBase_all.cpp:2
float * p
Definition: Tutorial_Map_using.cpp:9
Map< RowVectorXf > v2(M2.data(), M2.size())
M1<< 1, 2, 3, 4, 5, 6, 7, 8, 9;Map< RowVectorXf > v1(M1.data(), M1.size())
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.
Definition: unstructured_two_d_mesh_geometry_base.cc:1420
Vector< double > Internal_point_pt
Vector of vertex coordinates.
Definition: unstructured_two_d_mesh_geometry_base.h:1436
bool is_internal_point_fixed() const
Test whether the internal point is fixed.
Definition: unstructured_two_d_mesh_geometry_base.h:1429
TriangleMeshCurve(const Vector< TriangleMeshCurveSection * > &curve_section_pt)
Empty constructor.
Definition: unstructured_two_d_mesh_geometry_base.h:1139
unsigned nvertex() const
Number of vertices.
Definition: unstructured_two_d_mesh_geometry_base.h:904
Vector< double > vertex_coordinate(const unsigned &i) const
Coordinate vector of i-th vertex (const version)
Definition: unstructured_two_d_mesh_geometry_base.h:929
unsigned npolyline() const
Number of constituent polylines.
Definition: unstructured_two_d_mesh_geometry_base.h:1482
TriangleMeshPolyLine * polyline_pt(const unsigned &i) const
Pointer to i-th constituent polyline.
Definition: unstructured_two_d_mesh_geometry_base.h:1488
bool Can_update_configuration
Definition: unstructured_two_d_mesh_geometry_base.h:1624
bool Polygon_fixed
Definition: unstructured_two_d_mesh_geometry_base.h:1630
bool Enable_redistribution_of_segments_between_polylines
Definition: unstructured_two_d_mesh_geometry_base.h:1618
#define min(a, b)
Definition: datatypes.h:22
#define max(a, b)
Definition: datatypes.h:23
EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC bfloat16 pow(const bfloat16 &a, const bfloat16 &b)
Definition: BFloat16.h:625
int error
Definition: calibrate.py:297
double Tolerable_error
Definition: unstructured_two_d_mesh_geometry_base.cc:1103
#define OOMPH_EXCEPTION_LOCATION
Definition: oomph_definitions.h:61
#define OOMPH_CURRENT_FUNCTION
Definition: oomph_definitions.h:86
std::ptrdiff_t j
Definition: tut_arithmetic_redux_minmax.cpp:2

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

◆ ~TriangleMeshPolygon()

virtual oomph::TriangleMeshPolygon::~TriangleMeshPolygon ( )
inlinevirtual

Empty virtual destructor.

1473 {}

Member Function Documentation

◆ can_update_reference_configuration()

bool oomph::TriangleMeshPolygon::can_update_reference_configuration ( ) const
inline

Test whether curve can update reference.

1573  {
1574  return Can_update_configuration;
1575  }

References Can_update_configuration.

◆ disable_redistribution_of_segments_between_polylines()

void oomph::TriangleMeshPolygon::disable_redistribution_of_segments_between_polylines ( )
inline

Disable re-distribution of polyline segments in the curve between different boundaries during adaptation

1567  {
1569  }

References Enable_redistribution_of_segments_between_polylines.

◆ enable_redistribution_of_segments_between_polylines()

void oomph::TriangleMeshPolygon::enable_redistribution_of_segments_between_polylines ( )
inline

Enable re-distribution of polyline segments in the curve between different boundaries during adaptation

1560  {
1562  }

References Enable_redistribution_of_segments_between_polylines.

◆ is_fixed()

bool oomph::TriangleMeshPolygon::is_fixed ( ) const
inline

Test whether the polygon is fixed or not.

1599  {
1600  return Polygon_fixed;
1601  }

References Polygon_fixed.

◆ is_redistribution_of_segments_between_polylines_enabled()

bool oomph::TriangleMeshPolygon::is_redistribution_of_segments_between_polylines_enabled ( )
inline

Is re-distribution of polyline segments in the curve between different boundaries during adaptation enabled?

1553  {
1555  }

References Enable_redistribution_of_segments_between_polylines.

◆ ncurve_section()

unsigned oomph::TriangleMeshPolygon::ncurve_section ( ) const
inlinevirtual

Number of constituent curves.

Reimplemented from oomph::TriangleMeshCurve.

1477  {
1478  return npolyline();
1479  }

References npolyline().

Referenced by oomph::ImmersedRigidBodyTriangleMeshPolygon::reset_reference_configuration().

◆ npolyline()

unsigned oomph::TriangleMeshPolygon::npolyline ( ) const
inline

Number of constituent polylines.

1483  {
1484  return Curve_section_pt.size();
1485  }
Vector< TriangleMeshCurveSection * > Curve_section_pt
Vector of curve sections.
Definition: unstructured_two_d_mesh_geometry_base.h:1321

References oomph::TriangleMeshCurve::Curve_section_pt.

Referenced by oomph::ImmersedRigidBodyTriangleMeshPolygon::assign_zeta(), oomph::ImmersedRigidBodyTriangleMeshPolygon::get_initial_position(), ncurve_section(), polygon_boundary_id(), and TriangleMeshPolygon().

◆ polygon_boundary_id()

Vector<unsigned> oomph::TriangleMeshPolygon::polygon_boundary_id ( )
inline

Return vector of boundary ids of associated polylines.

1537  {
1538  // Get the number of polylines
1539  unsigned nline = npolyline();
1540  Vector<unsigned> boundary_id(nline);
1541 
1542  // Loop over the polyline to get the id
1543  for (unsigned iline = 0; iline < nline; iline++)
1544  {
1545  boundary_id[iline] = Curve_section_pt[iline]->boundary_id();
1546  }
1547  return boundary_id;
1548  }

References oomph::TriangleMeshCurve::Curve_section_pt, and npolyline().

◆ polyline_pt() [1/2]

TriangleMeshPolyLine* oomph::TriangleMeshPolygon::polyline_pt ( const unsigned i)
inline

Pointer to i-th constituent polyline.

1513  {
1514  TriangleMeshPolyLine* tmp_polyline =
1515  dynamic_cast<TriangleMeshPolyLine*>(Curve_section_pt[i]);
1516 #ifdef PARANOID
1517  if (tmp_polyline == NULL)
1518  {
1519  std::ostringstream error_stream;
1520  error_stream
1521  << "The (" << i << ") TriangleMeshCurveSection is not a "
1522  << "TriangleMeshPolyLine\nThe TriangleMeshPolygon object"
1523  << "is constituent of only TriangleMeshPolyLine objects.\n"
1524  << "The problem could be generated when changing the constituent "
1525  << "objects of the TriangleMeshPolygon.\nCheck where you got "
1526  << "access to this objects and review that you are not introducing "
1527  << "any other objects than TriangleMeshPolyLines" << std::endl;
1528  throw OomphLibError(
1529  error_stream.str(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION);
1530  }
1531 #endif
1532  return tmp_polyline;
1533  }

References oomph::TriangleMeshCurve::Curve_section_pt, i, OOMPH_CURRENT_FUNCTION, and OOMPH_EXCEPTION_LOCATION.

◆ polyline_pt() [2/2]

TriangleMeshPolyLine* oomph::TriangleMeshPolygon::polyline_pt ( const unsigned i) const
inline

Pointer to i-th constituent polyline.

1489  {
1490  TriangleMeshPolyLine* tmp_polyline =
1491  dynamic_cast<TriangleMeshPolyLine*>(Curve_section_pt[i]);
1492 #ifdef PARANOID
1493  if (tmp_polyline == NULL)
1494  {
1495  std::ostringstream error_stream;
1496  error_stream
1497  << "The (" << i << ") TriangleMeshCurveSection is not a "
1498  << "TriangleMeshPolyLine\nThe TriangleMeshPolygon object"
1499  << "is constituent of only TriangleMeshPolyLine objects.\n"
1500  << "The problem could be generated when changing the constituent "
1501  << "objects of the TriangleMeshPolygon.\nCheck where you got "
1502  << "access to this objects and review that you are not introducing "
1503  << "any other objects than TriangleMeshPolyLines" << std::endl;
1504  throw OomphLibError(
1505  error_stream.str(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION);
1506  }
1507 #endif
1508  return tmp_polyline;
1509  }

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

◆ reset_reference_configuration()

virtual void oomph::TriangleMeshPolygon::reset_reference_configuration ( )
inlinevirtual

Virtual function that should be overloaded to update the polygons reference configuration

Reimplemented in oomph::ImmersedRigidBodyTriangleMeshPolygon.

1580  {
1581  std::ostringstream error_stream;
1582  error_stream
1583  << "Broken Default Called\n"
1584  << "This function should be overloaded if Can_update_configuration = "
1585  "true,"
1586  << "\nwhich indicates that the curve in it polylines parts can update "
1587  "its "
1588  << "own position (i.e. it\n"
1589  << "may be a rigid body. Otherwise the update will be via a FaceMesh \n"
1590  << "representation of the boundary which is appropriate for \n"
1591  << "general deforming surfaces\n";
1592 
1593  throw OomphLibError(
1594  error_stream.str(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION);
1595  }

References OOMPH_CURRENT_FUNCTION, and OOMPH_EXCEPTION_LOCATION.

◆ set_fixed()

void oomph::TriangleMeshPolygon::set_fixed ( )
inline

Set the polygon to be fixed.

1605  {
1606  Polygon_fixed = true;
1607  }

References Polygon_fixed.

◆ set_unfixed()

void oomph::TriangleMeshPolygon::set_unfixed ( )
inline

Set the polygon to be allowed to move (default)

1611  {
1612  Polygon_fixed = false;
1613  }

References Polygon_fixed.

Member Data Documentation

◆ Can_update_configuration

bool oomph::TriangleMeshPolygon::Can_update_configuration
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().

◆ Enable_redistribution_of_segments_between_polylines

bool oomph::TriangleMeshPolygon::Enable_redistribution_of_segments_between_polylines
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().

◆ Polygon_fixed

bool oomph::TriangleMeshPolygon::Polygon_fixed
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().


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