PTEMS  0.1.0-dev+git.81fd0e4
PolyTopic Element Method Solver
ptems::DomainDefinition3D::SurfaceDefinition Class Reference

Defines a surface of a polyhedra in 3D as a list of vertices and linear facets. More...

#include <ptems/domaindefinition.hpp>

Public Member Functions

 SurfaceDefinition (Vector< 3 > &&interior, std::vector< Vector< 3 >> &&points, std::vector< Facet > &&facets)
 Defines a polyhedra surface as a list of vertices, and a list of facets. More...
 
 SurfaceDefinition (const Vector< 3 > &interior, const std::vector< Vector< 3 >> &points, const std::vector< Facet > &facets)
 Defines a polyhedra surface as a list of vertices, and a list of facets. More...
 
template<typename ItVerts , typename ItFacets >
 SurfaceDefinition (const Vector< 3 > &interior, ItVerts beginVerts, ItVerts endVerts, ItFacets beginFacets, ItFacets endFacets)
 Defines a polyhedra surface as a list of vertices, and a list of facets. More...
 
const std::vector< Vector< 3 > > Vertices () const
 Gets the list of vertices defining the surface. More...
 
const std::vector< Facet > & Facets () const
 Gets the facets of vertices defining the surface. More...
 
bool IsAligned () const
 Returns whether the surface facets are aligned with the axis planes. More...
 
const Vector< 3 > & InteriorPoint () const
 Gets an interior point of the polyhedra defined by this surface definition. More...
 

Detailed Description

Defines a surface of a polyhedra in 3D as a list of vertices and linear facets.

Constructor & Destructor Documentation

◆ SurfaceDefinition() [1/3]

ptems::DomainDefinition3D::SurfaceDefinition::SurfaceDefinition ( Vector< 3 > &&  interior,
std::vector< Vector< 3 >> &&  points,
std::vector< Facet > &&  facets 
)

Defines a polyhedra surface as a list of vertices, and a list of facets.

Warning
The surface MUST NOT intersect with itself. No checks are made to ensure this condition is met. Using a domain with a self-intersecting boundary results in undefined behaviour.
The surface MUST define a closed shape in 3D. No checks are made to ensure this condition is met. Using a domain with a unclosed shape results in undefined behaviour.
Parameters
interiorA point in the interior of the polyhedra defined by the surface
pointsList of the vertices defining the surface.
facetsList of facets defining the surface, where each facet is a list of indices to the vertices.
Exceptions
std::invalid_argumentIf a facet vertex index is greater or equal to the number of vertices.
std::invalid_argumentIf any facet is not planar (all vertices in one plane).
std::invalid_argumentIf the number of facets or vertices is less than 4.
std::invalid_argumentIf the number of facets or vertices is less than 4.

◆ SurfaceDefinition() [2/3]

ptems::DomainDefinition3D::SurfaceDefinition::SurfaceDefinition ( const Vector< 3 > &  interior,
const std::vector< Vector< 3 >> &  points,
const std::vector< Facet > &  facets 
)

Defines a polyhedra surface as a list of vertices, and a list of facets.

Warning
The surface MUST NOT intersect with itself. No checks are made to ensure this condition is met. Using a domain with a self-intersecting boundary results in undefined behaviour.
The surface MUST define a closed shape in 3D. No checks are made to ensure this condition is met. Using a domain with a unclosed shape results in undefined behaviour.
Parameters
interiorA point in the interior of the polyhedra defined by the surface
pointsList of the vertices defining the surface.
facetsList of facets defining the surface, where each facet is a list of indices to the vertices.
Exceptions
std::invalid_argumentIf a facet vertex index is greater or equal to the number of vertices.
std::invalid_argumentIf any facet is not planar (all vertices in one plane).
std::invalid_argumentIf the number of facets or vertices is less than 4.

◆ SurfaceDefinition() [3/3]

template<typename ItVerts , typename ItFacets >
ptems::DomainDefinition3D::SurfaceDefinition::SurfaceDefinition ( const Vector< 3 > &  interior,
ItVerts  beginVerts,
ItVerts  endVerts,
ItFacets  beginFacets,
ItFacets  endFacets 
)
inline

Defines a polyhedra surface as a list of vertices, and a list of facets.

Parameters
interiorA point in the interior of the polyhedra defined by the surface
beginVertsStart iterator to the list of the vertices defining the surface.
endVertsEnd iterator to the list of the vertices defining the surface.
beginFacetsStart iterator to list of facets defining the surface, where each facet is a list of indices to the vertices.
endFacetsEnd iterator to list of facets defining the surface, where each facet is a list of indices to the vertices.
Exceptions
std::invalid_argumentIf a facet vertex index is greater or equal to the number of vertices.
std::invalid_argumentIf any facet is not planar (all vertices in one plane).
std::invalid_argumentIf the number of facets or vertices is less than 4.

Member Function Documentation

◆ Facets()

const std::vector<Facet>& ptems::DomainDefinition3D::SurfaceDefinition::Facets ( ) const
inline

Gets the facets of vertices defining the surface.

Returns
List of facets.

◆ InteriorPoint()

const Vector<3>& ptems::DomainDefinition3D::SurfaceDefinition::InteriorPoint ( ) const
inline

Gets an interior point of the polyhedra defined by this surface definition.

Returns
A point interior to the polyhedra.

◆ IsAligned()

bool ptems::DomainDefinition3D::SurfaceDefinition::IsAligned ( ) const

Returns whether the surface facets are aligned with the axis planes.

Returns
true if surface is aligned to the axis; false otherwise.

◆ Vertices()

const std::vector<Vector<3> > ptems::DomainDefinition3D::SurfaceDefinition::Vertices ( ) const
inline

Gets the list of vertices defining the surface.

Returns
List of vertices.

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