AXOM
Axom provides a robust, flexible software infrastructure for the development of multi-physics applications and computational tools.
axom::quest::DiscreteShape Class Reference

Post-processed klee::Shape, with the geometry discretized and transformed according to the Shape's operators. More...

#include </home/docs/checkouts/readthedocs.org/user_builds/axom/checkouts/develop/src/axom/quest/DiscreteShape.hpp>

Public Types

using RefinementType = enum { RefinementUniformSegments, RefinementDynamic }
 Refinement type. More...
 
using Point3D = axom::primal::Point< double, 3 >
 
using Vector3D = axom::primal::Vector< double, 3 >
 
using TetType = axom::primal::Tetrahedron< double, 3 >
 
using OctType = axom::primal::Octahedron< double, 3 >
 
using HexType = axom::primal::Hexahedron< double, 3 >
 
using TetMesh = axom::mint::UnstructuredMesh< axom::mint::Topology::SINGLE_SHAPE >
 

Public Member Functions

 DiscreteShape (const axom::klee::Shape &shape, axom::sidre::Group *parentGroup, const std::string &prefixPath={})
 Constructor. More...
 
virtual ~DiscreteShape ()
 
const axom::klee::ShapegetShape () const
 
std::shared_ptr< mint::MeshcreateMeshRepresentation ()
 Get the discrete mesh representation. More...
 
std::shared_ptr< mint::MeshgetMeshRepresentation () const
 Get the discrete mesh representation. More...
 
double getRevolvedVolume () const
 Get the revolved volume for volumes of revolution, which is non-zero only for shapes from C2C contours. More...
 
void createRepresentationOfBlueprintTets ()
 Create the internal mesh representation of the user's tet mesh. More...
 
void createRepresentationOfTet ()
 Create the internal mesh representation of the analytical tetrahedron. More...
 
void createRepresentationOfHex ()
 Create the internal mesh representation of the analytical hexahedron. More...
 
void createRepresentationOfPlane ()
 Create the internal mesh representation of the analytical plane. More...
 
void createRepresentationOfSphere ()
 Create the internal mesh representation of the analytical sphere. More...
 
void createRepresentationOfSOR ()
 Create the internal mesh representation of the analytical SOR. More...
 
Functions to get and set shaping parameters
void setPrefixPath (const std::string &prefixPath)
 Set prefix for shape files specified as relative path. More...
 
void setRefinementType (RefinementType refinementType)
 Set the refinement type. Refinement type is used for shaping with C2C contours. More...
 
void setSamplesPerKnotSpan (int nSamples)
 
void setVertexWeldThreshold (double threshold)
 
void setPercentError (double percent)
 Set the percentage error tolerance. More...
 

Static Public Attributes

static constexpr int DEFAULT_SAMPLES_PER_KNOT_SPAN {25}
 
static constexpr double MINIMUM_PERCENT_ERROR {0.}
 
static constexpr double MAXIMUM_PERCENT_ERROR {100.}
 
static constexpr double DEFAULT_VERTEX_WELD_THRESHOLD {1e-9}
 

Detailed Description

Post-processed klee::Shape, with the geometry discretized and transformed according to the Shape's operators.

TODO: Move this class into internal namespace.

Member Typedef Documentation

◆ RefinementType

using axom::quest::DiscreteShape::RefinementType = enum { RefinementUniformSegments, RefinementDynamic }

Refinement type.

◆ Point3D

◆ Vector3D

◆ TetType

◆ OctType

◆ HexType

◆ TetMesh

using axom::quest::DiscreteShape::TetMesh = axom::mint::UnstructuredMesh<axom::mint::Topology::SINGLE_SHAPE>

Constructor & Destructor Documentation

◆ DiscreteShape()

axom::quest::DiscreteShape::DiscreteShape ( const axom::klee::Shape shape,
axom::sidre::Group parentGroup,
const std::string &  prefixPath = {} 
)

Constructor.

Parameters
shapeThe Klee specifications for the shape.
parentGroupGroup under which to put the discrete mesh and support blueprint-tets shapes. If null, don't use sidre and don't support blueprint-tets.
prefixPathPath prefix for shape from a file specified with a relative path.

Refinement type is set to DiscreteShape::RefinementUniformSegments and percent error is set to 0. See setPercentError() and setRefinementType().

◆ ~DiscreteShape()

virtual axom::quest::DiscreteShape::~DiscreteShape ( )
inlinevirtual

Member Function Documentation

◆ setPrefixPath()

void axom::quest::DiscreteShape::setPrefixPath ( const std::string &  prefixPath)

Set prefix for shape files specified as relative path.

◆ setRefinementType()

void axom::quest::DiscreteShape::setRefinementType ( RefinementType  refinementType)
inline

Set the refinement type. Refinement type is used for shaping with C2C contours.

◆ setSamplesPerKnotSpan()

void axom::quest::DiscreteShape::setSamplesPerKnotSpan ( int  nSamples)

◆ setVertexWeldThreshold()

void axom::quest::DiscreteShape::setVertexWeldThreshold ( double  threshold)

◆ setPercentError()

void axom::quest::DiscreteShape::setPercentError ( double  percent)

Set the percentage error tolerance.

If percent <= MINIMUM_PERCENT_ERROR, the refinement type will change to DiscreteShape::RefinementUniformSegments.

◆ getShape()

const axom::klee::Shape& axom::quest::DiscreteShape::getShape ( ) const
inline

Get the name of this shape.

Returns
the shape's name

◆ createMeshRepresentation()

std::shared_ptr<mint::Mesh> axom::quest::DiscreteShape::createMeshRepresentation ( )

Get the discrete mesh representation.

If the sidre parent group was used in the constructor, the mesh data is stored under that group.

If the discrete mesh isn't generated yet (for analytical shapes), generate it.

◆ getMeshRepresentation()

std::shared_ptr<mint::Mesh> axom::quest::DiscreteShape::getMeshRepresentation ( ) const
inline

Get the discrete mesh representation.

◆ getRevolvedVolume()

double axom::quest::DiscreteShape::getRevolvedVolume ( ) const
inline

Get the revolved volume for volumes of revolution, which is non-zero only for shapes from C2C contours.

◆ createRepresentationOfBlueprintTets()

void axom::quest::DiscreteShape::createRepresentationOfBlueprintTets ( )

Create the internal mesh representation of the user's tet mesh.

◆ createRepresentationOfTet()

void axom::quest::DiscreteShape::createRepresentationOfTet ( )

Create the internal mesh representation of the analytical tetrahedron.

◆ createRepresentationOfHex()

void axom::quest::DiscreteShape::createRepresentationOfHex ( )

Create the internal mesh representation of the analytical hexahedron.

◆ createRepresentationOfPlane()

void axom::quest::DiscreteShape::createRepresentationOfPlane ( )

Create the internal mesh representation of the analytical plane.

◆ createRepresentationOfSphere()

void axom::quest::DiscreteShape::createRepresentationOfSphere ( )

Create the internal mesh representation of the analytical sphere.

◆ createRepresentationOfSOR()

void axom::quest::DiscreteShape::createRepresentationOfSOR ( )

Create the internal mesh representation of the analytical SOR.

Member Data Documentation

◆ DEFAULT_SAMPLES_PER_KNOT_SPAN

constexpr int axom::quest::DiscreteShape::DEFAULT_SAMPLES_PER_KNOT_SPAN {25}
staticconstexpr

◆ MINIMUM_PERCENT_ERROR

constexpr double axom::quest::DiscreteShape::MINIMUM_PERCENT_ERROR {0.}
staticconstexpr

◆ MAXIMUM_PERCENT_ERROR

constexpr double axom::quest::DiscreteShape::MAXIMUM_PERCENT_ERROR {100.}
staticconstexpr

◆ DEFAULT_VERTEX_WELD_THRESHOLD

constexpr double axom::quest::DiscreteShape::DEFAULT_VERTEX_WELD_THRESHOLD {1e-9}
staticconstexpr

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