|
AXOM
Axom provides a robust, flexible software infrastructure for the development of multi-physics applications and computational tools.
|
#include </home/docs/checkouts/readthedocs.org/user_builds/axom/checkouts/main/src/axom/quest/Shaper.hpp>

Public Types | |
| using | RuntimePolicy = axom::runtime_policy::Policy |
| using | RefinementType = DiscreteShape::RefinementType |
| Refinement type. More... | |
Public Member Functions | |
| Shaper (RuntimePolicy execPolicy, int allocatorId, const klee::ShapeSet &shapeSet, sidre::Group *bpMesh, const std::string &topo="") | |
| Construct Shaper to operate on a blueprint-formatted mesh stored in a sidre Group. More... | |
| Shaper (RuntimePolicy execPolicy, int allocatorId, const klee::ShapeSet &shapeSet, conduit::Node &bpNode, const std::string &topo="") | |
| Construct Shaper to operate on a blueprint-formatted mesh stored in a conduit Node. More... | |
| virtual | ~Shaper () |
| bool | verifyInputMesh (std::string &whyBad) const |
| Verify the input mesh is okay for this class to work with. More... | |
| void | setFilePath (const std::string &filePath) |
| Set path of shape input file. More... | |
| mint::Mesh * | getSurfaceMesh () const |
| bool | isVerbose () const |
| virtual bool | isValidFormat (const std::string &format) const |
| Predicate to determine if the specified format is valid. More... | |
| std::string | shapeFormat (const klee::Shape &shape) const |
| Returns the format type of the supplied shape. More... | |
| RuntimePolicy | getExecutionPolicy () const |
| Returns the execution policy used by the Shaper. More... | |
| double | allReduceSum (double val) const |
| Helper to apply a parallel sum reduction to a quantity. More... | |
| double | allReduceMin (double val) const |
| Helper to apply a parallel min reduction to a quantity. More... | |
| double | allReduceMax (double val) const |
| Helper to apply a parallel max reduction to a quantity. 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) |
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 |
Functions to generate/adjust volume fractions after all shapes have been applied | |
| virtual void | adjustVolumeFractions ()=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} |
Protected Member Functions | |
| void | loadShapeInternal (const klee::Shape &shape, double percentError, double &revolvedVolume) |
| Loads the shape into m_surfaceMesh. 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... | |
Protected Attributes | |
| RuntimePolicy | m_execPolicy |
| int | m_allocatorId |
| sidre::DataStore | m_dataStore |
| const klee::ShapeSet & | m_shapeSet |
| std::string | m_prefixPath |
| Prefix path for shape file names with relative path. More... | |
| axom::IndexType | m_cellCount |
| Number of cells in computational mesh (m_dc or m_bpGrp). More... | |
| std::shared_ptr< mint::Mesh > | m_surfaceMesh |
| int | m_samplesPerKnotSpan {DEFAULT_SAMPLES_PER_KNOT_SPAN} |
| double | m_percentError {MINIMUM_PERCENT_ERROR} |
| RefinementType | m_refinementType {DiscreteShape::RefinementUniformSegments} |
| double | m_vertexWeldThreshold {DEFAULT_VERTEX_WELD_THRESHOLD} |
| bool | m_verboseOutput {false} |
| MPI_Comm | m_comm {MPI_COMM_SELF} |
Abstract base class for shaping material volume fractions
Shaper requires Axom to be configured with Conduit or MFEM or both.
Refinement type.
| axom::quest::Shaper::Shaper | ( | RuntimePolicy | execPolicy, |
| int | allocatorId, | ||
| const klee::ShapeSet & | shapeSet, | ||
| sidre::Group * | bpMesh, | ||
| const std::string & | topo = "" |
||
| ) |
Construct Shaper to operate on a blueprint-formatted mesh stored in a sidre Group.
| axom::quest::Shaper::Shaper | ( | RuntimePolicy | execPolicy, |
| int | allocatorId, | ||
| const klee::ShapeSet & | shapeSet, | ||
| conduit::Node & | bpNode, | ||
| const std::string & | topo = "" |
||
| ) |
Construct Shaper to operate on a blueprint-formatted mesh stored in a conduit Node.
Because conduit::Node doesn't support application-specified allocator id for (only) arrays, the incoming bpNode must have all arrays pre-allocated in a space accessible by the runtime policy. Any needed-but-missing space would lead to an exception.
|
virtual |
| bool axom::quest::Shaper::verifyInputMesh | ( | std::string & | whyBad | ) | const |
Verify the input mesh is okay for this class to work with.
| void axom::quest::Shaper::setSamplesPerKnotSpan | ( | int | nSamples | ) |
| void axom::quest::Shaper::setVertexWeldThreshold | ( | double | threshold | ) |
|
inline |
References isVerbose(), and m_verboseOutput.
| void axom::quest::Shaper::setPercentError | ( | double | percent | ) |
| void axom::quest::Shaper::setRefinementType | ( | RefinementType | t | ) |
| void axom::quest::Shaper::setFilePath | ( | const std::string & | filePath | ) |
Set path of shape input file.
The path is used to resolve relative paths that may have been specified in the file.
|
inline |
References m_surfaceMesh.
|
inline |
References m_verboseOutput.
|
virtual |
Predicate to determine if the specified format is valid.
| format | A string listing the format to check |
|
inline |
Returns the format type of the supplied shape.
References axom::klee::Geometry::getFormat(), and axom::klee::Shape::getGeometry().
|
inline |
Returns the execution policy used by the Shaper.
References m_execPolicy.
|
virtual |
Loads the shape from file into m_surfaceMesh.
Reimplemented in axom::quest::SamplingShaper, and axom::quest::IntersectionShaper.
|
pure virtual |
Implemented in axom::quest::SamplingShaper, and axom::quest::IntersectionShaper.
|
pure virtual |
Implemented in axom::quest::SamplingShaper, and axom::quest::IntersectionShaper.
|
pure virtual |
Implemented in axom::quest::SamplingShaper, and axom::quest::IntersectionShaper.
|
pure virtual |
Implemented in axom::quest::SamplingShaper, and axom::quest::IntersectionShaper.
|
pure virtual |
Implemented in axom::quest::SamplingShaper, and axom::quest::IntersectionShaper.
| double axom::quest::Shaper::allReduceSum | ( | double | val | ) | const |
Helper to apply a parallel sum reduction to a quantity.
| double axom::quest::Shaper::allReduceMin | ( | double | val | ) | const |
Helper to apply a parallel min reduction to a quantity.
| double axom::quest::Shaper::allReduceMax | ( | double | val | ) | const |
Helper to apply a parallel max reduction to a quantity.
|
protected |
Loads the shape into m_surfaceMesh.
| shape | The shape. | |
| percentError | A 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] | revolvedvolume | A revolved volume for the shape, if the shape is from a C2C contour. |
|
protected |
Computes transforms for the shape and applies them to the surface mesh.
| shape | The shape. |
|
protected |
Computes transforms for the shape and applies them to the surface mesh.
| shape | The shape. |
| transform | A 4x4 matrix containing the transformation to apply. |
|
protected |
Get a matrix that contains the shape's concatenated transforms.
| shape | The shape whose transforms are being concatenated. |
|
protected |
Helper function to get the rank associated with the current process.
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
Prefix path for shape file names with relative path.
|
protected |
Number of cells in computational mesh (m_dc or m_bpGrp).
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |