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

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

Inheritance diagram for axom::quest::IntersectionShaper:

Public Types

using BoundingBoxType = primal::BoundingBox< double, 3 >
 
using HexahedronType = primal::Hexahedron< double, 3 >
 
using OctahedronType = primal::Octahedron< double, 3 >
 
using PolyhedronType = primal::Polyhedron< double, 3 >
 
using Point2D = primal::Point< double, 2 >
 
using Point3D = primal::Point< double, 3 >
 
using TetrahedronType = primal::Tetrahedron< double, 3 >
 
using SegmentMesh = mint::UnstructuredMesh< mint::SINGLE_SHAPE >
 
using RuntimePolicy = axom::runtime_policy::Policy
 
using RefinementType = enum { RefinementUniformSegments, RefinementDynamic }
 Refinement type. More...
 

Public Member Functions

 IntersectionShaper (const klee::ShapeSet &shapeSet, sidre::MFEMSidreDataCollection *dc)
 
Functions to get and set shaping parameters related to intersection; supplements parameters in base class
void setLevel (int level)
 
void setExecPolicy (RuntimePolicy policy)
 
void setFreeMaterialName (const std::string &name)
 Set the name of the material used to account for free volume fractions. More...
 
double getRevolvedVolume () const
 Return the revolved volume that was computed during dynamic refinement. More...
 
double getApproximateRevolvedVolume () const
 Return the revolved volume for the m_surfaceMesh at m_level circle refinement. More...
 
virtual void loadShape (const klee::Shape &shape) override
 Loads the shape from file into m_surfaceMesh. More...
 
Functions to get and set shaping parameters
void setSamplesPerKnotSpan (int nSamples)
 
void setVertexWeldThreshold (double threshold)
 
void setVerbosity (bool isVerbose)
 
void setPercentError (double percent)
 
void setRefinementType (RefinementType t)
 
bool isVerbose () const
 
sidre::MFEMSidreDataCollection * getDC ()
 
mint::MeshgetSurfaceMesh () const
 
virtual bool isValidFormat (const std::string &format) const
 Predicate to determine if the specified format is valid. More...
 

Static Public Attributes

static constexpr int DEFAULT_CIRCLE_REFINEMENT_LEVEL {7}
 
static constexpr double DEFAULT_REVOLVED_VOLUME {0.}
 
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}
 

Functions related to the stages for a given shape

void applyReplacementRules (const klee::Shape &shape) override
 Apply material replacement rules for the current shape, using the appropriate execution policy. More...
 
void finalizeShapeQuery () override
 
void prepareShapeQuery (klee::Dimensions shapeDimension, const klee::Shape &shape) override
 
void runShapeQuery (const klee::Shape &shape) override
 
void adjustVolumeFractions () override
 

Functions to generate/adjust volume fractions after all shapes have been applied

double allReduceSum (double val) const
 Helper to apply a parallel sum reduction to a quantity. More...
 
const klee::ShapeSetm_shapeSet
 
sidre::MFEMSidreDataCollection * m_dc
 
mint::Meshm_surfaceMesh {nullptr}
 
int m_samplesPerKnotSpan {DEFAULT_SAMPLES_PER_KNOT_SPAN}
 
double m_percentError {MINIMUM_PERCENT_ERROR}
 
RefinementType m_refinementType {RefinementUniformSegments}
 
double m_vertexWeldThreshold {DEFAULT_VERTEX_WELD_THRESHOLD}
 
bool m_verboseOutput {false}
 
MPI_Comm m_comm {MPI_COMM_SELF}
 
void loadShapeInternal (const klee::Shape &shape, double percentError, double &revolvedVolume)
 Loads the shape from file into m_surfaceMesh and computes a revolvedVolume for the shape. More...
 
void applyTransforms (const klee::Shape &shape)
 Computes transforms for the shape and applies them to the surface mesh. More...
 
void applyTransforms (const numerics::Matrix< double > &transform)
 Computes transforms for the shape and applies them to the surface mesh. More...
 
numerics::Matrix< double > getTransforms (const klee::Shape &shape) const
 Get a matrix that contains the shape's concatenated transforms. More...
 
int getRank () const
 Helper function to get the rank associated with the current process. More...
 

Member Typedef Documentation

◆ BoundingBoxType

◆ HexahedronType

◆ OctahedronType

◆ PolyhedronType

◆ Point2D

◆ Point3D

◆ TetrahedronType

◆ SegmentMesh

◆ RuntimePolicy

◆ RefinementType

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

Refinement type.

Constructor & Destructor Documentation

◆ IntersectionShaper()

axom::quest::IntersectionShaper::IntersectionShaper ( const klee::ShapeSet shapeSet,
sidre::MFEMSidreDataCollection *  dc 
)
inline

Member Function Documentation

◆ setLevel()

void axom::quest::IntersectionShaper::setLevel ( int  level)
inline

◆ setExecPolicy()

void axom::quest::IntersectionShaper::setExecPolicy ( RuntimePolicy  policy)
inline

◆ setFreeMaterialName()

void axom::quest::IntersectionShaper::setFreeMaterialName ( const std::string &  name)
inline

Set the name of the material used to account for free volume fractions.

Parameters
nameThe new name of the material. This name cannot contain underscores and it cannot be set once shaping has started.
Note
This should not be called once any shaping has occurred.

References SLIC_ERROR.

◆ getRevolvedVolume()

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

Return the revolved volume that was computed during dynamic refinement.

Returns
The revolved volume (or zero).

◆ getApproximateRevolvedVolume()

double axom::quest::IntersectionShaper::getApproximateRevolvedVolume ( ) const
inline

Return the revolved volume for the m_surfaceMesh at m_level circle refinement.

Note
loadShape should have been called before this method.
Returns
The revolved volume (or zero).

References axom::quest::Shaper::m_surfaceMesh.

◆ loadShape()

virtual void axom::quest::IntersectionShaper::loadShape ( const klee::Shape shape)
inlineoverridevirtual

◆ applyReplacementRules()

void axom::quest::IntersectionShaper::applyReplacementRules ( const klee::Shape shape)
inlineoverridevirtual

Apply material replacement rules for the current shape, using the appropriate execution policy.

Implements axom::quest::Shaper.

References AXOM_ANNOTATE_SCOPE, and AXOM_UNUSED_VAR.

◆ finalizeShapeQuery()

void axom::quest::IntersectionShaper::finalizeShapeQuery ( )
inlineoverridevirtual

◆ prepareShapeQuery()

void axom::quest::IntersectionShaper::prepareShapeQuery ( klee::Dimensions  shapeDimension,
const klee::Shape shape 
)
inlineoverridevirtual

◆ runShapeQuery()

void axom::quest::IntersectionShaper::runShapeQuery ( const klee::Shape shape)
inlineoverridevirtual

◆ adjustVolumeFractions()

void axom::quest::IntersectionShaper::adjustVolumeFractions ( )
inlineoverridevirtual

Implements axom::quest::Shaper.

◆ setSamplesPerKnotSpan()

void axom::quest::Shaper::setSamplesPerKnotSpan ( int  nSamples)
inherited

◆ setVertexWeldThreshold()

void axom::quest::Shaper::setVertexWeldThreshold ( double  threshold)
inherited

◆ setVerbosity()

void axom::quest::Shaper::setVerbosity ( bool  isVerbose)
inlineinherited

◆ setPercentError()

void axom::quest::Shaper::setPercentError ( double  percent)
inherited

◆ setRefinementType()

void axom::quest::Shaper::setRefinementType ( RefinementType  t)
inherited

◆ isVerbose()

bool axom::quest::Shaper::isVerbose ( ) const
inlineinherited

◆ getDC()

sidre::MFEMSidreDataCollection* axom::quest::Shaper::getDC ( )
inlineinherited

◆ getSurfaceMesh()

mint::Mesh* axom::quest::Shaper::getSurfaceMesh ( ) const
inlineinherited

◆ isValidFormat()

virtual bool axom::quest::Shaper::isValidFormat ( const std::string &  format) const
virtualinherited

Predicate to determine if the specified format is valid.

Parameters
formatA string listing the format to check

◆ allReduceSum()

double axom::quest::Shaper::allReduceSum ( double  val) const
inherited

Helper to apply a parallel sum reduction to a quantity.

Note
This is the identity function when running without MPI

◆ loadShapeInternal()

void axom::quest::Shaper::loadShapeInternal ( const klee::Shape shape,
double  percentError,
double &  revolvedVolume 
)
protectedinherited

Loads the shape from file into m_surfaceMesh and computes a revolvedVolume for the shape.

Parameters
shapeThe shape.
percentErrorA percent error to use when refining the shape. If it positive then Axom will try to refine dynamically according to this error. Otherwise, it will use the segmentsPerKnotSpan value.
[out]revolvedvolumeA revolved volume for the shape, if possible.

◆ applyTransforms() [1/2]

void axom::quest::Shaper::applyTransforms ( const klee::Shape shape)
protectedinherited

Computes transforms for the shape and applies them to the surface mesh.

Parameters
shapeThe shape.

◆ applyTransforms() [2/2]

void axom::quest::Shaper::applyTransforms ( const numerics::Matrix< double > &  transform)
protectedinherited

Computes transforms for the shape and applies them to the surface mesh.

Parameters
shapeThe shape.
transformA 4x4 matrix containing the transformation to apply.

◆ getTransforms()

numerics::Matrix<double> axom::quest::Shaper::getTransforms ( const klee::Shape shape) const
protectedinherited

Get a matrix that contains the shape's concatenated transforms.

Parameters
shapeThe shape whose transforms are being concatenated.
Returns
A 4x4 matrix that represents the transforms.

◆ getRank()

int axom::quest::Shaper::getRank ( ) const
protectedinherited

Helper function to get the rank associated with the current process.

Note
This function can be called even in non-mpi configurations

Member Data Documentation

◆ DEFAULT_CIRCLE_REFINEMENT_LEVEL

constexpr int axom::quest::IntersectionShaper::DEFAULT_CIRCLE_REFINEMENT_LEVEL {7}
staticconstexpr

◆ DEFAULT_REVOLVED_VOLUME

constexpr double axom::quest::IntersectionShaper::DEFAULT_REVOLVED_VOLUME {0.}
staticconstexpr

◆ DEFAULT_SAMPLES_PER_KNOT_SPAN

constexpr int axom::quest::Shaper::DEFAULT_SAMPLES_PER_KNOT_SPAN {25}
staticconstexprinherited

◆ MINIMUM_PERCENT_ERROR

constexpr double axom::quest::Shaper::MINIMUM_PERCENT_ERROR {0.}
staticconstexprinherited

◆ MAXIMUM_PERCENT_ERROR

constexpr double axom::quest::Shaper::MAXIMUM_PERCENT_ERROR {100.}
staticconstexprinherited

◆ DEFAULT_VERTEX_WELD_THRESHOLD

constexpr double axom::quest::Shaper::DEFAULT_VERTEX_WELD_THRESHOLD {1e-9}
staticconstexprinherited

◆ m_shapeSet

const klee::ShapeSet& axom::quest::Shaper::m_shapeSet
protectedinherited

◆ m_dc

sidre::MFEMSidreDataCollection* axom::quest::Shaper::m_dc
protectedinherited

◆ m_surfaceMesh

mint::Mesh* axom::quest::Shaper::m_surfaceMesh {nullptr}
protectedinherited

◆ m_samplesPerKnotSpan

int axom::quest::Shaper::m_samplesPerKnotSpan {DEFAULT_SAMPLES_PER_KNOT_SPAN}
protectedinherited

◆ m_percentError

double axom::quest::Shaper::m_percentError {MINIMUM_PERCENT_ERROR}
protectedinherited

◆ m_refinementType

RefinementType axom::quest::Shaper::m_refinementType {RefinementUniformSegments}
protectedinherited

◆ m_vertexWeldThreshold

double axom::quest::Shaper::m_vertexWeldThreshold {DEFAULT_VERTEX_WELD_THRESHOLD}
protectedinherited

◆ m_verboseOutput

bool axom::quest::Shaper::m_verboseOutput {false}
protectedinherited

◆ m_comm

MPI_Comm axom::quest::Shaper::m_comm {MPI_COMM_SELF}
protectedinherited

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