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/develop/src/axom/quest/SamplingShaper.hpp>
Public Types | |
using | RefinementType = enum { RefinementUniformSegments, RefinementDynamic } |
Refinement type. More... | |
Public Member Functions | |
SamplingShaper (const klee::ShapeSet &shapeSet, sidre::MFEMSidreDataCollection *dc) | |
~SamplingShaper () | |
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::Mesh * | getSurfaceMesh () 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... | |
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 related to the stages for a given shape | |
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 |
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) |
Functions to get and set shaping parameters related to sampling; supplements parameters in base class | |
void | setSamplingType (shaping::VolFracSampling vfSampling) |
void | setQuadratureOrder (int quadratureOrder) |
void | setVolumeFractionOrder (int volfracOrder) |
void | setPointProjector (shaping::PointProjector< 2, 2 > projector) |
Registers a function to project from 2D input points to 2D query points. More... | |
void | setPointProjector (shaping::PointProjector< 3, 2 > projector) |
Registers a function to project from 3D input points to 2D query points. More... | |
void | setPointProjector (shaping::PointProjector< 2, 3 > projector) |
Registers a function to project from 2D input points to 3D query points. More... | |
void | setPointProjector (shaping::PointProjector< 3, 3 > projector) |
Registers a function to project from 3D input points to 3D query points. More... | |
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::ShapeSet & | m_shapeSet |
sidre::MFEMSidreDataCollection * | m_dc |
mint::Mesh * | m_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... | |
Concrete class for sample based shaping.
|
inherited |
Refinement type.
|
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.
|
inlineoverridevirtual |
Initializes the spatial index for shaping.
Implements axom::quest::Shaper.
References AXOM_ANNOTATE_SCOPE, axom::quest::shaping::InOutSampler< NDIMS >::computeBounds(), axom::slic::message::Debug, axom::klee::Shape::getGeometry(), axom::klee::Shape::getName(), axom::mint::Mesh::getNumberOfCells(), axom::mint::Mesh::getNumberOfNodes(), axom::quest::Shaper::getRank(), axom::quest::shaping::InOutSampler< NDIMS >::getSurfaceMesh(), axom::klee::Geometry::hasGeometry(), axom::quest::shaping::InOutSampler< NDIMS >::initSpatialIndex(), axom::quest::Shaper::isVerbose(), axom::quest::Shaper::m_surfaceMesh, axom::quest::Shaper::m_vertexWeldThreshold, SLIC_ASSERT, SLIC_ERROR, SLIC_INFO, axom::klee::Three, axom::klee::Two, axom::slic::message::Warning, and axom::mint::write_vtk().
|
inlineoverridevirtual |
Implements axom::quest::Shaper.
References AXOM_ANNOTATE_SCOPE, axom::slic::message::Debug, axom::klee::Shape::getGeometry(), axom::klee::Shape::getName(), axom::klee::Geometry::hasGeometry(), axom::quest::Shaper::isVerbose(), SLIC_INFO, axom::klee::Three, axom::klee::Two, and axom::slic::message::Warning.
|
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, and axom::slic::message::Warning.
|
inlineoverridevirtual |
Implements axom::quest::Shaper.
References AXOM_ANNOTATE_SCOPE, and axom::quest::Shaper::m_surfaceMesh.
|
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(), axom::quest::Shaper::m_dc, SLIC_INFO, SLIC_WARNING, and axom::slic::message::Warning.
|
inlineoverridevirtual |
|
inline |
Prints out the names of the registered fields related to shapes and materials This function is intended to help with debugging
References axom::quest::Shaper::m_dc, axom::quest::shaping::SAMPLE_AT_DOFS, axom::quest::shaping::SAMPLE_AT_QPTS, and SLIC_INFO.
|
inherited |
|
inherited |
|
inlineinherited |
References axom::quest::Shaper::isVerbose(), and axom::quest::Shaper::m_verboseOutput.
|
inherited |
|
inherited |
|
inlineinherited |
References axom::quest::Shaper::m_verboseOutput.
|
inlineinherited |
References axom::quest::Shaper::m_dc.
|
inlineinherited |
References axom::quest::Shaper::m_surfaceMesh.
|
virtualinherited |
Predicate to determine if the specified format is valid.
format | A string listing the format to check |
|
virtualinherited |
Loads the shape from file into m_surfaceMesh.
Reimplemented in axom::quest::IntersectionShaper.
|
inherited |
Helper to apply a parallel sum reduction to a quantity.
|
protectedinherited |
Loads the shape from file into m_surfaceMesh and computes a revolvedVolume for the shape.
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 possible. |
|
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 |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |