libMesh::TriangleInterface::ArbitraryHole Class Reference

#include <mesh_triangle_holes.h>

Inheritance diagram for libMesh::TriangleInterface::ArbitraryHole:

Public Member Functions

 ArbitraryHole (const Point &center, const std::vector< Point > &points)
 
virtual unsigned int n_points () const override
 
virtual Point point (const unsigned int n) const override
 
virtual Point inside () const override
 

Private Attributes

Point _center
 
const std::vector< Point > & _points
 

Detailed Description

Another concrete instantiation of the hole, this one should be sufficiently general for most non-polygonal purposes. The user supplies, at the time of construction, a reference to a vector of Points which defines the hole (in order of connectivity) and an arbitrary Point which lies inside the hole.

Definition at line 126 of file mesh_triangle_holes.h.

Constructor & Destructor Documentation

◆ ArbitraryHole()

libMesh::TriangleInterface::ArbitraryHole::ArbitraryHole ( const Point center,
const std::vector< Point > &  points 
)

The constructor requires a point which lies in the interior of the hole and a reference to a vector of Points defining the hole.

Definition at line 69 of file mesh_triangle_holes.C.

71  : _center(center),
72  _points(points)
73 {}

Member Function Documentation

◆ inside()

Point libMesh::TriangleInterface::ArbitraryHole::inside ( ) const
overridevirtual

Return an (arbitrary) point which lies inside the hole.

Implements libMesh::TriangleInterface::Hole.

Definition at line 89 of file mesh_triangle_holes.C.

◆ n_points()

unsigned int libMesh::TriangleInterface::ArbitraryHole::n_points ( ) const
overridevirtual

The number of geometric points which define the hole.

Implements libMesh::TriangleInterface::Hole.

Definition at line 76 of file mesh_triangle_holes.C.

77 {
78  return _points.size();
79 }

◆ point()

Point libMesh::TriangleInterface::ArbitraryHole::point ( const unsigned int  n) const
overridevirtual

Return the nth point defining the hole.

Implements libMesh::TriangleInterface::Hole.

Definition at line 82 of file mesh_triangle_holes.C.

83 {
84  libmesh_assert_less (n, _points.size());
85  return _points[n];
86 }

Member Data Documentation

◆ _center

Point libMesh::TriangleInterface::ArbitraryHole::_center
private

arbitrary (x,y) location inside the hole

Definition at line 146 of file mesh_triangle_holes.h.

◆ _points

const std::vector<Point>& libMesh::TriangleInterface::ArbitraryHole::_points
private

Reference to the vector of points which makes up the hole.

Definition at line 152 of file mesh_triangle_holes.h.


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