AXOM
Axom provides a robust, flexible software infrastructure for the development of multi-physics applications and computational tools.
axom::mir::MIRAlgorithm Class Referenceabstract

Base class for Material Interface Reconstruction (MIR) algorithms. More...

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

Inheritance diagram for axom::mir::MIRAlgorithm:

Public Member Functions

 MIRAlgorithm ()=default
 
virtual ~MIRAlgorithm ()=default
 
virtual void execute (const conduit::Node &n_input, const conduit::Node &n_options, conduit::Node &n_output)
 

Protected Member Functions

void executeSetup (const conduit::Node &n_domain, const conduit::Node &n_options, conduit::Node &n_newDomain)
 Set up the new domain from the old one and invoke executeDomain. More...
 
virtual void executeDomain (const conduit::Node &n_topo, const conduit::Node &n_coordset, const conduit::Node &n_fields, const conduit::Node &n_matset, const conduit::Node &n_options, conduit::Node &n_newTopo, conduit::Node &n_newCoordset, conduit::Node &n_newFields, conduit::Node &n_newMatset)=0
 Perform material interface reconstruction on a single domain. Derived classes must implement this method and any device-specific coding gets handled under it. More...
 
void updateNames (const std::string &origTopoName, const std::string &newTopoName, const std::string &origCoordsetName, const std::string &newCoordsetName, const std::string &origMatsetName, const std::string &newMatsetName, conduit::Node &n_newTopo, conduit::Node &n_newCoordset, conduit::Node &n_newFields, conduit::Node &n_newMatset)
 Update names in some of the objects when we can tell they have been renamed. More...
 
void copyState (const conduit::Node &srcState, conduit::Node &destState) const
 Copy state from the src domain to the destination domain. More...
 
void printNode (const conduit::Node &n) const
 This is a utility method for printing a Conduit node with large limits for lines and element counts. More...
 
void saveMesh (const conduit::Node &n_mesh, const std::string &filebase) const
 Save a Blueprint mesh to disk (YAML and HDF5, if available). More...
 
std::string localPath (const conduit::Node &obj) const
 Return the local path name, stripping off a domain path prefix. Blueprint domains are typically written under top level nodes with names like "domain_{:05}" or "domain_{:07}". This method will strip off any path prefix beginning with "domain". More...
 

Detailed Description

Base class for Material Interface Reconstruction (MIR) algorithms.

Constructor & Destructor Documentation

◆ MIRAlgorithm()

axom::mir::MIRAlgorithm::MIRAlgorithm ( )
default

◆ ~MIRAlgorithm()

virtual axom::mir::MIRAlgorithm::~MIRAlgorithm ( )
virtualdefault

Member Function Documentation

◆ execute()

virtual void axom::mir::MIRAlgorithm::execute ( const conduit::Node &  n_input,
const conduit::Node &  n_options,
conduit::Node &  n_output 
)
virtual
\brief Perform material interface reconstruction on the mesh supplied by \a n_input.

\param[in] n_input The node that contains a mesh domain with the topology and matset
                   to be used for MIR.
\param[in] n_options A node that contains options that help govern MIR execution.
options:
topology: main
matset: matset
topologyName: mirtopo
coordsetName: mircoords
matsetName: cleanmat
fields:
- temperature
- pressure
selectedZones: [0,1,6,9]
mapping: 0

The "topology" option specifies which topology we'll reconstruct. It must have an associated matset. "new_topology" is the name of the topology that will be created in the output node. "new_coordset" is the name of the new coordset that will be created in the output node. If it is not provided then the name of the topology's coordset will be used.
"new_matset" is the name of the new matset that will be created in the output node. If it is not provided then the name of the topology's matset will be used.
"fields" is the name of the fields to map to the new topology. If fields is specified but empty, no fields will be mapped. If fields is not present then all fields will be mapped. "zones" is a list of zone indices from the topology that need to be reconstructed. If not present then all zones will be considered. "mapping" indicates whether we should include an originalElements field on the new topology to indicate where each new zone came from in the original topology.

Parameters
[out]n_outputA node that will contain the new entities.

◆ executeSetup()

void axom::mir::MIRAlgorithm::executeSetup ( const conduit::Node &  n_domain,
const conduit::Node &  n_options,
conduit::Node &  n_newDomain 
)
protected

Set up the new domain from the old one and invoke executeDomain.

Parameters
n_domainThe input domain.
n_optionsThe MIR options.
n_newDomainThe output domain.

◆ executeDomain()

virtual void axom::mir::MIRAlgorithm::executeDomain ( const conduit::Node &  n_topo,
const conduit::Node &  n_coordset,
const conduit::Node &  n_fields,
const conduit::Node &  n_matset,
const conduit::Node &  n_options,
conduit::Node &  n_newTopo,
conduit::Node &  n_newCoordset,
conduit::Node &  n_newFields,
conduit::Node &  n_newMatset 
)
protectedpure virtual

Perform material interface reconstruction on a single domain. Derived classes must implement this method and any device-specific coding gets handled under it.

Parameters
[in]n_topoThe Conduit node containing the topology that will be used for MIR.
[in]n_coordsetThe Conduit node containing the coordset.
[in]n_fieldsThe Conduit node containing the fields.
[in]n_matsetThe Conduit node containing the matset.
[in]n_optionsThe Conduit node containing the options that help govern MIR execution.
[out]n_newTopoA node that will contain the new clipped topology.
[out]n_newCoordsetA node that will contain the new coordset for the clipped topology.
[out]n_newFieldsA node that will contain the new fields for the clipped topology.
[out]n_newMatsetA Conduit node that will contain the new matset.

Implemented in axom::mir::EquiZAlgorithm< ExecSpace, TopologyView, CoordsetView, MatsetView >, and axom::mir::ElviraAlgorithm< ExecSpace, IndexPolicy, CoordsetView, MatsetView, MAX_VERTS_2D >.

◆ updateNames()

void axom::mir::MIRAlgorithm::updateNames ( const std::string &  origTopoName,
const std::string &  newTopoName,
const std::string &  origCoordsetName,
const std::string &  newCoordsetName,
const std::string &  origMatsetName,
const std::string &  newMatsetName,
conduit::Node &  n_newTopo,
conduit::Node &  n_newCoordset,
conduit::Node &  n_newFields,
conduit::Node &  n_newMatset 
)
protected

Update names in some of the objects when we can tell they have been renamed.

Parameters
origTopoNameThe topology name of the input mesh.
newTopoNameThe topology name of the output mesh.
origCoordsetNameThe coordset name of the input mesh.
newCoordsetNameThe coordset name of the output mesh.
origMatsetNameThe matset name of the input mesh.
newMatsetNameThe matset name of the output mesh.
n_newTopoThe node that contains the output topology.
n_newCoordsetThe node that contains the output coordset.
n_newFieldsThe node that contains the output fields.
n_newMatsetThe node that contains the output matset.
Note
This method is used internally mainly when MIR copies the input mesh to the output when MIR is no-op.

◆ copyState()

void axom::mir::MIRAlgorithm::copyState ( const conduit::Node &  srcState,
conduit::Node &  destState 
) const
protected

Copy state from the src domain to the destination domain.

Parameters
srcStateThe node that contains the state in the source domain.
destStateThe node that contains the state in the destination domain.

◆ printNode()

void axom::mir::MIRAlgorithm::printNode ( const conduit::Node &  n) const
protected

This is a utility method for printing a Conduit node with large limits for lines and element counts.

Parameters
nThe Conduit node to print.

◆ saveMesh()

void axom::mir::MIRAlgorithm::saveMesh ( const conduit::Node &  n_mesh,
const std::string &  filebase 
) const
protected

Save a Blueprint mesh to disk (YAML and HDF5, if available).

Parameters
n_meshThe mesh to save.
filebaseThe base filename to use when writing files. Extensions may be added.

◆ localPath()

std::string axom::mir::MIRAlgorithm::localPath ( const conduit::Node &  obj) const
protected

Return the local path name, stripping off a domain path prefix. Blueprint domains are typically written under top level nodes with names like "domain_{:05}" or "domain_{:07}". This method will strip off any path prefix beginning with "domain".

Parameters
[in]objThe object whose local path we want.
Returns
The path without the domain prefix.

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