AXOM
Axom provides a robust, flexible software infrastructure for the development of multi-physics applications and computational tools.
axom::quest::shaping::InOutSampler< NDIMS > Class Template Reference

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

Inheritance diagram for axom::quest::shaping::InOutSampler< NDIMS >:

Public Types

using InOutOctreeType = quest::InOutOctree< DIM >
 
using GeometricBoundingBox = typename InOutOctreeType::GeometricBoundingBox
 
using SpacePt = typename InOutOctreeType::SpacePt
 
using SpaceVector = typename InOutOctreeType::SpaceVector
 
using GridPt = typename InOutOctreeType::GridPt
 
using BlockIndex = typename InOutOctreeType::BlockIndex
 

Public Member Functions

 InOutSampler (const std::string &shapeName, mint::Mesh *surfaceMesh)
 Constructor for a SamplingShaper. More...
 
 ~InOutSampler ()
 
mint::MeshgetSurfaceMesh () const
 
void computeBounds ()
 Computes the bounding box of the surface mesh. More...
 
void initSpatialIndex (double vertexWeldThreshold)
 
template<int FromDim, int ToDim = DIM>
std::enable_if_t< ToDim==DIM, void > sampleInOutField (mfem::DataCollection *dc, shaping::QFunctionCollection &inoutQFuncs, int sampleRes, PointProjector< FromDim, ToDim > projector={})
 Samples the inout field over the indexed geometry, possibly using a callback function to project the input points (from the computational mesh) to query points on the spatial index. More...
 
template<int FromDim, int ToDim>
std::enable_if_t< ToDim !=DIM, void > sampleInOutField (mfem::DataCollection *, shaping::QFunctionCollection &, int, PointProjector< FromDim, ToDim >)
 
void computeVolumeFractionsBaseline (mfem::DataCollection *dc, int AXOM_UNUSED_PARAM(sampleRes), int outputOrder)
 

Static Public Attributes

static constexpr int DIM = NDIMS
 

Member Typedef Documentation

◆ InOutOctreeType

◆ GeometricBoundingBox

◆ SpacePt

template<int NDIMS>
using axom::quest::shaping::InOutSampler< NDIMS >::SpacePt = typename InOutOctreeType::SpacePt

◆ SpaceVector

template<int NDIMS>
using axom::quest::shaping::InOutSampler< NDIMS >::SpaceVector = typename InOutOctreeType::SpaceVector

◆ GridPt

template<int NDIMS>
using axom::quest::shaping::InOutSampler< NDIMS >::GridPt = typename InOutOctreeType::GridPt

◆ BlockIndex

template<int NDIMS>
using axom::quest::shaping::InOutSampler< NDIMS >::BlockIndex = typename InOutOctreeType::BlockIndex

Constructor & Destructor Documentation

◆ InOutSampler()

template<int NDIMS>
axom::quest::shaping::InOutSampler< NDIMS >::InOutSampler ( const std::string &  shapeName,
mint::Mesh surfaceMesh 
)
inline

Constructor for a SamplingShaper.

Parameters
shapeNameThe name of the shape; will be used for the field for the associated samples
surfaceMeshPointer to the surface mesh
Note
Does not take ownership of the surface mesh

◆ ~InOutSampler()

template<int NDIMS>
axom::quest::shaping::InOutSampler< NDIMS >::~InOutSampler ( )
inline

Member Function Documentation

◆ getSurfaceMesh()

template<int NDIMS>
mint::Mesh* axom::quest::shaping::InOutSampler< NDIMS >::getSurfaceMesh ( ) const
inline

◆ computeBounds()

template<int NDIMS>
void axom::quest::shaping::InOutSampler< NDIMS >::computeBounds ( )
inline

Computes the bounding box of the surface mesh.

References axom::mint::Mesh::getNode(), axom::mint::Mesh::getNumberOfNodes(), SLIC_ASSERT, and SLIC_INFO.

◆ initSpatialIndex()

template<int NDIMS>
void axom::quest::shaping::InOutSampler< NDIMS >::initSpatialIndex ( double  vertexWeldThreshold)
inline

◆ sampleInOutField() [1/2]

template<int NDIMS>
template<int FromDim, int ToDim = DIM>
std::enable_if_t<ToDim == DIM, void> axom::quest::shaping::InOutSampler< NDIMS >::sampleInOutField ( mfem::DataCollection *  dc,
shaping::QFunctionCollection inoutQFuncs,
int  sampleRes,
PointProjector< FromDim, ToDim >  projector = {} 
)
inline

Samples the inout field over the indexed geometry, possibly using a callback function to project the input points (from the computational mesh) to query points on the spatial index.

Template Parameters
FromDimThe dimension of points from the input mesh
ToDimThe dimension of points on the indexed shape
Parameters
[in]dcThe data collection containing the mesh and associated query points
[in,out]inoutQFuncsA collection of quadrature functions for the shape and material inout samples
[in]sampleResThe quadrature order at which to sample the inout field
[in]projectorA callback function to apply to points from the input mesh before querying them on the spatial index
Note
A projector callback must be supplied when FromDim is not equal to ToDim, the projector
ToDim must be equal to DIM, the dimension of the spatial index

◆ sampleInOutField() [2/2]

template<int NDIMS>
template<int FromDim, int ToDim>
std::enable_if_t<ToDim != DIM, void> axom::quest::shaping::InOutSampler< NDIMS >::sampleInOutField ( mfem::DataCollection *  ,
shaping::QFunctionCollection ,
int  ,
PointProjector< FromDim, ToDim >   
)
inline
Warning
Do not call this overload with ToDim != DIM. The compiler needs it to be defined to support various callback specializations for the PointProjector.

References axom::quest::shaping::InOutSampler< NDIMS >::DIM.

◆ computeVolumeFractionsBaseline()

template<int NDIMS>
void axom::quest::shaping::InOutSampler< NDIMS >::computeVolumeFractionsBaseline ( mfem::DataCollection *  dc,
int   AXOM_UNUSED_PARAMsampleRes,
int  outputOrder 
)
inline

Compute volume fractions function for shape on a grid of resolution gridRes in region defined by bounding box queryBounds

References SLIC_WARNING, and axom::quest::InOutOctree< DIM >::within().

Member Data Documentation

◆ DIM

template<int NDIMS>
constexpr int axom::quest::shaping::InOutSampler< NDIMS >::DIM = NDIMS
staticconstexpr

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