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

Entry point for computing clipping a computational mesh by overlaying a geometry and computing the intersection volume the geometry makes with each mesh cell. More...

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

Classes

struct  Impl
 Single interface for methods implemented with execution space templates. More...
 

Public Types

using LabelType = MeshClipperStrategy::LabelType
 Whether an element is in, out or on shape boundary. More...
 

Public Member Functions

 MeshClipper (quest::experimental::ShapeMesh &shapeMesh, const std::shared_ptr< MeshClipperStrategy > &strategy)
 Construct a shape clipper. More...
 
ShapeMeshgetShapeMesh ()
 The mesh. More...
 
int getAllocatorID () const
 Allocator id to be used for all array data. More...
 
void setVerbose (bool verbose)
 
void clip (axom::Array< double > &ovlap)
 Clip. More...
 
void clip (axom::ArrayView< double > ovlap)
 Clip. More...
 
int dimension () const
 Dimension of the shape (2 or 3) More...
 
void logClippingStats (bool local=false, bool sum=true, bool max=false) const
 Log clipping statistics. Intended for developer use. More...
 
const conduit::Node & getClippingStats () const
 Get local assorted clipping statistics, intended for developer use. More...
 
conduit::Node getGlobalClippingStats () const
 Get global assorted clipping statistics, intended for developer use. More...
 
void setScreenLevel (int screenLevel)
 Set the level of screening, intended for developer use. More...
 
int getScreenLevel () const
 Get the level of screening, intended for developer use. More...
 

Static Public Member Functions

static void accumulateClippingStats (conduit::Node &curStats, const conduit::Node &newStats)
 Add new stats to current stats, intended for developer use. More...
 

Static Public Attributes

static constexpr axom::IndexType NUM_TETS_PER_HEX = ShapeMesh::NUM_TETS_PER_HEX
 

Detailed Description

Entry point for computing clipping a computational mesh by overlaying a geometry and computing the intersection volume the geometry makes with each mesh cell.

To construct:

  • Wrap the computational mesh in a ShapeMesh object.
  • Allocate a MeshClipperStrategy implementation to provide geometry-specific operations. Axom natively provides implementations for some common geometries.

To compute the intersection volumes, use one of the clip() methods.

Member Typedef Documentation

◆ LabelType

Whether an element is in, out or on shape boundary.

Constructor & Destructor Documentation

◆ MeshClipper()

axom::quest::experimental::MeshClipper::MeshClipper ( quest::experimental::ShapeMesh shapeMesh,
const std::shared_ptr< MeshClipperStrategy > &  strategy 
)

Construct a shape clipper.

Parameters
[in/out]bpMesh Single-domain Blueprint mesh to shape into.
[in]strategyStrategy where external shape-dependent operations are implemented.

bpMesh must be an unstructured hex mesh. That is the only type currently supported.

Member Function Documentation

◆ getShapeMesh()

ShapeMesh& axom::quest::experimental::MeshClipper::getShapeMesh ( )
inline

The mesh.

◆ getAllocatorID()

int axom::quest::experimental::MeshClipper::getAllocatorID ( ) const
inline

Allocator id to be used for all array data.

References axom::quest::experimental::ShapeMesh::getAllocatorID().

◆ setVerbose()

void axom::quest::experimental::MeshClipper::setVerbose ( bool  verbose)
inline

◆ clip() [1/2]

void axom::quest::experimental::MeshClipper::clip ( axom::Array< double > &  ovlap)

Clip.

Parameters
ovlap[out] Shape overlap volume of each cell in the shapee mesh.

◆ clip() [2/2]

void axom::quest::experimental::MeshClipper::clip ( axom::ArrayView< double >  ovlap)

Clip.

Parameters
ovlap[out] Shape overlap volume of each cell in the shapee mesh.

◆ dimension()

int axom::quest::experimental::MeshClipper::dimension ( ) const
inline

Dimension of the shape (2 or 3)

References axom::quest::experimental::ShapeMesh::dimension().

◆ logClippingStats()

void axom::quest::experimental::MeshClipper::logClippingStats ( bool  local = false,
bool  sum = true,
bool  max = false 
) const

Log clipping statistics. Intended for developer use.

Parameters
local[in] Log the MPI local statistics.
sum[in] Log the statistics summed over MPI ranks.
max[in] Log the max statistics over MPI ranks.

This is a collective method if MPI-parallel.

◆ getClippingStats()

const conduit::Node& axom::quest::experimental::MeshClipper::getClippingStats ( ) const
inline

Get local assorted clipping statistics, intended for developer use.

◆ getGlobalClippingStats()

conduit::Node axom::quest::experimental::MeshClipper::getGlobalClippingStats ( ) const

Get global assorted clipping statistics, intended for developer use.

This is a collective method if MPI-parallel.

◆ setScreenLevel()

void axom::quest::experimental::MeshClipper::setScreenLevel ( int  screenLevel)
inline

Set the level of screening, intended for developer use.

Parameters
screenLevel[in] the value to control how much screening is done to avoid using the slower clipping functions.

Screenlevel values:

  • 0 allows no screening
  • 1 allows screening cells.
    See also
    MeshClipperStrategy::labelCellsInOut.
  • 2 also allows screening tets.
    See also
    MeshClipperStrategy::labelTetsInOut.
  • 3 also allows a check on the tet from mesh and a piece of the discretized geometry to (conservatively) determine whether the piece is completely inside or completely outside of the tst.

◆ getScreenLevel()

int axom::quest::experimental::MeshClipper::getScreenLevel ( ) const
inline

Get the level of screening, intended for developer use.

◆ accumulateClippingStats()

static void axom::quest::experimental::MeshClipper::accumulateClippingStats ( conduit::Node &  curStats,
const conduit::Node &  newStats 
)
static

Add new stats to current stats, intended for developer use.

Member Data Documentation

◆ NUM_TETS_PER_HEX

constexpr axom::IndexType axom::quest::experimental::MeshClipper::NUM_TETS_PER_HEX = ShapeMesh::NUM_TETS_PER_HEX
staticconstexpr

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