Cardinal
Loading...
Searching...
No Matches
Classes | Public Member Functions | Static Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | List of all members
MoabSkinner Class Reference

Skins the [Mesh] according to individual bins for temperature, density, and subdomain ID. More...

#include <MoabSkinner.h>

Inheritance diagram for MoabSkinner:
[legend]

Classes

struct  VolData
 Encode MOAB information about volumes needed when creating surfaces. More...
 

Public Member Functions

 MoabSkinner (const InputParameters &parameters)
 
virtual void execute () override
 
virtual void initialize () override
 
virtual void finalize () override
 
virtual void threadJoin (const UserObject &) override
 
virtual moab::ErrorCode check (const moab::ErrorCode input) const
 
std::string materialName (const unsigned int &block, const unsigned int &density, const unsigned int &temp) const
 
virtual void update ()
 Perform the skinning operation.
 
virtual void setMaterialNames (std::vector< std::string > names)
 
unsigned int nBins () const
 
virtual unsigned int getTemperatureBin (const Elem *const elem) const
 
virtual unsigned int getDensityBin (const Elem *const elem) const
 
virtual unsigned int getSubdomainBin (const Elem *const elem) const
 
void setUseDisplacedMesh (const bool &use)
 
virtual void setScaling (const Real &scale)
 
virtual void setVerbosity (const bool &verbose)
 
virtual void makeDependentOnExternalAction ()
 
unsigned int getAuxiliaryVariableNumber (const std::string &name, const std::string &param_name) const
 
void reset ()
 Clear mesh data.
 
virtual unsigned int getBin (const unsigned int &temp_bin, const unsigned int &density_bin, const unsigned int &subdomain_bin) const
 
virtual const bool & hasGraveyard () const
 
void setGraveyard (bool build)
 
virtual unsigned int nDensityBins () const
 
virtual bool hasDensitySkinning () const
 
const std::shared_ptr< moab::Interface > & moabPtr () const
 

Static Public Member Functions

static InputParameters validParams ()
 

Protected Types

enum class  BoundaryConditionType { Transmission , Vacuum , Reflective }
 Boundary condition types that can be assigned to DAGMC surfaces. More...
 
enum  Sense { BACKWARDS = -1 , FORWARDS = 1 }
 Encode the whether the surface normal faces into or out of the volume. More...
 

Protected Member Functions

MooseMesh & getMooseMesh ()
 Get the MooseMesh (displaced or not, depending on _use_displaced)
 
MeshBase & getDAGMCGeometryMesh ()
 
void buildTetMesh ()
 If the mesh has non-tetrahedral elements, clone it into _tet_mesh and convert to all-TET4.
 
void createMOABElems ()
 
virtual void createTags ()
 Helper method to create MOAB tags.
 
void createGroup (const unsigned int &id, const std::string &name, moab::EntityHandle &group_set)
 
void createVol (const unsigned int &id, moab::EntityHandle &volume_set, moab::EntityHandle group_set)
 Helper method to create MOAB volume entity set.
 
void createSurf (const unsigned int &id, moab::EntityHandle &surface_set, moab::Range &faces, const std::vector< VolData > &voldata, BoundaryConditionType bc_type=BoundaryConditionType::Transmission)
 Helper method to create MOAB surface entity set.
 
void createSurfaces (moab::Range &faces, VolData &voldata, unsigned int &surf_id, BoundaryConditionType bc_type=BoundaryConditionType::Transmission)
 
void createSurfaceFromBox (const BoundingBox &box, const VolData &voldata, unsigned int &surf_id, bool normalout, const Real &factor)
 
std::vector< moab::EntityHandle > createNodesFromBox (const BoundingBox &box, const Real &factor) const
 
void createCornerTris (const std::vector< moab::EntityHandle > &verts, unsigned int corner, unsigned int v1, unsigned int v2, unsigned int v3, bool normalout, moab::Range &surface_tris)
 Create 3 tri faces stemming from one corner of a cude (an open tetrahedron)
 
moab::EntityHandle createTri (const std::vector< moab::EntityHandle > &vertices, unsigned int v1, unsigned int v2, unsigned int v3)
 Create MOAB tri surface element.
 
void updateSurfData (moab::EntityHandle surface_set, const VolData &data)
 Add parent-child metadata relating a surface to its volume.
 
void setTags (moab::EntityHandle ent, std::string name, std::string category, unsigned int id, int dim)
 Generic method to set the tags that DAGMC requires.
 
void setTagData (moab::Tag tag, moab::EntityHandle ent, std::string data, unsigned int SIZE)
 Helper function to wrap moab::tag_set_data for a string.
 
void setTagData (moab::Tag tag, moab::EntityHandle ent, void *data)
 Helper function to wrap moab::tag_set_data for a generic pointer.
 
const std::vector< std::vector< unsigned int > > & getTetSets (ElemType type) const
 
void buildGraveyard (unsigned int &vol_id, unsigned int &surf_id)
 Build a graveyard volume around the domain.
 
virtual void findBlocks ()
 Store a mapping from [Mesh] subdomain IDs to an index, to be used for binning by block ID.
 
virtual void sortElemsByResults ()
 Sort all the elements in the [Mesh] into bins for temperature, density, and subdomain.
 
void findSurfaces ()
 Group the binned elems into local temperature regions and find their surfaces.
 
std::set< BoundaryID > boundaryNamesToIDs (const std::vector< BoundaryName > &names, const std::string &param_name)
 
void checkBoundaryConditionOverlap () const
 Error if the same sideset ID appears in both vacuum and reflective BC sets.
 
BoundaryConditionType boundaryConditionType (const Elem *const elem, const unsigned int side, const libMesh::BoundaryInfo &boundary_info) const
 
void splitSkinByBoundaryCondition (const moab::Range &region, const moab::Range &skin, moab::Range &transmission_tris, moab::Range &vacuum_tris, moab::Range &reflective_tris)
 
void createSurfacesFromSkin (const moab::Range &region, moab::Range &skin, VolData &voldata, unsigned int &surf_id)
 
void recordBoundaryConditionSurface (moab::EntityHandle surface_set, BoundaryConditionType bc_type)
 
BoundaryConditionType recordedBoundaryCondition (moab::EntityHandle surface_set) const
 
unsigned int firstBoundaryConditionGroupID () const
 
void createBoundaryConditionGroups ()
 
std::string boundaryConditionGroupName (BoundaryConditionType bc_type) const
 
void groupLocalElems (std::set< dof_id_type > elems, std::vector< moab::Range > &localElems)
 
bool resetMOAB ()
 Clear MOAB entity sets.
 
void findSurface (const moab::Range &region, moab::EntityHandle group, unsigned int &vol_id, unsigned int &surf_id, moab::EntityHandle &volume_set)
 Find the surfaces for the provided range and add to group.
 
virtual void write ()
 Write MOAB volume and/or skin meshes to file.
 

Protected Attributes

std::unique_ptr< NumericVector< Number > > _serialized_solution
 
std::shared_ptr< moab::Interface > _moab
 MOAB interface.
 
bool _verbose
 Whether to print diagnostic information.
 
const std::string & _temperature_name
 Name of the temperature variable.
 
const Real & _temperature_min
 Lower bound of temperature bins.
 
const Real & _temperature_max
 Upper bound of temperature bins.
 
const unsigned int & _n_temperature_bins
 Number of temperature bins.
 
const Real _temperature_bin_width
 Temperature bin width.
 
const bool _bin_by_density
 Whether elements are binned by density (in addition to temperature and block)
 
std::vector< std::string > _material_names
 
const Real & _faceting_tol
 Faceting tolerence needed by DAGMC.
 
const Real & _geom_tol
 Geometry tolerence needed by DAGMC.
 
const Real & _graveyard_scale_inner
 Multiplier on bounding box for inner surface of graveyard.
 
const Real & _graveyard_scale_outer
 Multiplier on bounding box for outer surface of graveyard.
 
const bool & _output_skins
 Whether to output the MOAB mesh skins to a .h5m file.
 
const bool & _output_full
 Whether to output the MOAB mesh to a .h5m file.
 
bool _build_graveyard
 
bool _set_implicit_complement_material = false
 Whether to assign a material to the implicit complement region.
 
std::string _implicit_complement_group_name
 OpenMC material name or ID which will be assigned to the implicit complement.
 
bool _use_displaced
 Whether the skinned mesh should be generated from a displaced mesh.
 
Real _scaling
 Length multiplier to get from [Mesh] units into OpenMC's centimeters.
 
unsigned int _n_write
 Count number of times output files have been written.
 
bool _standalone
 Whether this class runs by itself, or is controlled by an external class.
 
bool _tet_mesh_built
 True when buildTetMesh() is called.
 
std::unique_ptr< MeshBase > _tet_mesh
 TET4 clone of the MOOSE mesh. Present only when the source mesh contains non-tetrahedral elements. Rebuilt each update() cycle.
 
std::unique_ptr< moab::Skinner > skinner
 Moab skinner for finding temperature surfaces.
 
std::unique_ptr< moab::GeomTopoTool > gtt
 Topology tool for setting surface sense.
 
std::map< dof_id_type, std::vector< moab::EntityHandle > > _id_to_elem_handles
 Map from libmesh id to MOAB element entity handles.
 
std::unordered_map< dof_id_type, moab::EntityHandle > _node_id_to_handle
 Map from libMesh id to MOAB vertex handles.
 
moab::EntityHandle offset
 Save the first tet entity handle.
 
std::string _density_name
 Name of the MOOSE variable containing the density.
 
std::set< BoundaryID > _vacuum_bcs_surface_ids
 Resolved vacuum BC sideset IDs (from 'vacuum_bcs_surfaces' input parameter)
 
std::set< BoundaryID > _reflective_bcs_surface_ids
 Resolved reflective BC sideset IDs (from 'reflective_bcs_surfaces' input parameter)
 
std::map< moab::EntityHandle, BoundaryConditionType_surface_bc_types
 
std::unordered_map< moab::EntityHandle, dof_id_type > _elem_handle_to_id
 Reverse map from MOAB tet entity handle to libMesh element ID. Populated in createMOABElems()
 
bool _set_bcs
 Whether to assign boundary conditions to surfaces.
 
Real _density_min
 Lower bound of density bins.
 
Real _density_max
 Upper bound of density bins.
 
Real _density_bin_width
 Density bin width.
 
unsigned int _n_density_bins
 Number of density bins.
 
unsigned int _n_block_bins
 Number of block bins.
 
std::vector< std::set< dof_id_type > > _elem_bins
 Mapping from total bin ID to a set of elements sorted into that bin.
 
std::map< SubdomainID, unsigned int > _blocks
 Blocks in the [Mesh].
 
moab::EntityHandle _all_tets
 Entity handle to represent the set of all tets.
 
std::map< moab::EntityHandle, std::vector< VolData > > surfsToVols
 Save some topological data: map from surface handle to vol handle and sense.
 
moab::Tag geometry_dimension_tag
 Tag for dimension for geometry.
 
moab::Tag id_tag
 Tag for entitiy set ID.
 
moab::Tag faceting_tol_tag
 Tag for faceting tolerance.
 
moab::Tag geometry_resabs_tag
 Tag needed by DAGMC.
 
moab::Tag category_tag
 Tag for type of entity set.
 
moab::Tag name_tag
 Tag for name of entity set.
 
std::vector< Real > _temperature_bin_bounds
 Bounds of the temperature bins.
 
std::vector< Real > _density_bin_bounds
 Bounds of the density bins.
 
std::vector< std::vector< unsigned int > > _tet4_nodes
 Node ordering for a TET4 MOAB element, based on libMesh node numberings.
 
std::vector< std::vector< unsigned int > > _tet10_nodes
 
unsigned int _temperature_var_num
 Auxiliary variable number for temperature.
 
unsigned int _density_var_num
 Auxiliary variable number for density.
 
const unsigned int NODES_PER_MOAB_TET = 4
 Number of nodes per MOAB tet (which are first order, so TET4)
 
const Real BIN_TOLERANCE = 1e-6
 Tolerance to use for comparing values to bin bounds.
 
std::map< SubdomainID, std::string > _block_id_to_material_name
 Map from mesh SubdomainID to OpenMC material name.
 

Detailed Description

Skins the [Mesh] according to individual bins for temperature, density, and subdomain ID.

Skins a [Mesh] according to temperature, density, and subdomain. The MOAB surfaces bounding those grouped elements are then generated, providing geometry information needed for DAGMC to then track particles on this new geometry.

Member Enumeration Documentation

◆ BoundaryConditionType

enum class MoabSkinner::BoundaryConditionType
strongprotected

Boundary condition types that can be assigned to DAGMC surfaces.

Enumerator
Transmission 
Vacuum 
Reflective 

◆ Sense

enum MoabSkinner::Sense
protected

Encode the whether the surface normal faces into or out of the volume.

Enumerator
BACKWARDS 
FORWARDS 

Constructor & Destructor Documentation

◆ MoabSkinner()

MoabSkinner::MoabSkinner ( const InputParameters &  parameters)

Member Function Documentation

◆ boundaryConditionGroupName()

std::string MoabSkinner::boundaryConditionGroupName ( BoundaryConditionType  bc_type) const
protected

Get the DAGMC group name used to assign a boundary condition type

Parameters
[in]bc_typeboundary condition type
Returns
DAGMC group name

◆ boundaryConditionType()

BoundaryConditionType MoabSkinner::boundaryConditionType ( const Elem *const  elem,
const unsigned int  side,
const libMesh::BoundaryInfo &  boundary_info 
) const
protected

Determine which BC type, if any, applies to a side of an element based on the sidesets that side belongs to.

Parameters
[in]elemelement (in the DAGMC geometry mesh)
[in]sideside index on the element
[in]boundary_infoboundary info of the DAGMC geometry mesh
Returns
boundary condition type to assign to the side

◆ boundaryNamesToIDs()

std::set< BoundaryID > MoabSkinner::boundaryNamesToIDs ( const std::vector< BoundaryName > &  names,
const std::string &  param_name 
)
protected

Convert sideset names or numeric IDs to mesh BoundaryIDs and validate that each is a sideset. Both string names and integer IDs are accepted.

Parameters
[in]namessideset names or IDs
[in]param_nameinput parameter name, for error messages
Returns
resolved boundary IDs

◆ buildGraveyard()

void MoabSkinner::buildGraveyard ( unsigned int &  vol_id,
unsigned int &  surf_id 
)
protected

Build a graveyard volume around the domain.

The graveyard is a containing volume which bounds the volume of interest. This is only needed if the skinned geometry is going to be input into a Monte Carlo solver. For performance reasons, a cubic shell is optimal. So, here we build two cubic surfaces, both larger than the bounding box of the "actual" geometry. We name this region "mat:Graveyard", so that when OpenMC parses the geometry it knows to assign "void" to this region, and set vacuum BCs on the outer surfaces of the cubic shell. The remaining space between the "actual" geometry and the inner graveyard surface is treated as the implicit complement of the rest of the geometry (e.g. a transmissive region).

◆ buildTetMesh()

void MoabSkinner::buildTetMesh ( )
protected

If the mesh has non-tetrahedral elements, clone it into _tet_mesh and convert to all-TET4.

◆ check()

virtual moab::ErrorCode MoabSkinner::check ( const moab::ErrorCode  input) const
virtual

Wrap the error handling in MOAB to print errors to user

Parameters
[in]inputMOAB error code
Returns
error mode

◆ checkBoundaryConditionOverlap()

void MoabSkinner::checkBoundaryConditionOverlap ( ) const
protected

Error if the same sideset ID appears in both vacuum and reflective BC sets.

◆ createBoundaryConditionGroups()

void MoabSkinner::createBoundaryConditionGroups ( )
protected

Create the DAGMC BC group entity sets from the surfaces recorded during skinning and add them to the MOAB geometry

◆ createCornerTris()

void MoabSkinner::createCornerTris ( const std::vector< moab::EntityHandle > &  verts,
unsigned int  corner,
unsigned int  v1,
unsigned int  v2,
unsigned int  v3,
bool  normalout,
moab::Range &  surface_tris 
)
protected

Create 3 tri faces stemming from one corner of a cude (an open tetrahedron)

◆ createGroup()

void MoabSkinner::createGroup ( const unsigned int &  id,
const std::string &  name,
moab::EntityHandle &  group_set 
)
protected

Helper method to create MOAB group entity set

Parameters
[in]idID for the group
[in]namename for the group
[in]group_setgroup of entities

◆ createMOABElems()

void MoabSkinner::createMOABElems ( )
protected

Copy the libMesh [Mesh] into a MOAB mesh. This first loops through all of the nodes, and rebuilds each as a MOAB vertex. Then, we loop over all of the elements and rebuild each as a TET4 (if the libMesh mesh has TET10 elements, they are each rebuilt into 8 TET4 elements). When the source mesh contained non-tetrahedral elements, the geometry mesh is the internally-converted all-TET4 clone rather than the MOOSE mesh

◆ createNodesFromBox()

std::vector< moab::EntityHandle > MoabSkinner::createNodesFromBox ( const BoundingBox &  box,
const Real &  factor 
) const
protected

Create MOAB nodes from a bounding box

Parameters
[in]boxbounding box
[in]factormultiplicative factor to resize the bounding box sides
Returns
nodes

◆ createSurf()

void MoabSkinner::createSurf ( const unsigned int &  id,
moab::EntityHandle &  surface_set,
moab::Range &  faces,
const std::vector< VolData > &  voldata,
BoundaryConditionType  bc_type = BoundaryConditionType::Transmission 
)
protected

Helper method to create MOAB surface entity set.

◆ createSurfaceFromBox()

void MoabSkinner::createSurfaceFromBox ( const BoundingBox &  box,
const VolData voldata,
unsigned int &  surf_id,
bool  normalout,
const Real &  factor 
)
protected

Create a MOAB surface from a bounding box

◆ createSurfaces()

void MoabSkinner::createSurfaces ( moab::Range &  faces,
VolData voldata,
unsigned int &  surf_id,
BoundaryConditionType  bc_type = BoundaryConditionType::Transmission 
)
protected

Helper method to create MOAB surfaces with no overlaps; bc_type is recorded on every surface created or matched by this call

◆ createSurfacesFromSkin()

void MoabSkinner::createSurfacesFromSkin ( const moab::Range &  region,
moab::Range &  skin,
VolData voldata,
unsigned int &  surf_id 
)
protected

Classify and create DAGMC surfaces from find_skin() result. Splits the skin into transmission, vacuum, and reflective subsets and calls createSurfaces() for each type.

Parameters
[in]regionMOAB tets forming the current local region
[in]skinskinned triangles bounding the region
[in]voldatavolume to associate with the created surfaces
[in,out]surf_idrunning counter of surface IDs

◆ createTags()

virtual void MoabSkinner::createTags ( )
protectedvirtual

Helper method to create MOAB tags.

◆ createTri()

moab::EntityHandle MoabSkinner::createTri ( const std::vector< moab::EntityHandle > &  vertices,
unsigned int  v1,
unsigned int  v2,
unsigned int  v3 
)
protected

Create MOAB tri surface element.

◆ createVol()

void MoabSkinner::createVol ( const unsigned int &  id,
moab::EntityHandle &  volume_set,
moab::EntityHandle  group_set 
)
protected

Helper method to create MOAB volume entity set.

◆ execute()

virtual void MoabSkinner::execute ( )
overridevirtual

◆ finalize()

virtual void MoabSkinner::finalize ( )
overridevirtual

◆ findBlocks()

virtual void MoabSkinner::findBlocks ( )
protectedvirtual

Store a mapping from [Mesh] subdomain IDs to an index, to be used for binning by block ID.

◆ findSurface()

void MoabSkinner::findSurface ( const moab::Range &  region,
moab::EntityHandle  group,
unsigned int &  vol_id,
unsigned int &  surf_id,
moab::EntityHandle &  volume_set 
)
protected

Find the surfaces for the provided range and add to group.

◆ findSurfaces()

void MoabSkinner::findSurfaces ( )
protected

Group the binned elems into local temperature regions and find their surfaces.

◆ firstBoundaryConditionGroupID()

unsigned int MoabSkinner::firstBoundaryConditionGroupID ( ) const
protected

Return the first group ID available after material, graveyard, and implicit-complement groups.

Returns
first available boundary condition group ID

◆ getAuxiliaryVariableNumber()

unsigned int MoabSkinner::getAuxiliaryVariableNumber ( const std::string &  name,
const std::string &  param_name 
) const

Get variable number in the auxiliary system

Parameters
[in]namevariable name
[in]param_nameparameter name, for printing a helpful error message
Returns
variable number

◆ getBin()

virtual unsigned int MoabSkinner::getBin ( const unsigned int &  temp_bin,
const unsigned int &  density_bin,
const unsigned int &  subdomain_bin 
) const
virtual

Get total bin index given individual indices for the temperature, density, and subdomain bins

Parameters
[in]temp_bintemperature bin
[in]density_bindensity bin
[in]subdomain_binsubdomain ID bin
Returns
total bin index

◆ getDAGMCGeometryMesh()

MeshBase & MoabSkinner::getDAGMCGeometryMesh ( )
protected

Return the mesh used for DAGMC geometry construction.

Returns
*_tet_mesh when the source mesh contained non-tetrahedral elements and an internal conversion was performed; otherwise returns getMooseMesh().getMesh().

◆ getDensityBin()

virtual unsigned int MoabSkinner::getDensityBin ( const Elem *const  elem) const
virtual

Get the bin index for the density

Parameters
[in]elemelement
Returns
density bin index

◆ getMooseMesh()

MooseMesh & MoabSkinner::getMooseMesh ( )
protected

Get the MooseMesh (displaced or not, depending on _use_displaced)

◆ getSubdomainBin()

virtual unsigned int MoabSkinner::getSubdomainBin ( const Elem *const  elem) const
inlinevirtual

Get the bin index for the subdomain

Parameters
[in]elemelement
Returns
subdomain bin index

◆ getTemperatureBin()

virtual unsigned int MoabSkinner::getTemperatureBin ( const Elem *const  elem) const
virtual

Get the bin index for the temperature

Parameters
[in]elemelement
Returns
temperature bin index

◆ getTetSets()

const std::vector< std::vector< unsigned int > > & MoabSkinner::getTetSets ( ElemType  type) const
protected

Get the node numberings for the MOAB TET4 elements to build for each [Mesh] element

Parameters
[in]typeelement type

◆ groupLocalElems()

void MoabSkinner::groupLocalElems ( std::set< dof_id_type >  elems,
std::vector< moab::Range > &  localElems 
)
protected

Group a given bin into local regions NB elems in param is a copy, localElems is a reference

◆ hasDensitySkinning()

virtual bool MoabSkinner::hasDensitySkinning ( ) const
inlinevirtual

Whether density skinning is applied

Returns
using density skinning

◆ hasGraveyard()

virtual const bool & MoabSkinner::hasGraveyard ( ) const
inlinevirtual

Whether the skinner builds a graveyard

Returns
whether a graveyard is built

◆ initialize()

virtual void MoabSkinner::initialize ( )
overridevirtual

◆ makeDependentOnExternalAction()

virtual void MoabSkinner::makeDependentOnExternalAction ( )
inlinevirtual

Indicate whether this userobject is run by itself (for testing purposes) or controlled by some other class.

◆ materialName()

std::string MoabSkinner::materialName ( const unsigned int &  block,
const unsigned int &  density,
const unsigned int &  temp 
) const

◆ moabPtr()

const std::shared_ptr< moab::Interface > & MoabSkinner::moabPtr ( ) const
inline

Get pointer to underlying moab interface

Returns
pointer to moab interface

◆ nBins()

unsigned int MoabSkinner::nBins ( ) const

Get the total number of bins

Returns
total number of bins

◆ nDensityBins()

virtual unsigned int MoabSkinner::nDensityBins ( ) const
inlinevirtual

Number of density bins; if greater than 1, this means we must be re-generating OpenMC materials during the course of the simulation.

Returns
number of density bins

◆ recordBoundaryConditionSurface()

void MoabSkinner::recordBoundaryConditionSurface ( moab::EntityHandle  surface_set,
BoundaryConditionType  bc_type 
)
protected

Record that a DAGMC surface meshset has been assigned a BC type. Called from createSurf() and from the overlap path in createSurfaces().

Parameters
[in]surface_setsurface meshset
[in]bc_typeboundary condition type assigned to the surface

◆ recordedBoundaryCondition()

BoundaryConditionType MoabSkinner::recordedBoundaryCondition ( moab::EntityHandle  surface_set) const
protected

Get the boundary condition type previously recorded for a surface, if any

Parameters
[in]surface_setsurface meshset
Returns
recorded boundary condition type (Transmission if the surface has no explicit BC)

◆ reset()

void MoabSkinner::reset ( )

Clear mesh data.

◆ resetMOAB()

bool MoabSkinner::resetMOAB ( )
protected

Clear MOAB entity sets.

◆ setGraveyard()

void MoabSkinner::setGraveyard ( bool  build)

Set the graveyard setting

Parameters
[in]buildwhether to build a graveyard

◆ setMaterialNames()

virtual void MoabSkinner::setMaterialNames ( std::vector< std::string >  names)
inlinevirtual

Set the names to be used for naming the subdomains in the skinned mesh. This is used when material names are supplied externally rather than through the 'material_blocks' and 'material_names' input parameters.

Parameters
[in]namesnames for subdomains

◆ setScaling()

virtual void MoabSkinner::setScaling ( const Real &  scale)
inlinevirtual

Set the length multiplier to get from [Mesh] units into centimeters

Parameters
[in]scalemultiplier

◆ setTagData() [1/2]

void MoabSkinner::setTagData ( moab::Tag  tag,
moab::EntityHandle  ent,
std::string  data,
unsigned int  SIZE 
)
protected

Helper function to wrap moab::tag_set_data for a string.

◆ setTagData() [2/2]

void MoabSkinner::setTagData ( moab::Tag  tag,
moab::EntityHandle  ent,
void *  data 
)
protected

Helper function to wrap moab::tag_set_data for a generic pointer.

◆ setTags()

void MoabSkinner::setTags ( moab::EntityHandle  ent,
std::string  name,
std::string  category,
unsigned int  id,
int  dim 
)
protected

Generic method to set the tags that DAGMC requires.

◆ setUseDisplacedMesh()

void MoabSkinner::setUseDisplacedMesh ( const bool &  use)

Override the user parameter for use_displaced

Parameters
[in]usewhether to use the displaced mesh

◆ setVerbosity()

virtual void MoabSkinner::setVerbosity ( const bool &  verbose)
inlinevirtual

Set the verbosity level

Parameters
[in]verbosewhether to print diagnostic information

◆ sortElemsByResults()

virtual void MoabSkinner::sortElemsByResults ( )
protectedvirtual

Sort all the elements in the [Mesh] into bins for temperature, density, and subdomain.

◆ splitSkinByBoundaryCondition()

void MoabSkinner::splitSkinByBoundaryCondition ( const moab::Range &  region,
const moab::Range &  skin,
moab::Range &  transmission_tris,
moab::Range &  vacuum_tris,
moab::Range &  reflective_tris 
)
protected

Classify the skinned triangles for one region into transmission, vacuum, and reflective sets by checking each triangle against the BC sidesets.

Parameters
[in]regionMOAB tets forming the current local region
[in]skinskinned triangles bounding the region
[out]transmission_tristriangles with no boundary condition (transmission)
[out]vacuum_tristriangles assigned vacuum boundary conditions
[out]reflective_tristriangles assigned reflective boundary conditions

◆ threadJoin()

virtual void MoabSkinner::threadJoin ( const UserObject &  )
inlineoverridevirtual

◆ update()

virtual void MoabSkinner::update ( )
virtual

Perform the skinning operation.

◆ updateSurfData()

void MoabSkinner::updateSurfData ( moab::EntityHandle  surface_set,
const VolData data 
)
protected

Add parent-child metadata relating a surface to its volume.

◆ validParams()

static InputParameters MoabSkinner::validParams ( )
static

◆ write()

virtual void MoabSkinner::write ( )
protectedvirtual

Write MOAB volume and/or skin meshes to file.

Member Data Documentation

◆ _all_tets

moab::EntityHandle MoabSkinner::_all_tets
protected

Entity handle to represent the set of all tets.

◆ _bin_by_density

const bool MoabSkinner::_bin_by_density
protected

Whether elements are binned by density (in addition to temperature and block)

◆ _block_id_to_material_name

std::map<SubdomainID, std::string> MoabSkinner::_block_id_to_material_name
protected

Map from mesh SubdomainID to OpenMC material name.

◆ _blocks

std::map<SubdomainID, unsigned int> MoabSkinner::_blocks
protected

Blocks in the [Mesh].

◆ _build_graveyard

bool MoabSkinner::_build_graveyard
protected

Whether to build a graveyard as two additional cube surfaces surrounding the mesh. This is only needed if the skinned geometry is fed into a Monte Carlo code.

◆ _density_bin_bounds

std::vector<Real> MoabSkinner::_density_bin_bounds
protected

Bounds of the density bins.

◆ _density_bin_width

Real MoabSkinner::_density_bin_width
protected

Density bin width.

◆ _density_max

Real MoabSkinner::_density_max
protected

Upper bound of density bins.

◆ _density_min

Real MoabSkinner::_density_min
protected

Lower bound of density bins.

◆ _density_name

std::string MoabSkinner::_density_name
protected

Name of the MOOSE variable containing the density.

◆ _density_var_num

unsigned int MoabSkinner::_density_var_num
protected

Auxiliary variable number for density.

◆ _elem_bins

std::vector<std::set<dof_id_type> > MoabSkinner::_elem_bins
protected

Mapping from total bin ID to a set of elements sorted into that bin.

◆ _elem_handle_to_id

std::unordered_map<moab::EntityHandle, dof_id_type> MoabSkinner::_elem_handle_to_id
protected

Reverse map from MOAB tet entity handle to libMesh element ID. Populated in createMOABElems()

◆ _faceting_tol

const Real& MoabSkinner::_faceting_tol
protected

Faceting tolerence needed by DAGMC.

◆ _geom_tol

const Real& MoabSkinner::_geom_tol
protected

Geometry tolerence needed by DAGMC.

◆ _graveyard_scale_inner

const Real& MoabSkinner::_graveyard_scale_inner
protected

Multiplier on bounding box for inner surface of graveyard.

◆ _graveyard_scale_outer

const Real& MoabSkinner::_graveyard_scale_outer
protected

Multiplier on bounding box for outer surface of graveyard.

◆ _id_to_elem_handles

std::map<dof_id_type, std::vector<moab::EntityHandle> > MoabSkinner::_id_to_elem_handles
protected

Map from libmesh id to MOAB element entity handles.

◆ _implicit_complement_group_name

std::string MoabSkinner::_implicit_complement_group_name
protected

OpenMC material name or ID which will be assigned to the implicit complement.

◆ _material_names

std::vector<std::string> MoabSkinner::_material_names
protected

Material names corresponding to each subdomain. These are used to name the new skinned volumes in MOAB

◆ _moab

std::shared_ptr<moab::Interface> MoabSkinner::_moab
protected

MOAB interface.

◆ _n_block_bins

unsigned int MoabSkinner::_n_block_bins
protected

Number of block bins.

◆ _n_density_bins

unsigned int MoabSkinner::_n_density_bins
protected

Number of density bins.

◆ _n_temperature_bins

const unsigned int& MoabSkinner::_n_temperature_bins
protected

Number of temperature bins.

◆ _n_write

unsigned int MoabSkinner::_n_write
protected

Count number of times output files have been written.

◆ _node_id_to_handle

std::unordered_map<dof_id_type, moab::EntityHandle> MoabSkinner::_node_id_to_handle
protected

Map from libMesh id to MOAB vertex handles.

◆ _output_full

const bool& MoabSkinner::_output_full
protected

Whether to output the MOAB mesh to a .h5m file.

◆ _output_skins

const bool& MoabSkinner::_output_skins
protected

Whether to output the MOAB mesh skins to a .h5m file.

◆ _reflective_bcs_surface_ids

std::set<BoundaryID> MoabSkinner::_reflective_bcs_surface_ids
protected

Resolved reflective BC sideset IDs (from 'reflective_bcs_surfaces' input parameter)

◆ _scaling

Real MoabSkinner::_scaling
protected

Length multiplier to get from [Mesh] units into OpenMC's centimeters.

◆ _serialized_solution

std::unique_ptr<NumericVector<Number> > MoabSkinner::_serialized_solution
protected

◆ _set_bcs

bool MoabSkinner::_set_bcs
protected

Whether to assign boundary conditions to surfaces.

◆ _set_implicit_complement_material

bool MoabSkinner::_set_implicit_complement_material = false
protected

Whether to assign a material to the implicit complement region.

◆ _standalone

bool MoabSkinner::_standalone
protected

Whether this class runs by itself, or is controlled by an external class.

◆ _surface_bc_types

std::map<moab::EntityHandle, BoundaryConditionType> MoabSkinner::_surface_bc_types
protected

Map from DAGMC surface meshset to its assigned BC type, recorded during skinning. Transmission surfaces are not recorded (they need no DAGMC group).

◆ _temperature_bin_bounds

std::vector<Real> MoabSkinner::_temperature_bin_bounds
protected

Bounds of the temperature bins.

◆ _temperature_bin_width

const Real MoabSkinner::_temperature_bin_width
protected

Temperature bin width.

◆ _temperature_max

const Real& MoabSkinner::_temperature_max
protected

Upper bound of temperature bins.

◆ _temperature_min

const Real& MoabSkinner::_temperature_min
protected

Lower bound of temperature bins.

◆ _temperature_name

const std::string& MoabSkinner::_temperature_name
protected

Name of the temperature variable.

◆ _temperature_var_num

unsigned int MoabSkinner::_temperature_var_num
protected

Auxiliary variable number for temperature.

◆ _tet10_nodes

std::vector<std::vector<unsigned int> > MoabSkinner::_tet10_nodes
protected

Node ordering for eight TET4 MOAB elements, based on libMesh node numberings for a TET10 element. We re-build the libMesh element into first-order MOAB elements.

◆ _tet4_nodes

std::vector<std::vector<unsigned int> > MoabSkinner::_tet4_nodes
protected

Node ordering for a TET4 MOAB element, based on libMesh node numberings.

◆ _tet_mesh

std::unique_ptr<MeshBase> MoabSkinner::_tet_mesh
protected

TET4 clone of the MOOSE mesh. Present only when the source mesh contains non-tetrahedral elements. Rebuilt each update() cycle.

◆ _tet_mesh_built

bool MoabSkinner::_tet_mesh_built
protected

True when buildTetMesh() is called.

◆ _use_displaced

bool MoabSkinner::_use_displaced
protected

Whether the skinned mesh should be generated from a displaced mesh.

◆ _vacuum_bcs_surface_ids

std::set<BoundaryID> MoabSkinner::_vacuum_bcs_surface_ids
protected

Resolved vacuum BC sideset IDs (from 'vacuum_bcs_surfaces' input parameter)

◆ _verbose

bool MoabSkinner::_verbose
protected

Whether to print diagnostic information.

◆ BIN_TOLERANCE

const Real MoabSkinner::BIN_TOLERANCE = 1e-6
protected

Tolerance to use for comparing values to bin bounds.

◆ category_tag

moab::Tag MoabSkinner::category_tag
protected

Tag for type of entity set.

◆ faceting_tol_tag

moab::Tag MoabSkinner::faceting_tol_tag
protected

Tag for faceting tolerance.

◆ geometry_dimension_tag

moab::Tag MoabSkinner::geometry_dimension_tag
protected

Tag for dimension for geometry.

◆ geometry_resabs_tag

moab::Tag MoabSkinner::geometry_resabs_tag
protected

Tag needed by DAGMC.

◆ gtt

std::unique_ptr<moab::GeomTopoTool> MoabSkinner::gtt
protected

Topology tool for setting surface sense.

◆ id_tag

moab::Tag MoabSkinner::id_tag
protected

Tag for entitiy set ID.

◆ name_tag

moab::Tag MoabSkinner::name_tag
protected

Tag for name of entity set.

◆ NODES_PER_MOAB_TET

const unsigned int MoabSkinner::NODES_PER_MOAB_TET = 4
protected

Number of nodes per MOAB tet (which are first order, so TET4)

◆ offset

moab::EntityHandle MoabSkinner::offset
protected

Save the first tet entity handle.

◆ skinner

std::unique_ptr<moab::Skinner> MoabSkinner::skinner
protected

Moab skinner for finding temperature surfaces.

◆ surfsToVols

std::map<moab::EntityHandle, std::vector<VolData> > MoabSkinner::surfsToVols
protected

Save some topological data: map from surface handle to vol handle and sense.


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