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

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

Inheritance diagram for axom::quest::Shaper:

Public Types

using RefinementType = enum { RefinementUniformSegments, RefinementDynamic }
 Refinement type. More...
 

Public Member Functions

 Shaper (const klee::ShapeSet &shapeSet, sidre::MFEMSidreDataCollection *dc)
 
virtual ~Shaper ()=default
 
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...
 
Functions related to the stages for a given shape
virtual void loadShape (const klee::Shape &shape)
 Loads the shape from file into m_surfaceMesh. More...
 
virtual void prepareShapeQuery (klee::Dimensions shapeDimension, const klee::Shape &shape)=0
 
virtual void runShapeQuery (const klee::Shape &shape)=0
 
virtual void applyReplacementRules (const klee::Shape &shape)=0
 
virtual void finalizeShapeQuery ()=0
 

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}
 

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

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}
 
virtual void adjustVolumeFractions ()=0
 
double allReduceSum (double val) const
 Helper to apply a parallel sum reduction to a quantity. More...
 
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...
 

Detailed Description

Abstract base class for shaping material volume fractions

Member Typedef Documentation

◆ RefinementType

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

Refinement type.

Constructor & Destructor Documentation

◆ Shaper()

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

◆ ~Shaper()

virtual axom::quest::Shaper::~Shaper ( )
virtualdefault

Member Function Documentation

◆ setSamplesPerKnotSpan()

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

◆ setVertexWeldThreshold()

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

◆ setVerbosity()

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

References isVerbose(), and m_verboseOutput.

◆ setPercentError()

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

◆ setRefinementType()

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

◆ isVerbose()

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

References m_verboseOutput.

◆ getDC()

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

References m_dc.

◆ getSurfaceMesh()

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

References m_surfaceMesh.

◆ isValidFormat()

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

Predicate to determine if the specified format is valid.

Parameters
formatA string listing the format to check

◆ loadShape()

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

Loads the shape from file into m_surfaceMesh.

Reimplemented in axom::quest::IntersectionShaper.

◆ prepareShapeQuery()

virtual void axom::quest::Shaper::prepareShapeQuery ( klee::Dimensions  shapeDimension,
const klee::Shape shape 
)
pure virtual

◆ runShapeQuery()

virtual void axom::quest::Shaper::runShapeQuery ( const klee::Shape shape)
pure virtual

◆ applyReplacementRules()

virtual void axom::quest::Shaper::applyReplacementRules ( const klee::Shape shape)
pure virtual

◆ finalizeShapeQuery()

virtual void axom::quest::Shaper::finalizeShapeQuery ( )
pure virtual

◆ adjustVolumeFractions()

virtual void axom::quest::Shaper::adjustVolumeFractions ( )
pure virtual

◆ allReduceSum()

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

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 
)
protected

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)
protected

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)
protected

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
protected

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
protected

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_SAMPLES_PER_KNOT_SPAN

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

◆ MINIMUM_PERCENT_ERROR

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

◆ MAXIMUM_PERCENT_ERROR

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

◆ DEFAULT_VERTEX_WELD_THRESHOLD

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

◆ m_shapeSet

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

◆ m_dc

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

◆ m_surfaceMesh

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

◆ m_samplesPerKnotSpan

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

◆ m_percentError

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

◆ m_refinementType

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

◆ m_vertexWeldThreshold

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

◆ m_verboseOutput

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

◆ m_comm

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

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