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

Public Types | |
| enum class | SamplingMethod : int { InOut , WindingNumber } |
| Struct to help choose sampler method: InOut or WindingNumber. More... | |
| using | RuntimePolicy = axom::runtime_policy::Policy |
| using | RefinementType = DiscreteShape::RefinementType |
| Refinement type. More... | |
Public Member Functions | |
| SamplingShaper (RuntimePolicy execPolicy, int allocatorId, const klee::ShapeSet &shapeSet, sidre::MFEMSidreDataCollection *dc) | |
| ~SamplingShaper () | |
| mfem::QuadratureFunction * | getShapeQFunction (const std::string &name) const |
| Returns a pointer to the quadrature function associated with shape name if it exists, else nullptr. More... | |
| mfem::QuadratureFunction * | getMaterialQFunction (const std::string &name) const |
| Returns a pointer to the quadrature function associated with material name if it exists, else nullptr. More... | |
| void | importInitialVolumeFractions (const std::map< std::string, mfem::GridFunction * > &initialGridFunctions) |
| Import an initial set of material volume fractions before shaping. More... | |
| void | adjustVolumeFractions () override |
| void | printRegisteredFieldNames (const std::string &initialMessage) |
| 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 related to sampling; supplements parameters in base class | |
| void | setSamplingType (shaping::VolFracSampling vfSampling) |
| void | setSamplingMethod (SamplingMethod samplingMethod) |
| void | setQuadratureOrder (int quadratureOrder) |
| void | setVolumeFractionOrder (int volfracOrder) |
| void | setPointProjector22 (shaping::PointProjector< 2, 2 > projector) |
| Registers a function to project from 2D input points to 2D query points. More... | |
| void | setPointProjector32 (shaping::PointProjector< 3, 2 > projector) |
| Registers a function to project from 3D input points to 2D query points. More... | |
| void | setPointProjector23 (shaping::PointProjector< 2, 3 > projector) |
| Registers a function to project from 2D input points to 3D query points. More... | |
| void | setPointProjector33 (shaping::PointProjector< 3, 3 > projector) |
| Registers a function to project from 3D input points to 3D query points. More... | |
Functions related to the stages for a given shape | |
| void | loadShape (const klee::Shape &shape) override |
| Load the shape geometry. For MFEM files, geometry is loaded into m_contours. Other formats make discrete geometry and load it into m_surface in the Shaper base class. More... | |
| void | prepareShapeQuery (klee::Dimensions shapeDimension, const klee::Shape &shape) override |
| Initializes the spatial index for shaping. More... | |
| void | runShapeQuery (const klee::Shape &shape) override |
| void | applyReplacementRules (const klee::Shape &shape) override |
| void | finalizeShapeQuery () override |
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) |
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} |
Concrete class for sample based shaping.
|
inherited |
|
inherited |
Refinement type.
|
strong |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Registers a function to project from 2D input points to 2D query points.
|
inline |
Registers a function to project from 3D input points to 2D query points.
|
inline |
Registers a function to project from 2D input points to 3D query points.
|
inline |
Registers a function to project from 3D input points to 3D query points.
|
inline |
Returns a pointer to the quadrature function associated with shape name if it exists, else nullptr.
|
inline |
Returns a pointer to the quadrature function associated with material name if it exists, else nullptr.
|
inlineoverridevirtual |
Load the shape geometry. For MFEM files, geometry is loaded into m_contours. Other formats make discrete geometry and load it into m_surface in the Shaper base class.
| shape | The shape to load. |
Reimplemented from axom::quest::Shaper.
References axom::klee::Shape::getGeometry(), axom::klee::Shape::getName(), axom::klee::Geometry::getPath(), axom::quest::Shaper::loadShape(), axom::quest::Shaper::m_prefixPath, axom::utilities::filesystem::prefixRelativePath(), SLIC_ERROR_IF, and SLIC_INFO_ROOT.
|
inlineoverridevirtual |
Initializes the spatial index for shaping.
Implements axom::quest::Shaper.
References AXOM_ANNOTATE_SCOPE, AXOM_UNUSED_VAR, axom::slic::message::Debug, axom::Array< T, DIM, SPACE, StoragePolicy >::empty(), axom::quest::Shaper::getExecutionPolicy(), axom::klee::Shape::getGeometry(), axom::klee::Shape::getName(), axom::quest::Shaper::getRank(), axom::klee::Geometry::hasGeometry(), axom::quest::Shaper::isVerbose(), axom::quest::Shaper::m_surfaceMesh, axom::quest::Shaper::m_vertexWeldThreshold, axom::bump::views::shapeDimension(), axom::quest::Shaper::shapeFormat(), axom::Array< T, DIM, SPACE, StoragePolicy >::size(), SLIC_ASSERT, SLIC_ERROR, SLIC_INFO, SLIC_INFO_ROOT, axom::Array< T, DIM, SPACE, StoragePolicy >::view(), axom::slic::message::Warning, and axom::mint::write_vtk().
|
inlineoverridevirtual |
|
inlineoverridevirtual |
Implements axom::quest::Shaper.
References AXOM_ANNOTATE_SCOPE, axom::slic::message::Debug, axom::klee::Shape::getGeometry(), axom::klee::Shape::getMaterial(), axom::klee::Shape::getName(), axom::klee::Geometry::hasGeometry(), axom::quest::Shaper::isVerbose(), axom::klee::Shape::replaces(), SLIC_ASSERT_MSG, SLIC_INFO_ROOT, and axom::slic::message::Warning.
|
inlineoverridevirtual |
Implements axom::quest::Shaper.
References AXOM_ANNOTATE_SCOPE, axom::slic::flushStreams(), axom::quest::Shaper::m_surfaceMesh, and SLIC_WARNING_IF.
|
inline |
Import an initial set of material volume fractions before shaping.
| [in] | initialGridFuncions | The input data as a map from material names to grid functions |
The imported grid functions are interpolated at quadrature points and registered with the supplied names as material-based quadrature fields
References axom::slic::message::Debug, axom::quest::Shaper::isVerbose(), SLIC_INFO_ROOT, SLIC_WARNING, and axom::slic::message::Warning.
|
inlineoverridevirtual |
Implements axom::quest::Shaper.
References AXOM_ANNOTATE_SCOPE, axom::slic::message::Debug, axom::quest::Shaper::isVerbose(), SLIC_INFO_ROOT, and axom::slic::message::Warning.
|
inline |
Prints out the names of the registered fields related to shapes and materials This function is intended to help with debugging
References SLIC_INFO_ROOT.
|
inherited |
Verify the input mesh is okay for this class to work with.
|
inherited |
|
inherited |
|
inlineinherited |
References axom::quest::Shaper::isVerbose(), and axom::quest::Shaper::m_verboseOutput.
|
inherited |
|
inherited |
|
inherited |
Set path of shape input file.
The path is used to resolve relative paths that may have been specified in the file.
|
inlineinherited |
References axom::quest::Shaper::m_surfaceMesh.
|
inlineinherited |
References axom::quest::Shaper::m_verboseOutput.
|
virtualinherited |
Predicate to determine if the specified format is valid.
| format | A string listing the format to check |
|
inlineinherited |
Returns the format type of the supplied shape.
References axom::klee::Geometry::getFormat(), and axom::klee::Shape::getGeometry().
|
inlineinherited |
Returns the execution policy used by the Shaper.
References axom::quest::Shaper::m_execPolicy.
|
inherited |
Helper to apply a parallel sum reduction to a quantity.
|
inherited |
Helper to apply a parallel min reduction to a quantity.
|
inherited |
Helper to apply a parallel max reduction to a quantity.
|
protectedinherited |
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. |
|
protectedinherited |
Computes transforms for the shape and applies them to the surface mesh.
| shape | The shape. |
|
protectedinherited |
Computes transforms for the shape and applies them to the surface mesh.
| shape | The shape. |
| transform | A 4x4 matrix containing the transformation to apply. |
|
protectedinherited |
Get a matrix that contains the shape's concatenated transforms.
| shape | The shape whose transforms are being concatenated. |
|
protectedinherited |
Helper function to get the rank associated with the current process.
|
staticconstexprinherited |
|
staticconstexprinherited |
|
staticconstexprinherited |
|
staticconstexprinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
Prefix path for shape file names with relative path.
|
protectedinherited |
Number of cells in computational mesh (m_dc or m_bpGrp).
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |