libMesh
Public Member Functions | Private Attributes | List of all members
libMesh::TriangleInterface::ArbitraryHole Class Reference

Another concrete instantiation of the hole, this one should be sufficiently general for most non-polygonal purposes. More...

#include <mesh_triangle_holes.h>

Inheritance diagram for libMesh::TriangleInterface::ArbitraryHole:
[legend]

Public Member Functions

 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. More...
 
 ArbitraryHole (const Point &center, const std::vector< Point > &points, const std::vector< unsigned int > &segment_indices)
 
virtual unsigned int n_points () const override
 The number of geometric points which define the hole. More...
 
virtual Point point (const unsigned int n) const override
 Return the nth point defining the hole. More...
 
virtual Point inside () const override
 Return an (arbitrary) point which lies inside the hole. More...
 
virtual std::vector< unsigned intsegment_indices () const override
 Starting indices of points for a hole with multiple disconnected boundaries. More...
 

Private Attributes

const Point _center
 arbitrary (x,y) location inside the hole More...
 
const std::vector< Point_points
 Reference to the vector of points which makes up the hole. More...
 
std::vector< unsigned int_segment_indices
 

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 142 of file mesh_triangle_holes.h.

Constructor & Destructor Documentation

◆ ArbitraryHole() [1/2]

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 66 of file mesh_triangle_holes.C.

68  : _center(center),
69  _points(points)
70 {
71  _segment_indices.push_back(0);
72  _segment_indices.push_back(points.size());
73 }

References _segment_indices.

◆ ArbitraryHole() [2/2]

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

Definition at line 75 of file mesh_triangle_holes.C.

78  : _center(center),
79  _points(points),
81 {}

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 96 of file mesh_triangle_holes.C.

97 {
98  return _center;
99 }

◆ 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 83 of file mesh_triangle_holes.C.

84 {
85  return _points.size();
86 }

◆ 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 89 of file mesh_triangle_holes.C.

90 {
91  libmesh_assert_less (n, _points.size());
92  return _points[n];
93 }

◆ segment_indices()

std::vector< unsigned int > libMesh::TriangleInterface::ArbitraryHole::segment_indices ( ) const
overridevirtual

Starting indices of points for a hole with multiple disconnected boundaries.

Reimplemented from libMesh::TriangleInterface::Hole.

Definition at line 101 of file mesh_triangle_holes.C.

102 {
103  return _segment_indices;
104 }

Member Data Documentation

◆ _center

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

arbitrary (x,y) location inside the hole

Definition at line 168 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 174 of file mesh_triangle_holes.h.

◆ _segment_indices

std::vector<unsigned int> libMesh::TriangleInterface::ArbitraryHole::_segment_indices
private

Definition at line 176 of file mesh_triangle_holes.h.

Referenced by ArbitraryHole().


The documentation for this class was generated from the following files:
libMesh::TriangleInterface::ArbitraryHole::_segment_indices
std::vector< unsigned int > _segment_indices
Definition: mesh_triangle_holes.h:176
libMesh::TriangleInterface::ArbitraryHole::_points
const std::vector< Point > _points
Reference to the vector of points which makes up the hole.
Definition: mesh_triangle_holes.h:174
libMesh::TriangleInterface::ArbitraryHole::_center
const Point _center
arbitrary (x,y) location inside the hole
Definition: mesh_triangle_holes.h:168
libMesh::TriangleInterface::ArbitraryHole::segment_indices
virtual std::vector< unsigned int > segment_indices() const override
Starting indices of points for a hole with multiple disconnected boundaries.
Definition: mesh_triangle_holes.C:101