AURORA
Classes | Public Member Functions | Public Attributes | Private Types | Private Member Functions | Private Attributes | List of all members
MoabUserObject Class Reference

UserObject class which wraps a moab::Interface pointer. More...

#include <MoabUserObject.h>

Inheritance diagram for MoabUserObject:
Inheritance graph
[legend]

Classes

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

Public Member Functions

 MoabUserObject (const InputParameters &parameters)
 
virtual void execute ()
 Override MOOSE virtual method to do nothing. More...
 
virtual void initialize ()
 Override MOOSE virtual method to do nothing. More...
 
virtual void finalize ()
 Override MOOSE virtual method to do nothing. More...
 
virtual void threadJoin (const UserObject &)
 Override MOOSE virtual method to do nothing. More...
 
void setProblem (FEProblemBase *problem)
 Pass in the FE Problem. More...
 
bool hasProblem ()
 Check if problem has been set. More...
 
FEProblemBase & problem ()
 Get a reference to the FE problem. More...
 
void initMOAB ()
 Initialise MOAB. More...
 
void initBinningData ()
 Intialise objects needed to perform binning of elements. More...
 
void reset ()
 Clear mesh data. More...
 
bool update ()
 Update MOAB with any results from MOOSE. More...
 
bool setSolution (std::string var_now, std::vector< double > &results, double scaleFactor=1., bool isErr=false, bool normToVol=true)
 Pass the OpenMC results into the libMesh systems solution. More...
 
void getMaterialProperties (std::vector< std::string > &mat_names_out, std::vector< double > &initial_densities, std::vector< std::string > &tails, std::vector< MOABMaterialProperties > &properties)
 Retrieve a list of original material names and properties. More...
 

Public Attributes

std::shared_ptr< moab::Interface > moabPtr
 Publically available pointer to MOAB interface. More...
 

Private Types

enum  Sense { BACKWARDS =-1, FORWARDS =1 }
 Encode the whether the surface normal faces into or out of the volume. More...
 

Private Member Functions

MeshBase & mesh ()
 Get a modifyable reference to the underlying libmesh mesh. More...
 
EquationSystems & systems ()
 Get a modifyable reference to the underlying libmesh equation systems. More...
 
System & system (std::string var_now)
 Get a modifyable reference to the underlying libmesh system. More...
 
moab::ErrorCode createNodes (std::map< dof_id_type, moab::EntityHandle > &node_id_to_handle)
 Helper method to create MOAB nodes. More...
 
void createElems (std::map< dof_id_type, moab::EntityHandle > &node_id_to_handle)
 Helper method to create MOAB elements. More...
 
moab::ErrorCode createTags ()
 Helper method to create MOAB tags. More...
 
moab::ErrorCode createGroup (unsigned int id, std::string name, moab::EntityHandle &group_set)
 Helper method to create MOAB group entity set. More...
 
moab::ErrorCode createVol (unsigned int id, moab::EntityHandle &volume_set, moab::EntityHandle group_set)
 Helper method to create MOAB volume entity set. More...
 
moab::ErrorCode createSurf (unsigned int id, moab::EntityHandle &surface_set, moab::Range &faces, std::vector< VolData > &voldata)
 Helper method to create MOAB surface entity set. More...
 
moab::ErrorCode createSurfaces (moab::Range &reversed, VolData &voldata, unsigned int &surf_id)
 Helper method to create MOAB surfaces with no overlaps. More...
 
moab::ErrorCode createSurfaceFromBox (const BoundingBox &box, VolData &voldata, unsigned int &surf_id, bool normalout, double factor=1.0)
 Create a MOAB surface from a bounding box. More...
 
moab::ErrorCode createNodesFromBox (const BoundingBox &box, double factor, std::vector< moab::EntityHandle > &vert_handles)
 Create MOAB nodes from a bounding box. More...
 
moab::ErrorCode 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) More...
 
moab::ErrorCode createTri (const std::vector< moab::EntityHandle > &vertices, unsigned int v1, unsigned int v2, unsigned int v3, moab::Range &surface_tris)
 Create MOAB tri surface element. More...
 
moab::ErrorCode updateSurfData (moab::EntityHandle surface_set, VolData data)
 Add parent-child metadata relating a surface to its volume. More...
 
moab::ErrorCode setTags (moab::EntityHandle ent, std::string name, std::string category, unsigned int id, int dim)
 Generic method to set the tags that DAGMC requires. More...
 
moab::ErrorCode setTagData (moab::Tag tag, moab::EntityHandle ent, std::string data, unsigned int SIZE)
 Helper function to wrap moab::tag_set_data for a string. More...
 
moab::ErrorCode setTagData (moab::Tag tag, moab::EntityHandle ent, void *data)
 Helper function to wrap moab::tag_set_data for a generic pointer. More...
 
bool getTetSets (ElemType type, std::vector< std::vector< unsigned int > > &perms)
 Return all sets of node indices for sub-tetrahedra if we have a second order mesh. More...
 
moab::ErrorCode buildGraveyard (unsigned int &vol_id, unsigned int &surf_id)
 Build the graveyard (needed by OpenMC) More...
 
std::vector< Point > boxCoords (const BoundingBox &box, double factor)
 Get the coords of the box back as an array (possibly scaled) More...
 
void findMaterials ()
 Look for materials in the FE problem. More...
 
void clearElemMaps ()
 Clear the maps between entity handles and dof ids. More...
 
void addElem (dof_id_type id, moab::EntityHandle ent)
 Add an element to maps. More...
 
void setSolution (unsigned int iSysNow, unsigned int iVarNow, std::vector< double > &results, double scaleFactor, bool isErr, bool normToVol)
 Helper method to set the results in a given system and variable. More...
 
dof_id_type elem_to_soln_index (const Elem &elem, unsigned int iSysNow, unsigned int iVarNow)
 Helper method to convert between elem / solution indices. More...
 
NumericVector< Number > & getSerialisedSolution (libMesh::System *sysPtr)
 Get a serialised version of solution for a given system. More...
 
void setMeshFunction (std::string var_name_in)
 Create and save a mesh function for the provided variable. More...
 
double evalMeshFunction (std::shared_ptr< MeshFunction > meshFunctionPtr, const Point &p)
 Evaluate a mesh function at a point. More...
 
std::shared_ptr< MeshFunction > getMeshFunction (std::string var_name_in)
 Fetch the mesh function associated with a variable. More...
 
bool sortElemsByResults ()
 Sort elems in to bins of a given temperature. More...
 
bool findSurfaces ()
 Group the binned elems into local temperature regions and find their surfaces. More...
 
void groupLocalElems (std::set< dof_id_type > elems, std::vector< moab::Range > &localElems)
 
int getResultsBin (double value)
 Given a value of our variable, find what bin this corresponds to. More...
 
int getResultsBinLin (double value)
 Find results bin if we have linear binning. More...
 
int getResultsBinLog (double value)
 Find results bin if we have logarithmic. More...
 
int getRelDensityBin (double value)
 Return the bin index of a given relative density. More...
 
int getSortBin (int iVarBin, int iDenBin, int iMat, int nVarBinsIn, int nDenBinsIn, int nMatsIn)
 Map material, density and temp bin indices onto a linearised index. More...
 
int getSortBin (int iVarBin, int iDenBin, int iMat)
 
int getMatBin (int iVarBin, int iDenBin, int nVarBinsIn, int nDenBinsIn)
 Map density and temp bin indices onto a linearised index. More...
 
int getMatBin (int iVarBin, int iDenBin)
 
void calcMidpoints ()
 Calculate the variable evaluated at the bin midpoints. More...
 
void calcMidpointsLin ()
 Calculate the variable evaluated at the bin midpoints for linear binning. More...
 
void calcMidpointsLog ()
 Calculate the variable evaluated at the bin midpoints for log binning. More...
 
void calcDenMidpoints ()
 Calculate the density evaluated at the bin midpoints. More...
 
void calcMidpointsLin (double var_min_in, double bin_width_in, int nbins_in, std::vector< double > &midpoints_in)
 Calculate a generic variable midpoints given binning params. More...
 
Point elemCentroid (Elem &elem)
 Return the centroid position of an element. More...
 
void resetContainers ()
 Clear the containers of elements grouped into bins of constant temp. More...
 
bool resetMOAB ()
 Clear MOAB entity sets. More...
 
bool 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. More...
 
bool write ()
 Write to file. More...
 
void communicateDofSet (std::set< dof_id_type > &dofset)
 MPI communication of DOFs of binned elements. More...
 

Private Attributes

FEProblemBase * _problem_ptr
 Pointer to the feProblem we care about. More...
 
std::unique_ptr< moab::Skinner > skinner
 Pointer to a moab skinner for finding temperature surfaces. More...
 
std::unique_ptr< moab::GeomTopoTool > gtt
 Pointer for gtt for setting surface sense. More...
 
double lengthscale
 Convert MOOSE units to dagmc length units. More...
 
double densityscale
 Convert MOOSE density units to openmc density units. More...
 
std::map< dof_id_type, std::vector< moab::EntityHandle > > _id_to_elem_handles
 Map from libmesh id to MOAB element entity handles. More...
 
moab::EntityHandle offset
 Save the first tet entity handle. More...
 
std::string var_name
 Name of the MOOSE variable. More...
 
bool binElems
 Whether or not to perform binning. More...
 
bool logscale
 Whether or not to bin in a log scale. More...
 
double var_min
 Minimum value of our variable. More...
 
double var_max
 Maximum value of our variable for binning on a linear scale. More...
 
double bin_width
 Fixed bin width for binning on a linear scale. More...
 
int powMin
 Minimum power of 10. More...
 
int powMax
 Maximum power of 10. More...
 
unsigned int nVarBins
 Number of variable bins to use. More...
 
unsigned int nPow
 Number of powers of 10 to bin in for binning on a log scale. More...
 
unsigned int nMinor
 Number of minor divisions for binning on a log scale. More...
 
std::vector< double > midpoints
 Store the temperature corresponding to the bin mipoint. More...
 
std::vector< double > den_midpoints
 Store the relative density corresponding to the bin mipoint. More...
 
std::string den_var_name
 Data members relating to binning in density. More...
 
bool binByDensity
 Switch to determine if we should bin by material density. More...
 
double rel_den_min
 Minimum relative density diff. More...
 
double rel_den_max
 Max relative density diff. More...
 
double rel_den_bw
 Relative density diff bin width. More...
 
unsigned int nDenBins
 Number of relative density bins. More...
 
unsigned int nMatBins
 Number of distinct subdomains (e.g. vols, mats) More...
 
std::vector< std::set< dof_id_type > > sortedElems
 Container for elems sorted by variable bin and materials. More...
 
std::map< std::string, std::shared_ptr< MeshFunction > > meshFunctionPtrs
 A map to store mesh functions against their variable name. More...
 
std::map< unsigned int, std::unique_ptr< NumericVector< Number > > > serial_solutions
 A place to store the entire solution. More...
 
std::vector< std::string > mat_names
 material names More...
 
std::vector< std::string > openmc_mat_names
 OpenMC material names. More...
 
std::vector< std::set< SubdomainID > > mat_blocks
 all element blocks assigned to mats More...
 
std::vector< double > initialDensities
 vector for initial densities if binning by density More...
 
moab::EntityHandle meshset
 An entitiy handle to represent the set of all tets. More...
 
std::map< moab::EntityHandle, std::vector< VolData > > surfsToVols
 Save some topological data: map from surface handle to vol handle and sense. More...
 
moab::Tag geometry_dimension_tag
 Tag for dimension for geometry. More...
 
moab::Tag id_tag
 Tag for entitiy set ID. More...
 
moab::Tag faceting_tol_tag
 Tag for faceting tolerance. More...
 
moab::Tag geometry_resabs_tag
 Tag needed by DAGMC. More...
 
moab::Tag category_tag
 Tag for type of entity set. More...
 
moab::Tag name_tag
 Tag for name of entity set. More...
 
const unsigned int nNodesPerTet = 4
 Const to encode that MOAB tets have 4 nodes. More...
 
double faceting_tol
 Faceting tolerence needed by DAGMC. More...
 
double geom_tol
 Geometry tolerence needed by DAGMC. More...
 
double scalefactor_inner
 Scalefactors applied to bounding box for inner surface of graveyard. More...
 
double scalefactor_outer
 Scalefactors applied to bounding box for outer surface of graveyard. More...
 
bool output_skins
 Flag to control whether to save surface skins to file. More...
 
bool output_full
 Flag to control whether to output the full MOAB mesh database. More...
 
std::string output_base
 Base name of skins output file. More...
 
std::string output_base_full
 Base name of full database output file. More...
 
unsigned int n_output
 Number of times to write to file. More...
 
unsigned int n_period
 Period of writes (skip every n_period -1) More...
 
unsigned int n_write
 Count number of times file has been written to. More...
 
unsigned int n_its
 Store the number of times writeSurfaces is called. More...
 
PerfID _init_timer
 Performance timer for initialisation. More...
 
PerfID _update_timer
 Performance timer for update. More...
 
PerfID _setsolution_timer
 Performance timer for setSolution. More...
 

Detailed Description

UserObject class which wraps a moab::Interface pointer.

The main role of this class is to bin elements of the mesh according named variables (presumed temperature and density), and subsequently perform a skinning operation to find the surfaces of these local regions.

Member Enumeration Documentation

◆ Sense

enum MoabUserObject::Sense
private

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

Member Function Documentation

◆ addElem()

void MoabUserObject::addElem ( dof_id_type  id,
moab::EntityHandle  ent 
)
private

Add an element to maps.

◆ boxCoords()

std::vector< Point > MoabUserObject::boxCoords ( const BoundingBox &  box,
double  factor 
)
private

Get the coords of the box back as an array (possibly scaled)

◆ buildGraveyard()

moab::ErrorCode MoabUserObject::buildGraveyard ( unsigned int &  vol_id,
unsigned int &  surf_id 
)
private

Build the graveyard (needed by OpenMC)

◆ calcDenMidpoints()

void MoabUserObject::calcDenMidpoints ( )
private

Calculate the density evaluated at the bin midpoints.

◆ calcMidpoints()

void MoabUserObject::calcMidpoints ( )
private

Calculate the variable evaluated at the bin midpoints.

◆ calcMidpointsLin() [1/2]

void MoabUserObject::calcMidpointsLin ( )
private

Calculate the variable evaluated at the bin midpoints for linear binning.

◆ calcMidpointsLin() [2/2]

void MoabUserObject::calcMidpointsLin ( double  var_min_in,
double  bin_width_in,
int  nbins_in,
std::vector< double > &  midpoints_in 
)
private

Calculate a generic variable midpoints given binning params.

◆ calcMidpointsLog()

void MoabUserObject::calcMidpointsLog ( )
private

Calculate the variable evaluated at the bin midpoints for log binning.

◆ clearElemMaps()

void MoabUserObject::clearElemMaps ( )
private

Clear the maps between entity handles and dof ids.

◆ communicateDofSet()

void MoabUserObject::communicateDofSet ( std::set< dof_id_type > &  dofset)
private

MPI communication of DOFs of binned elements.

◆ createCornerTris()

moab::ErrorCode MoabUserObject::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 
)
private

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

◆ createElems()

void MoabUserObject::createElems ( std::map< dof_id_type, moab::EntityHandle > &  node_id_to_handle)
private

Helper method to create MOAB elements.

◆ createGroup()

moab::ErrorCode MoabUserObject::createGroup ( unsigned int  id,
std::string  name,
moab::EntityHandle &  group_set 
)
private

Helper method to create MOAB group entity set.

◆ createNodes()

moab::ErrorCode MoabUserObject::createNodes ( std::map< dof_id_type, moab::EntityHandle > &  node_id_to_handle)
private

Helper method to create MOAB nodes.

◆ createNodesFromBox()

moab::ErrorCode MoabUserObject::createNodesFromBox ( const BoundingBox &  box,
double  factor,
std::vector< moab::EntityHandle > &  vert_handles 
)
private

Create MOAB nodes from a bounding box.

◆ createSurf()

moab::ErrorCode MoabUserObject::createSurf ( unsigned int  id,
moab::EntityHandle &  surface_set,
moab::Range &  faces,
std::vector< VolData > &  voldata 
)
private

Helper method to create MOAB surface entity set.

◆ createSurfaceFromBox()

moab::ErrorCode MoabUserObject::createSurfaceFromBox ( const BoundingBox &  box,
VolData voldata,
unsigned int &  surf_id,
bool  normalout,
double  factor = 1.0 
)
private

Create a MOAB surface from a bounding box.

◆ createSurfaces()

moab::ErrorCode MoabUserObject::createSurfaces ( moab::Range &  reversed,
VolData voldata,
unsigned int &  surf_id 
)
private

Helper method to create MOAB surfaces with no overlaps.

◆ createTags()

moab::ErrorCode MoabUserObject::createTags ( )
private

Helper method to create MOAB tags.

◆ createTri()

moab::ErrorCode MoabUserObject::createTri ( const std::vector< moab::EntityHandle > &  vertices,
unsigned int  v1,
unsigned int  v2,
unsigned int  v3,
moab::Range &  surface_tris 
)
private

Create MOAB tri surface element.

◆ createVol()

moab::ErrorCode MoabUserObject::createVol ( unsigned int  id,
moab::EntityHandle &  volume_set,
moab::EntityHandle  group_set 
)
private

Helper method to create MOAB volume entity set.

◆ elem_to_soln_index()

dof_id_type MoabUserObject::elem_to_soln_index ( const Elem &  elem,
unsigned int  iSysNow,
unsigned int  iVarNow 
)
private

Helper method to convert between elem / solution indices.

◆ elemCentroid()

Point MoabUserObject::elemCentroid ( Elem &  elem)
private

Return the centroid position of an element.

◆ evalMeshFunction()

double MoabUserObject::evalMeshFunction ( std::shared_ptr< MeshFunction >  meshFunctionPtr,
const Point &  p 
)
private

Evaluate a mesh function at a point.

◆ execute()

virtual void MoabUserObject::execute ( )
inlinevirtual

Override MOOSE virtual method to do nothing.

◆ finalize()

virtual void MoabUserObject::finalize ( )
inlinevirtual

Override MOOSE virtual method to do nothing.

◆ findMaterials()

void MoabUserObject::findMaterials ( )
private

Look for materials in the FE problem.

◆ findSurface()

bool MoabUserObject::findSurface ( const moab::Range &  region,
moab::EntityHandle  group,
unsigned int &  vol_id,
unsigned int &  surf_id,
moab::EntityHandle &  volume_set 
)
private

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

◆ findSurfaces()

bool MoabUserObject::findSurfaces ( )
private

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

◆ getMatBin() [1/2]

int MoabUserObject::getMatBin ( int  iVarBin,
int  iDenBin 
)
inlineprivate

Map density and temp bin indices onto a linearised index with default parameters for number of bins

◆ getMatBin() [2/2]

int MoabUserObject::getMatBin ( int  iVarBin,
int  iDenBin,
int  nVarBinsIn,
int  nDenBinsIn 
)
private

Map density and temp bin indices onto a linearised index.

◆ getMaterialProperties()

void MoabUserObject::getMaterialProperties ( std::vector< std::string > &  mat_names_out,
std::vector< double > &  initial_densities,
std::vector< std::string > &  tails,
std::vector< MOABMaterialProperties > &  properties 
)

Retrieve a list of original material names and properties.

◆ getMeshFunction()

std::shared_ptr< MeshFunction > MoabUserObject::getMeshFunction ( std::string  var_name_in)
private

Fetch the mesh function associated with a variable.

◆ getRelDensityBin()

int MoabUserObject::getRelDensityBin ( double  value)
inlineprivate

Return the bin index of a given relative density.

◆ getResultsBin()

int MoabUserObject::getResultsBin ( double  value)
private

Given a value of our variable, find what bin this corresponds to.

◆ getResultsBinLin()

int MoabUserObject::getResultsBinLin ( double  value)
inlineprivate

Find results bin if we have linear binning.

◆ getResultsBinLog()

int MoabUserObject::getResultsBinLog ( double  value)
private

Find results bin if we have logarithmic.

◆ getSerialisedSolution()

NumericVector< Number > & MoabUserObject::getSerialisedSolution ( libMesh::System *  sysPtr)
private

Get a serialised version of solution for a given system.

◆ getSortBin() [1/2]

int MoabUserObject::getSortBin ( int  iVarBin,
int  iDenBin,
int  iMat 
)
inlineprivate

Map material, density and temp bin indices onto a linearised index with default parameters for number of bins

◆ getSortBin() [2/2]

int MoabUserObject::getSortBin ( int  iVarBin,
int  iDenBin,
int  iMat,
int  nVarBinsIn,
int  nDenBinsIn,
int  nMatsIn 
)
private

Map material, density and temp bin indices onto a linearised index.

◆ getTetSets()

bool MoabUserObject::getTetSets ( ElemType  type,
std::vector< std::vector< unsigned int > > &  perms 
)
private

Return all sets of node indices for sub-tetrahedra if we have a second order mesh.

◆ groupLocalElems()

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

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

◆ hasProblem()

bool MoabUserObject::hasProblem ( )
inline

Check if problem has been set.

◆ initBinningData()

void MoabUserObject::initBinningData ( )

Intialise objects needed to perform binning of elements.

◆ initialize()

virtual void MoabUserObject::initialize ( )
inlinevirtual

Override MOOSE virtual method to do nothing.

◆ initMOAB()

void MoabUserObject::initMOAB ( )

Initialise MOAB.

◆ mesh()

MeshBase & MoabUserObject::mesh ( )
private

Get a modifyable reference to the underlying libmesh mesh.

◆ problem()

FEProblemBase & MoabUserObject::problem ( )

Get a reference to the FE problem.

◆ reset()

void MoabUserObject::reset ( )

Clear mesh data.

◆ resetContainers()

void MoabUserObject::resetContainers ( )
private

Clear the containers of elements grouped into bins of constant temp.

◆ resetMOAB()

bool MoabUserObject::resetMOAB ( )
private

Clear MOAB entity sets.

◆ setMeshFunction()

void MoabUserObject::setMeshFunction ( std::string  var_name_in)
private

Create and save a mesh function for the provided variable.

◆ setProblem()

void MoabUserObject::setProblem ( FEProblemBase *  problem)
inline

Pass in the FE Problem.

◆ setSolution() [1/2]

bool MoabUserObject::setSolution ( std::string  var_now,
std::vector< double > &  results,
double  scaleFactor = 1.,
bool  isErr = false,
bool  normToVol = true 
)

Pass the OpenMC results into the libMesh systems solution.

◆ setSolution() [2/2]

void MoabUserObject::setSolution ( unsigned int  iSysNow,
unsigned int  iVarNow,
std::vector< double > &  results,
double  scaleFactor,
bool  isErr,
bool  normToVol 
)
private

Helper method to set the results in a given system and variable.

◆ setTagData() [1/2]

moab::ErrorCode MoabUserObject::setTagData ( moab::Tag  tag,
moab::EntityHandle  ent,
std::string  data,
unsigned int  SIZE 
)
private

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

◆ setTagData() [2/2]

moab::ErrorCode MoabUserObject::setTagData ( moab::Tag  tag,
moab::EntityHandle  ent,
void *  data 
)
private

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

◆ setTags()

moab::ErrorCode MoabUserObject::setTags ( moab::EntityHandle  ent,
std::string  name,
std::string  category,
unsigned int  id,
int  dim 
)
private

Generic method to set the tags that DAGMC requires.

◆ sortElemsByResults()

bool MoabUserObject::sortElemsByResults ( )
private

Sort elems in to bins of a given temperature.

◆ system()

System & MoabUserObject::system ( std::string  var_now)
private

Get a modifyable reference to the underlying libmesh system.

◆ systems()

EquationSystems & MoabUserObject::systems ( )
private

Get a modifyable reference to the underlying libmesh equation systems.

◆ threadJoin()

virtual void MoabUserObject::threadJoin ( const UserObject &  )
inlinevirtual

Override MOOSE virtual method to do nothing.

◆ update()

bool MoabUserObject::update ( )

Update MOAB with any results from MOOSE.

◆ updateSurfData()

moab::ErrorCode MoabUserObject::updateSurfData ( moab::EntityHandle  surface_set,
VolData  data 
)
private

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

◆ write()

bool MoabUserObject::write ( )
private

Write to file.

Member Data Documentation

◆ _id_to_elem_handles

std::map<dof_id_type,std::vector<moab::EntityHandle> > MoabUserObject::_id_to_elem_handles
private

Map from libmesh id to MOAB element entity handles.

◆ _init_timer

PerfID MoabUserObject::_init_timer
private

Performance timer for initialisation.

◆ _problem_ptr

FEProblemBase* MoabUserObject::_problem_ptr
private

Pointer to the feProblem we care about.

◆ _setsolution_timer

PerfID MoabUserObject::_setsolution_timer
private

Performance timer for setSolution.

◆ _update_timer

PerfID MoabUserObject::_update_timer
private

Performance timer for update.

◆ bin_width

double MoabUserObject::bin_width
private

Fixed bin width for binning on a linear scale.

◆ binByDensity

bool MoabUserObject::binByDensity
private

Switch to determine if we should bin by material density.

◆ binElems

bool MoabUserObject::binElems
private

Whether or not to perform binning.

◆ category_tag

moab::Tag MoabUserObject::category_tag
private

Tag for type of entity set.

◆ den_midpoints

std::vector<double> MoabUserObject::den_midpoints
private

Store the relative density corresponding to the bin mipoint.

◆ den_var_name

std::string MoabUserObject::den_var_name
private

Data members relating to binning in density.

Name of the MOOSE variable containing the density

◆ densityscale

double MoabUserObject::densityscale
private

Convert MOOSE density units to openmc density units.

◆ faceting_tol

double MoabUserObject::faceting_tol
private

Faceting tolerence needed by DAGMC.

◆ faceting_tol_tag

moab::Tag MoabUserObject::faceting_tol_tag
private

Tag for faceting tolerance.

◆ geom_tol

double MoabUserObject::geom_tol
private

Geometry tolerence needed by DAGMC.

◆ geometry_dimension_tag

moab::Tag MoabUserObject::geometry_dimension_tag
private

Tag for dimension for geometry.

◆ geometry_resabs_tag

moab::Tag MoabUserObject::geometry_resabs_tag
private

Tag needed by DAGMC.

◆ gtt

std::unique_ptr< moab::GeomTopoTool > MoabUserObject::gtt
private

Pointer for gtt for setting surface sense.

◆ id_tag

moab::Tag MoabUserObject::id_tag
private

Tag for entitiy set ID.

◆ initialDensities

std::vector<double> MoabUserObject::initialDensities
private

vector for initial densities if binning by density

◆ lengthscale

double MoabUserObject::lengthscale
private

Convert MOOSE units to dagmc length units.

◆ logscale

bool MoabUserObject::logscale
private

Whether or not to bin in a log scale.

◆ mat_blocks

std::vector< std::set<SubdomainID> > MoabUserObject::mat_blocks
private

all element blocks assigned to mats

◆ mat_names

std::vector<std::string> MoabUserObject::mat_names
private

material names

◆ meshFunctionPtrs

std::map<std::string, std::shared_ptr<MeshFunction> > MoabUserObject::meshFunctionPtrs
private

A map to store mesh functions against their variable name.

◆ meshset

moab::EntityHandle MoabUserObject::meshset
private

An entitiy handle to represent the set of all tets.

◆ midpoints

std::vector<double> MoabUserObject::midpoints
private

Store the temperature corresponding to the bin mipoint.

◆ moabPtr

std::shared_ptr<moab::Interface> MoabUserObject::moabPtr

Publically available pointer to MOAB interface.

◆ n_its

unsigned int MoabUserObject::n_its
private

Store the number of times writeSurfaces is called.

◆ n_output

unsigned int MoabUserObject::n_output
private

Number of times to write to file.

◆ n_period

unsigned int MoabUserObject::n_period
private

Period of writes (skip every n_period -1)

◆ n_write

unsigned int MoabUserObject::n_write
private

Count number of times file has been written to.

◆ name_tag

moab::Tag MoabUserObject::name_tag
private

Tag for name of entity set.

◆ nDenBins

unsigned int MoabUserObject::nDenBins
private

Number of relative density bins.

◆ nMatBins

unsigned int MoabUserObject::nMatBins
private

Number of distinct subdomains (e.g. vols, mats)

◆ nMinor

unsigned int MoabUserObject::nMinor
private

Number of minor divisions for binning on a log scale.

◆ nNodesPerTet

const unsigned int MoabUserObject::nNodesPerTet = 4
private

Const to encode that MOAB tets have 4 nodes.

◆ nPow

unsigned int MoabUserObject::nPow
private

Number of powers of 10 to bin in for binning on a log scale.

◆ nVarBins

unsigned int MoabUserObject::nVarBins
private

Number of variable bins to use.

◆ offset

moab::EntityHandle MoabUserObject::offset
private

Save the first tet entity handle.

◆ openmc_mat_names

std::vector<std::string> MoabUserObject::openmc_mat_names
private

OpenMC material names.

◆ output_base

std::string MoabUserObject::output_base
private

Base name of skins output file.

◆ output_base_full

std::string MoabUserObject::output_base_full
private

Base name of full database output file.

◆ output_full

bool MoabUserObject::output_full
private

Flag to control whether to output the full MOAB mesh database.

◆ output_skins

bool MoabUserObject::output_skins
private

Flag to control whether to save surface skins to file.

◆ powMax

int MoabUserObject::powMax
private

Maximum power of 10.

◆ powMin

int MoabUserObject::powMin
private

Minimum power of 10.

◆ rel_den_bw

double MoabUserObject::rel_den_bw
private

Relative density diff bin width.

◆ rel_den_max

double MoabUserObject::rel_den_max
private

Max relative density diff.

◆ rel_den_min

double MoabUserObject::rel_den_min
private

Minimum relative density diff.

◆ scalefactor_inner

double MoabUserObject::scalefactor_inner
private

Scalefactors applied to bounding box for inner surface of graveyard.

◆ scalefactor_outer

double MoabUserObject::scalefactor_outer
private

Scalefactors applied to bounding box for outer surface of graveyard.

◆ serial_solutions

std::map<unsigned int, std::unique_ptr<NumericVector<Number> > > MoabUserObject::serial_solutions
private

A place to store the entire solution.

◆ skinner

std::unique_ptr< moab::Skinner > MoabUserObject::skinner
private

Pointer to a moab skinner for finding temperature surfaces.

◆ sortedElems

std::vector<std::set<dof_id_type> > MoabUserObject::sortedElems
private

Container for elems sorted by variable bin and materials.

◆ surfsToVols

std::map<moab::EntityHandle, std::vector<VolData> > MoabUserObject::surfsToVols
private

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

◆ var_max

double MoabUserObject::var_max
private

Maximum value of our variable for binning on a linear scale.

◆ var_min

double MoabUserObject::var_min
private

Minimum value of our variable.

◆ var_name

std::string MoabUserObject::var_name
private

Name of the MOOSE variable.


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