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

Definition of the computational domain in 3D as an outer (boundary) surface, and a set of surfaces of polyhedra denoting internal holes. More...

#include <ptems/domaindefinition.hpp>

Classes

class  Facet
 Defines a facet of a surface of the domain. More...
 
class  SurfaceDefinition
 Defines a surface of a polyhedra in 3D as a list of vertices and linear facets. More...
 

Public Member Functions

 DomainDefinition3D (SurfaceDefinition &&surface)
 Create a computational domain by the surface of a polyhedra. More...
 
 DomainDefinition3D (const SurfaceDefinition &surface)
 Create a computational domain by the surface of a polyhedra. More...
 
 DomainDefinition3D (Vector< 3 > &&interior, std::vector< Vector< 3 >> &&points, std::vector< Facet > &&facets)
 Create a computational domain by the surface of a polyhedra, where a surface is defined as list of vertices and linear facets. More...
 
 DomainDefinition3D (const Vector< 3 > &interior, const std::vector< Vector< 3 >> &points, const std::vector< Facet > &facets)
 Create a computational domain by the surface of a polyhedra, where a surface is defined as list of vertices and linear facets. More...
 
template<typename ItVerts , typename ItFacets >
 DomainDefinition3D (const Vector< 3 > &interior, ItVerts beginVerts, ItVerts endVerts, ItFacets beginFacets, ItFacets endFacets)
 Create a computational domain by the surface of a polyhedra, where a surface is defined as list of vertices and linear facets. More...
 
void AddHole (SurfaceDefinition &&surface)
 Adds a hole into the domain. More...
 
void AddHole (const SurfaceDefinition &surface)
 Adds a hole into the domain. More...
 
void AddHole (Vector< 3 > &&interior, std::vector< Vector< 3 >> &&points, std::vector< Facet > &&facets)
 Adds a hole into the domain defined by a surface. More...
 
void AddHole (const Vector< 3 > &interior, const std::vector< Vector< 3 >> &points, const std::vector< Facet > &facets)
 Adds a hole into the domain defined by a surface. More...
 
template<typename ItVerts , typename ItFacets >
void AddHole (const Vector< 3 > &interior, ItVerts beginVerts, ItVerts endVerts, ItFacets beginFacets, ItFacets endFacets)
 Adds a hole into the domain defined by a surface. More...
 
bool IsAligned () const
 Returns whether the domain boundary surface facets are aligned with the axis. More...
 
std::size_t MinElementsX () const
 Returns the minimum number of elements (or the multiplier) in the x-coordinate for uniform refinement to ensure that the mesh aligns with the boundary. More...
 
std::size_t MinElementsY () const
 Returns the minimum number of elements (or the multiplier) in the y-coordinate for uniform refinement to ensure that the mesh aligns with the boundary. More...
 
std::size_t MinElementsZ () const
 Returns the minimum number of elements (or the multiplier) in the z-coordinate for uniform refinement to ensure that the mesh aligns with the boundary. More...
 
BBox< 3 > BoundingBox () const
 Gets the bounding box of the domain. More...
 
bool IsValid () const
 Checks if the domain is valid (contains at least three points in the boundary) More...
 
 operator bool () const
 Checks if the domain is valid (contains at least three points in the boundary) More...
 
const SurfaceDefinitionBoundary () const
 Gets the surface defining the boundary. More...
 
const std::vector< SurfaceDefinition > & Holes () const
 Gets the list of holes in the domain. More...
 

Static Public Member Functions

static DomainDefinition3D Cube (double xMin, double xMax, double yMin, double yMax, double zMin, double zMax)
 Create a cuboid computational domain with the specified dimensions. More...
 
static DomainDefinition3D Cube (const Vector< 3 > &p1, const Vector< 3 > &p2)
 Create a cuboid computational domain with the specified opposite corners. More...
 
static DomainDefinition3D Cube (double min, double max)
 Create a cube computational domain with the specified dimensions. More...
 
static DomainDefinition3D Cube ()
 Create a unit cube \( (0,1)^3 \) computational domain. More...
 
static DomainDefinition3D Obstacle (double xMin, double xMax, double yMin, double yMax, double zMin, double zMax, double xMinObstacle, double xMaxObstacle, double yMinObstacle, double yMaxObstacle, double zMinObstacle, double zMaxObstacle)
 Create a cuboid computational domain with the specified dimensions, containing a cuboid obstacle with the specified dimensions. More...
 
static DomainDefinition3D Obstacle (const Vector< 3 > &p1, const Vector< 3 > &p2, const Vector< 3 > &obs1, const Vector< 3 > &obs2)
 Create a cuboid computational domain with the opposite corners for the domain and obstacle. More...
 
static DomainDefinition3D Obstacle (double min, double max, double minObstacle, double maxObstacle)
 Create a cube computational domain with the specified dimensions, containing a cube obstacle with the specified dimensions. More...
 
static DomainDefinition3D ExtrudedLShape (double xMin, double xMax, double yMin, double yMax, double zMin, double zMax, double xCentre, double yCentre, LShapeDomain shape=LShapeDomain::MinusSE)
 Creates an L-shape computational domain (in xy plane), extruded in the the z-direction, defined by the specified dimensions. More...
 
static DomainDefinition3D ExtrudedLShape (const Vector< 3 > &p1, const Vector< 3 > &p2, const Vector< 2 > &centre, LShapeDomain shape=LShapeDomain::MinusSE)
 Create an L-shape computational domain, extruded in the z direction, within the bounding box denoted by the opposite corners. More...
 
static DomainDefinition3D ExtrudedLShape (double xMin, double xMax, double yMin, double yMax, double zMin, double zMax, LShapeDomain shape=LShapeDomain::MinusSE)
 Creates an L-shape computational domain (in xy plane), extruded in the the z-direction, defined by the specified dimensions with centre point (re-entrant corner) of the L-shape at the midpoint of the xy plane. More...
 
static DomainDefinition3D ExtrudedLShape (const Vector< 3 > &p1, const Vector< 3 > &p2, LShapeDomain shape=LShapeDomain::MinusSE)
 Create an L-shape computational domain, extruded in the z direction, within the bounding box denoted by the opposite corners with centre point (re-entrant corner) of the L-shape at the midpoint of the xy plane. More...
 
static DomainDefinition3D ExtrudedLShape (double min, double max, double zMin, double zMax, double centre, LShapeDomain shape=LShapeDomain::MinusSE)
 Creates an L-shape computational domain (in xy plane), extruded in the the z-direction, defined by the specified dimensions. More...
 
static DomainDefinition3D ExtrudedLShape (double min, double max, double zMin, double zMax, LShapeDomain shape=LShapeDomain::MinusSE)
 Creates an L-shape computational domain (in xy plane), extruded in the the z-direction, defined by the specified dimensions with centre point (re-entrant corner) of the L-shape at the midpoint of the xy plane. More...
 
static DomainDefinition3D ExtrudedLShape (double min, double max, double centre, LShapeDomain shape=LShapeDomain::MinusSE)
 Creates an L-shape computational domain (in xy plane), extruded in the the z-direction, defined by the specified dimensions. More...
 
static DomainDefinition3D ExtrudedLShape (double min, double max, LShapeDomain shape=LShapeDomain::MinusSE)
 Creates an L-shape computational domain (in xy plane), extruded in the the z-direction, defined by the specified dimensions with centre point (re-entrant corner) of the L-shape at the midpoint of the xy plane. More...
 
static DomainDefinition3D ExtrudedLShape (LShapeDomain shape=LShapeDomain::MinusSE)
 Creates an L-shape computational domain (in xy plane), extruded in the the z-direction, with limits [-1,1] for all coordinate directions and centre point (re-entrant corner) at (0,0). More...
 
static DomainDefinition3D Fichera (double xMin, double xMax, double yMin, double yMax, double zMin, double zMax, double xCentre, double yCentre, double zCentre)
 Creates the Fichera corner \( ((xMin,xMax)\times(yMin,yMax)\times(zMin,zMax))\setminus([xCentre,xMax)\times[yCentre,yMax)\times[zCentre,zMax)) \),. More...
 
static DomainDefinition3D Fichera (const Vector< 3 > &p1, const Vector< 3 > &p2, const Vector< 3 > &centre)
 Create a Fichera corner computational domain, within the bounding box denoted by the opposite corners. More...
 
static DomainDefinition3D Fichera (double xMin, double xMax, double yMin, double yMax, double zMin, double zMax)
 Creates the Fichera corner \( ((xMin,xMax)\times(yMin,yMax)\times(zMin,zMax))\setminus([xCentre,xMax)\times[yCentre,yMax)\times[zCentre,zMax)) \), where the centre (re-entrant) corner \( (xCentre,yCentre,zCentre) \) is defined as the midpoint of the defined limits. More...
 
static DomainDefinition3D Fichera (const Vector< 3 > &p1, const Vector< 3 > &p2)
 Create a Fichera corner computational domain, within the bounding box denoted by the opposite corners with centre point (re-entrant corner) of the Fichera at the midpoint of the xy plane. More...
 
static DomainDefinition3D Fichera (double min, double max, double centre)
 Creates the Fichera corner \( (min,max)^3 \setminus [centre,max]^3 \). More...
 
static DomainDefinition3D Fichera (double min, double max)
 Creates the Fichera corner \( (min,max)^3 \setminus [(min+max)/2),max]^3 \). More...
 
static DomainDefinition3D Fichera ()
 Creates the Fichera corner \( (-1,1)^3 \setminus [0,1]^3 \). More...
 

Detailed Description

Definition of the computational domain in 3D as an outer (boundary) surface, and a set of surfaces of polyhedra denoting internal holes.

A surface is defined as a set of linear facets.

Constructor & Destructor Documentation

◆ DomainDefinition3D() [1/5]

ptems::DomainDefinition3D::DomainDefinition3D ( SurfaceDefinition &&  surface)
inline

Create a computational domain by the surface of a polyhedra.

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
surfaceThe polyhedra surface defining the domain.

◆ DomainDefinition3D() [2/5]

ptems::DomainDefinition3D::DomainDefinition3D ( const SurfaceDefinition surface)
inline

Create a computational domain by the surface of a polyhedra.

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
surfaceThe polyhedra surface defining the domain.

◆ DomainDefinition3D() [3/5]

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

Create a computational domain by the surface of a polyhedra, where a surface is defined as list of vertices and linear 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 the number of facets or vertices is less than 4.

◆ DomainDefinition3D() [4/5]

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

Create a computational domain by the surface of a polyhedra, where a surface is defined as list of vertices and linear 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 the number of facets or vertices is less than 4.

◆ DomainDefinition3D() [5/5]

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

Create a computational domain by the surface of a polyhedra, where a surface is defined as list of vertices and linear 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
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 the number of facets or vertices is less than 4.

Member Function Documentation

◆ AddHole() [1/5]

void ptems::DomainDefinition3D::AddHole ( const SurfaceDefinition surface)
inline

Adds a hole into the domain.

Warning
The surface MUST NOT intersect with itself, another hole, or the boundary of the domain. No checks are made to ensure this condition is met. Using a domain with a self-intersecting hole, holes which intersect, or holes intersecting the boundary is 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
surfaceThe polyhedra surface defining the hole.

◆ AddHole() [2/5]

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

Adds a hole into the domain defined by a surface.

Warning
The surface MUST NOT intersect with itself, another hole, or the boundary of the domain. No checks are made to ensure this condition is met. Using a domain with a self-intersecting hole, holes which intersect, or holes intersecting the boundary is 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 the number of facets or vertices is less than 4.

◆ AddHole() [3/5]

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

Adds a hole into the domain defined by a surface.

Warning
The surface MUST NOT intersect with itself, another hole, or the boundary of the domain. No checks are made to ensure this condition is met. Using a domain with a self-intersecting hole, holes which intersect, or holes intersecting the boundary is 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
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 the number of facets or vertices is less than 4.

◆ AddHole() [4/5]

void ptems::DomainDefinition3D::AddHole ( SurfaceDefinition &&  surface)
inline

Adds a hole into the domain.

Warning
The surface MUST NOT intersect with itself, another hole, or the boundary of the domain. No checks are made to ensure this condition is met. Using a domain with a self-intersecting hole, holes which intersect, or holes intersecting the boundary is 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
surfaceThe polyhedra surface defining the hole.

◆ AddHole() [5/5]

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

Adds a hole into the domain defined by a surface.

Warning
The surface MUST NOT intersect with itself, another hole, or the boundary of the domain. No checks are made to ensure this condition is met. Using a domain with a self-intersecting hole, holes which intersect, or holes intersecting the boundary is 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 the number of facets or vertices is less than 4.

◆ Boundary()

const SurfaceDefinition& ptems::DomainDefinition3D::Boundary ( ) const
inline

Gets the surface defining the boundary.

Returns
The boundary surface definition

◆ BoundingBox()

BBox<3> ptems::DomainDefinition3D::BoundingBox ( ) const

Gets the bounding box of the domain.

Returns
Pair containing the lower left and upper right corners of the bounding box.

◆ Cube() [1/4]

static DomainDefinition3D ptems::DomainDefinition3D::Cube ( )
inlinestatic

Create a unit cube \( (0,1)^3 \) computational domain.

Returns
Domain definition for the unit cube

◆ Cube() [2/4]

static DomainDefinition3D ptems::DomainDefinition3D::Cube ( const Vector< 3 > &  p1,
const Vector< 3 > &  p2 
)
inlinestatic

Create a cuboid computational domain with the specified opposite corners.

Parameters
p1Coordinates of the first corner
p2Coordinates of the second, opposite, corner
Exceptions
std::invalid_argumentIf the difference between the two points, in the X, Y, or Z coordinates, is zero.
Returns
Domain definition for the specified cuboid

◆ Cube() [3/4]

static DomainDefinition3D ptems::DomainDefinition3D::Cube ( double  min,
double  max 
)
inlinestatic

Create a cube computational domain with the specified dimensions.

Parameters
minThe lower limit of the cube in all coordinate directions.
maxThe upper limit of the cube in all coordinate directions.
Exceptions
std::invalid_argumentIf the lower limit (min) is greater (or equal) to the upper limit (max)
Returns
Domain definition for the specified cube

◆ Cube() [4/4]

static DomainDefinition3D ptems::DomainDefinition3D::Cube ( double  xMin,
double  xMax,
double  yMin,
double  yMax,
double  zMin,
double  zMax 
)
static

Create a cuboid computational domain with the specified dimensions.

Parameters
xMinThe lower limit of the cuboid in the x coordinate direction.
xMaxThe upper limit of the cuboid in the x coordinate direction.
yMinThe lower limit of the cuboid in the y coordinate direction.
yMaxThe upper limit of the cuboid in the y coordinate direction.
zMinThe lower limit of the cuboid in the z coordinate direction.
zMaxThe upper limit of the cuboid in the z coordinate direction.
Exceptions
std::invalid_argumentIf the lower limit in any coordinate direction is greater (or equal) to the upper limit
Returns
Domain definition for the specified cuboid

◆ ExtrudedLShape() [1/9]

static DomainDefinition3D ptems::DomainDefinition3D::ExtrudedLShape ( const Vector< 3 > &  p1,
const Vector< 3 > &  p2,
const Vector< 2 > &  centre,
LShapeDomain  shape = LShapeDomain::MinusSE 
)
inlinestatic

Create an L-shape computational domain, extruded in the z direction, within the bounding box denoted by the opposite corners.

The L-shape has one of the following four layouts:

Parameters
p1Coordinates of the first corner of the bounding box
p2Coordinates of the second, opposite, corner of the bounding box
centreCoordinates of the centre (re-entrant) corner in the L-shape
shapeWhich L-shape domain to create (default = MinusSE)
Exceptions
std::invalid_argumentIf the difference between the two coordinates of the outer domain, in the X, Y, or Z coordinates, is zero.
std::invalid_argumentIf the centre (re-entrant) corner is not contained within the domain limits.
Returns
Domain definition for the L-shape

◆ ExtrudedLShape() [2/9]

static DomainDefinition3D ptems::DomainDefinition3D::ExtrudedLShape ( const Vector< 3 > &  p1,
const Vector< 3 > &  p2,
LShapeDomain  shape = LShapeDomain::MinusSE 
)
inlinestatic

Create an L-shape computational domain, extruded in the z direction, within the bounding box denoted by the opposite corners with centre point (re-entrant corner) of the L-shape at the midpoint of the xy plane.

Parameters
p1Coordinates of the first corner of the bounding box
p2Coordinates of the second, opposite, corner of the bounding box
shapeWhich L-shape domain to create (default = MinusSE)
Exceptions
std::invalid_argumentIf the difference between the two coordinates of the outer domain, in the X, Y, or Z coordinates, is zero.
Returns
Domain definition for the L-shape

◆ ExtrudedLShape() [3/9]

static DomainDefinition3D ptems::DomainDefinition3D::ExtrudedLShape ( double  min,
double  max,
double  centre,
LShapeDomain  shape = LShapeDomain::MinusSE 
)
inlinestatic

Creates an L-shape computational domain (in xy plane), extruded in the the z-direction, defined by the specified dimensions.

The L-shape has one of the following four layouts:

Parameters
minThe lower limit of the L-shape and extrusion in all coordinate directions.
maxThe upper limit of the L-shape and extrusion in all coordinate directions.
centreThe x and y coordinate of the centre (re-entrant) corner in the L-shape
shapeWhich L-shape domain to create (default = MinusSE)
Exceptions
std::invalid_argumentIf the lower limit of the domain in any coordinate direction is greater (or equal) to the upper limit
std::invalid_argumentIf the centre (re-entrant) corner is not contained within the domain limits.
Returns
Domain definition for the extruded L-shape

◆ ExtrudedLShape() [4/9]

static DomainDefinition3D ptems::DomainDefinition3D::ExtrudedLShape ( double  min,
double  max,
double  zMin,
double  zMax,
double  centre,
LShapeDomain  shape = LShapeDomain::MinusSE 
)
inlinestatic

Creates an L-shape computational domain (in xy plane), extruded in the the z-direction, defined by the specified dimensions.

The L-shape has one of the following four layouts:

Parameters
minThe lower limit of the L-shape in the x and y coordinate directions.
maxThe upper limit of the L-shape in the x and y coordinate directions.
zMinThe lower limit of the extrusion in the z coordinate direction.
zMaxThe upper limit of the extrusion in the z coordinate direction.
centreThe x and y coordinate of the centre (re-entrant) corner in the L-shape
shapeWhich L-shape domain to create (default = MinusSE)
Exceptions
std::invalid_argumentIf the lower limit of the domain in any coordinate direction is greater (or equal) to the upper limit
std::invalid_argumentIf the centre (re-entrant) corner is not contained within the domain limits.
Returns
Domain definition for the extruded L-shape

◆ ExtrudedLShape() [5/9]

static DomainDefinition3D ptems::DomainDefinition3D::ExtrudedLShape ( double  min,
double  max,
double  zMin,
double  zMax,
LShapeDomain  shape = LShapeDomain::MinusSE 
)
inlinestatic

Creates an L-shape computational domain (in xy plane), extruded in the the z-direction, defined by the specified dimensions with centre point (re-entrant corner) of the L-shape at the midpoint of the xy plane.

The L-shape has one of the following four layouts:

Parameters
minThe lower limit of the L-shape in the x and y coordinate directions.
maxThe upper limit of the L-shape in the x and y coordinate directions.
zMinThe lower limit of the extrusion in the z coordinate direction.
zMaxThe upper limit of the extrusion in the z coordinate direction.
shapeWhich L-shape domain to create (default = MinusSE)
Exceptions
std::invalid_argumentIf the lower limit of the domain in any coordinate direction is greater (or equal) to the upper limit
Returns
Domain definition for the extruded L-shape

◆ ExtrudedLShape() [6/9]

static DomainDefinition3D ptems::DomainDefinition3D::ExtrudedLShape ( double  min,
double  max,
LShapeDomain  shape = LShapeDomain::MinusSE 
)
inlinestatic

Creates an L-shape computational domain (in xy plane), extruded in the the z-direction, defined by the specified dimensions with centre point (re-entrant corner) of the L-shape at the midpoint of the xy plane.

The L-shape has one of the following four layouts:

Parameters
minThe lower limit of the L-shape and extrusion in all coordinate directions.
maxThe upper limit of the L-shape and extrusion in all coordinate directions.
shapeWhich L-shape domain to create (default = MinusSE)
Exceptions
std::invalid_argumentIf the lower limit of the domain in any coordinate direction is greater (or equal) to the upper limit
Returns
Domain definition for the extruded L-shape

◆ ExtrudedLShape() [7/9]

static DomainDefinition3D ptems::DomainDefinition3D::ExtrudedLShape ( double  xMin,
double  xMax,
double  yMin,
double  yMax,
double  zMin,
double  zMax,
double  xCentre,
double  yCentre,
LShapeDomain  shape = LShapeDomain::MinusSE 
)
static

Creates an L-shape computational domain (in xy plane), extruded in the the z-direction, defined by the specified dimensions.

The L-shape has one of the following four layouts:

Parameters
xMinThe lower limit of the L-shape in the x coordinate direction.
xMaxThe upper limit of the L-shape in the x coordinate direction.
yMinThe lower limit of the L-shape in the y coordinate direction.
yMaxThe upper limit of the L-shape in the y coordinate direction.
zMinThe lower limit of the extrusion in the z coordinate direction.
zMaxThe upper limit of the extrusion in the z coordinate direction.
xCentreThe x coordinate of the centre (re-entrant) corner in the L-shape
yCentreThe y coordinate of the centre (re-entrant) corner in the L-shape
shapeWhich L-shape domain to create (default = MinusSE)
Exceptions
std::invalid_argumentIf the lower limit of the domain in any coordinate direction is greater (or equal) to the upper limit
std::invalid_argumentIf the centre (re-entrant) corner is not contained within the domain limits.
Returns
Domain definition for the extruded L-shape

◆ ExtrudedLShape() [8/9]

static DomainDefinition3D ptems::DomainDefinition3D::ExtrudedLShape ( double  xMin,
double  xMax,
double  yMin,
double  yMax,
double  zMin,
double  zMax,
LShapeDomain  shape = LShapeDomain::MinusSE 
)
inlinestatic

Creates an L-shape computational domain (in xy plane), extruded in the the z-direction, defined by the specified dimensions with centre point (re-entrant corner) of the L-shape at the midpoint of the xy plane.

The L-shape has one of the following four layouts:

Parameters
xMinThe lower limit of the L-shape in the x coordinate direction.
xMaxThe upper limit of the L-shape in the x coordinate direction.
yMinThe lower limit of the L-shape in the y coordinate direction.
yMaxThe upper limit of the L-shape in the y coordinate direction.
zMinThe lower limit of the extrusion in the z coordinate direction.
zMaxThe upper limit of the extrusion in the z coordinate direction.
shapeWhich L-shape domain to create (default = MinusSE)
Exceptions
std::invalid_argumentIf the lower limit of the domain in any coordinate direction is greater (or equal) to the upper limit
std::invalid_argumentIf the centre (re-entrant) corner is not contained within the domain limits.
Returns
Domain definition for the extruded L-shape

◆ ExtrudedLShape() [9/9]

static DomainDefinition3D ptems::DomainDefinition3D::ExtrudedLShape ( LShapeDomain  shape = LShapeDomain::MinusSE)
inlinestatic

Creates an L-shape computational domain (in xy plane), extruded in the the z-direction, with limits [-1,1] for all coordinate directions and centre point (re-entrant corner) at (0,0).

The L-shape has one of the following four layouts:

Parameters
shapeWhich L-shape domain to create (default = MinusSE)
Returns
Domain definition for the extruded L-shape

◆ Fichera() [1/7]

static DomainDefinition3D ptems::DomainDefinition3D::Fichera ( )
inlinestatic

Creates the Fichera corner \( (-1,1)^3 \setminus [0,1]^3 \).

Parameters
minThe lower limit of the Fichera corner in all coordinate directions.
maxThe upper limit of the Fichera corner in all coordinate directions.
Returns
Domain definition for Fichera corner

◆ Fichera() [2/7]

static DomainDefinition3D ptems::DomainDefinition3D::Fichera ( const Vector< 3 > &  p1,
const Vector< 3 > &  p2 
)
inlinestatic

Create a Fichera corner computational domain, within the bounding box denoted by the opposite corners with centre point (re-entrant corner) of the Fichera at the midpoint of the xy plane.

Parameters
p1Coordinates of the first corner of the bounding box
p2Coordinates of the second, opposite, corner of the bounding box
Exceptions
std::invalid_argumentIf the difference between the two coordinates of the outer domain, in the X, Y, or Z coordinates, is zero.
Returns
Domain definition for Fichera corner

◆ Fichera() [3/7]

static DomainDefinition3D ptems::DomainDefinition3D::Fichera ( const Vector< 3 > &  p1,
const Vector< 3 > &  p2,
const Vector< 3 > &  centre 
)
inlinestatic

Create a Fichera corner computational domain, within the bounding box denoted by the opposite corners.

Parameters
p1Coordinates of the first corner of the bounding box
p2Coordinates of the second, opposite, corner of the bounding box
centreCoordinates of the centre (re-entrant) corner in the Fichera corner
Exceptions
std::invalid_argumentIf the difference between the two coordinates of the outer domain, in the X, Y, or Z coordinates, is zero.
std::invalid_argumentIf the centre (re-entrant) corner is not contained within the domain limits.
Returns
Domain definition for the Fichera corner

◆ Fichera() [4/7]

static DomainDefinition3D ptems::DomainDefinition3D::Fichera ( double  min,
double  max 
)
inlinestatic

Creates the Fichera corner \( (min,max)^3 \setminus [(min+max)/2),max]^3 \).

Parameters
minThe lower limit of the Fichera corner in all coordinate directions.
maxThe upper limit of the Fichera corner in all coordinate directions.
Exceptions
std::invalid_argumentIf the lower limit of the domain in any coordinate direction is greater (or equal) to the upper limit
Returns
Domain definition for Fichera corner

◆ Fichera() [5/7]

static DomainDefinition3D ptems::DomainDefinition3D::Fichera ( double  min,
double  max,
double  centre 
)
inlinestatic

Creates the Fichera corner \( (min,max)^3 \setminus [centre,max]^3 \).

Parameters
minThe lower limit of the Fichera corner in all coordinate directions.
maxThe upper limit of the Fichera corner in all coordinate directions.
centreThe x,y,z coordinates of the centre (re-entrant) corner in the Fichera corner
Exceptions
std::invalid_argumentIf the lower limit of the domain in any coordinate direction is greater (or equal) to the upper limit
std::invalid_argumentIf the centre (re-entrant) corner is not contained within the domain limits.
Returns
Domain definition for Fichera corner

◆ Fichera() [6/7]

static DomainDefinition3D ptems::DomainDefinition3D::Fichera ( double  xMin,
double  xMax,
double  yMin,
double  yMax,
double  zMin,
double  zMax 
)
inlinestatic

Creates the Fichera corner \( ((xMin,xMax)\times(yMin,yMax)\times(zMin,zMax))\setminus([xCentre,xMax)\times[yCentre,yMax)\times[zCentre,zMax)) \), where the centre (re-entrant) corner \( (xCentre,yCentre,zCentre) \) is defined as the midpoint of the defined limits.

Parameters
xMinThe lower limit of the Fichera corner in the x coordinate direction.
xMaxThe upper limit of the Fichera corner in the x coordinate direction.
yMinThe lower limit of the Fichera corner in the y coordinate direction.
yMaxThe upper limit of the Fichera corner in the y coordinate direction.
zMinThe lower limit of the Fichera corner in the z coordinate direction.
zMaxThe upper limit of the Fichera corner in the z coordinate direction.
Exceptions
std::invalid_argumentIf the lower limit of the domain in any coordinate direction is greater (or equal) to the upper limit
Returns
Domain definition for Fichera corner

◆ Fichera() [7/7]

static DomainDefinition3D ptems::DomainDefinition3D::Fichera ( double  xMin,
double  xMax,
double  yMin,
double  yMax,
double  zMin,
double  zMax,
double  xCentre,
double  yCentre,
double  zCentre 
)
static

Creates the Fichera corner \( ((xMin,xMax)\times(yMin,yMax)\times(zMin,zMax))\setminus([xCentre,xMax)\times[yCentre,yMax)\times[zCentre,zMax)) \),.

Parameters
xMinThe lower limit of the Fichera corner in the x coordinate direction.
xMaxThe upper limit of the Fichera corner in the x coordinate direction.
yMinThe lower limit of the Fichera corner in the y coordinate direction.
yMaxThe upper limit of the Fichera corner in the y coordinate direction.
zMinThe lower limit of the Fichera corner in the z coordinate direction.
zMaxThe upper limit of the Fichera corner in the z coordinate direction.
xCentreThe x coordinate of the centre (re-entrant) corner in the Fichera corner
yCentreThe y coordinate of the centre (re-entrant) corner in the Fichera corner
zCentreThe z coordinate of the centre (re-entrant) corner in the Fichera corner
Exceptions
std::invalid_argumentIf the lower limit of the domain in any coordinate direction is greater (or equal) to the upper limit
std::invalid_argumentIf the centre (re-entrant) corner is not contained within the domain limits.
Returns
Domain definition for Fichera corner

◆ Holes()

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

Gets the list of holes in the domain.

Returns
List of holes, each hole is a surface definition of the boundary of the hole.

◆ IsAligned()

bool ptems::DomainDefinition3D::IsAligned ( ) const

Returns whether the domain boundary surface facets are aligned with the axis.

Returns
true is boundary is aligned to the axis; false otherwise.

◆ IsValid()

bool ptems::DomainDefinition3D::IsValid ( ) const
inline

Checks if the domain is valid (contains at least three points in the boundary)

Returns
true if the domain is valid; false otherwise

◆ MinElementsX()

std::size_t ptems::DomainDefinition3D::MinElementsX ( ) const

Returns the minimum number of elements (or the multiplier) in the x-coordinate for uniform refinement to ensure that the mesh aligns with the boundary.

Warning
The result of this function is undefined if IsAligned() is false.
Returns
The multiplier of number of elements (in X direction) for uniform refinement.

◆ MinElementsY()

std::size_t ptems::DomainDefinition3D::MinElementsY ( ) const

Returns the minimum number of elements (or the multiplier) in the y-coordinate for uniform refinement to ensure that the mesh aligns with the boundary.

Warning
The result of this function is undefined if IsAligned() is false.
Returns
The multiplier of number of elements (in Y direction) for uniform refinement.

◆ MinElementsZ()

std::size_t ptems::DomainDefinition3D::MinElementsZ ( ) const

Returns the minimum number of elements (or the multiplier) in the z-coordinate for uniform refinement to ensure that the mesh aligns with the boundary.

Warning
The result of this function is undefined if IsAligned() is false.
Returns
The multiplier of number of elements (in Z direction) for uniform refinement.

◆ Obstacle() [1/3]

static DomainDefinition3D ptems::DomainDefinition3D::Obstacle ( const Vector< 3 > &  p1,
const Vector< 3 > &  p2,
const Vector< 3 > &  obs1,
const Vector< 3 > &  obs2 
)
inlinestatic

Create a cuboid computational domain with the opposite corners for the domain and obstacle.

Parameters
p1Coordinates of the first corner of the outer domain
p2Coordinates of the second, opposite, corner of the outer domain
obs1Coordinates of the first corner of the obstacle
obs2Coordinates of the second, opposite, corner of the obstacle
Exceptions
std::invalid_argumentIf the difference between the two coordinates of the outer domain, in the X, Y, or Z coordinates, is zero.
std::invalid_argumentIf the difference between the two coordinates of the obstacle, in the X, Y, or Z coordinates, is zero.
std::invalid_argumentIf the obstacle is not completely contained within the outer domain
Returns
Domain definition for the specified cuboid with obstacle

◆ Obstacle() [2/3]

static DomainDefinition3D ptems::DomainDefinition3D::Obstacle ( double  min,
double  max,
double  minObstacle,
double  maxObstacle 
)
inlinestatic

Create a cube computational domain with the specified dimensions, containing a cube obstacle with the specified dimensions.

Parameters
minThe lower limit of the cube in all coordinate directions.
maxThe upper limit of the cube in all coordinate directions.
minObstacleThe lower limit of the cube obstacle in all coordinate directions.
maxObstacleThe upper limit of the cube obstacle in all coordinate directions.
Exceptions
std::invalid_argumentIf the lower limit (min) is greater (or equal) to the upper limit (max)
std::invalid_argumentIf the lower limit of the obstacle (minObstacle) is greater (or equal) to the upper limit of the obstacle (maxObstacle)
std::invalid_argumentIf the obstacle is not completely contained within the outer domain
Returns
Domain definition for the specified cube with obstacle

◆ Obstacle() [3/3]

static DomainDefinition3D ptems::DomainDefinition3D::Obstacle ( double  xMin,
double  xMax,
double  yMin,
double  yMax,
double  zMin,
double  zMax,
double  xMinObstacle,
double  xMaxObstacle,
double  yMinObstacle,
double  yMaxObstacle,
double  zMinObstacle,
double  zMaxObstacle 
)
static

Create a cuboid computational domain with the specified dimensions, containing a cuboid obstacle with the specified dimensions.

Parameters
xMinThe lower limit of the cuboid in the x coordinate direction.
xMaxThe upper limit of the cuboid in the x coordinate direction.
yMinThe lower limit of the cuboid in the y coordinate direction.
yMaxThe upper limit of the cuboid in the y coordinate direction.
zMinThe lower limit of the cuboid in the z coordinate direction.
zMaxThe upper limit of the cuboid in the z coordinate direction.
xMinObstacleThe lower limit of the cuboid obstacle in the x coordinate direction.
xMaxObstacleThe upper limit of the cuboid obstacle in the x coordinate direction.
yMinObstacleThe lower limit of the cuboid obstacle in the y coordinate direction.
yMaxObstacleThe upper limit of the cuboid obstacle in the y coordinate direction.
zMinObstacleThe lower limit of the cuboid obstacle in the z coordinate direction.
zMaxObstacleThe upper limit of the cuboid obstacle in the z coordinate direction.
Exceptions
std::invalid_argumentIf the lower limit of the outer domain in any coordinate direction is greater (or equal) to the upper limit
std::invalid_argumentIf the lower limit of the obstacle in any coordinate direction is greater (or equal) to the upper limit
std::invalid_argumentIf the obstacle is not completely contained within the outer domain
Returns
Domain definition for the specified cuboid with obstacle

◆ operator bool()

ptems::DomainDefinition3D::operator bool ( ) const
inlineexplicit

Checks if the domain is valid (contains at least three points in the boundary)

Returns
true if the domain is valid; false otherwise

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