AURORA
MoabUserObject.h
1 #pragma once
2 
3 // MOOSE includes
4 #include "UserObject.h"
5 #include "MaterialBase.h"
6 
7 // MOAB includes
8 #include "moab/Core.hpp"
9 #include "moab/Skinner.hpp"
10 #include "moab/GeomTopoTool.hpp"
11 #include "MBTagConventions.hpp"
12 
13 // Libmesh includes
14 #include <libmesh/elem.h>
15 #include <libmesh/enum_io_package.h>
16 #include <libmesh/enum_order.h>
17 #include <libmesh/enum_fe_family.h>
18 #include <libmesh/equation_systems.h>
19 #include <libmesh/system.h>
20 #include <libmesh/mesh_tools.h>
21 #include <libmesh/mesh_function.h>
22 
25  double rel_density;
26  double temp;
27 };
28 
29 
30 // Forward Declarations
31 class MoabUserObject;
32 
33 template <>
34 InputParameters validParams<MoabUserObject>();
35 
44 class MoabUserObject : public UserObject
45 {
46  public:
47 
48  MoabUserObject(const InputParameters & parameters);
49 
51  virtual void execute(){};
53  virtual void initialize(){};
55  virtual void finalize(){};
57  virtual void threadJoin(const UserObject & /*uo*/){};
58 
60  void setProblem(FEProblemBase * problem) {
61  if(problem==nullptr)
62  throw std::logic_error("Problem passed is null");
64  } ;
65 
67  bool hasProblem(){ return !( _problem_ptr == nullptr ); };
68 
70  FEProblemBase& problem();
71 
73  void initMOAB();
74 
76  void initBinningData();
77 
79  void reset();
80 
82  bool update();
83 
85  bool setSolution(std::string var_now,std::vector< double > &results, double scaleFactor=1., bool isErr=false, bool normToVol=true);
86 
88  void getMaterialProperties(std::vector<std::string>& mat_names_out,
89  std::vector<double>& initial_densities,
90  std::vector<std::string>& tails,
91  std::vector<MOABMaterialProperties>& properties);
92 
94  std::shared_ptr<moab::Interface> moabPtr;
95 
96 private:
97 
98  // Private types
99 
101  enum Sense { BACKWARDS=-1, FORWARDS=1};
102 
104  struct VolData{
105  moab::EntityHandle vol;
106  Sense sense;
107  };
108 
109  // Private methods
110 
112  MeshBase& mesh();
113 
115  EquationSystems & systems();
116 
118  System& system(std::string var_now);
119 
120  // Helper methods to set MOAB database
121 
123  moab::ErrorCode createNodes(std::map<dof_id_type,moab::EntityHandle>& node_id_to_handle);
125  void createElems(std::map<dof_id_type,moab::EntityHandle>& node_id_to_handle);
126 
128  moab::ErrorCode createTags();
129 
131  moab::ErrorCode createGroup(unsigned int id, std::string name,moab::EntityHandle& group_set);
132 
134  moab::ErrorCode createVol(unsigned int id,moab::EntityHandle& volume_set,moab::EntityHandle group_set);
135 
137  moab::ErrorCode createSurf(unsigned int id,moab::EntityHandle& surface_set, moab::Range& faces, std::vector<VolData> & voldata);
138 
140  moab::ErrorCode createSurfaces(moab::Range& reversed, VolData& voldata, unsigned int& surf_id);
141 
143  moab::ErrorCode createSurfaceFromBox(const BoundingBox& box, VolData& voldata, unsigned int& surf_id, bool normalout, double factor=1.0);
144 
146  moab::ErrorCode createNodesFromBox(const BoundingBox& box,double factor,std::vector<moab::EntityHandle>& vert_handles);
147 
149  moab::ErrorCode createCornerTris(const std::vector<moab::EntityHandle> & verts,
150  unsigned int corner, unsigned int v1,
151  unsigned int v2 ,unsigned int v3,
152  bool normalout, moab::Range &surface_tris);
153 
155  moab::ErrorCode createTri(const std::vector<moab::EntityHandle> & vertices,unsigned int v1, unsigned int v2 ,unsigned int v3, moab::Range &surface_tris);
156 
158  moab::ErrorCode updateSurfData(moab::EntityHandle surface_set,VolData data);
159 
161  moab::ErrorCode setTags(moab::EntityHandle ent,std::string name, std::string category, unsigned int id, int dim);
162 
164  moab::ErrorCode setTagData(moab::Tag tag, moab::EntityHandle ent, std::string data, unsigned int SIZE);
165 
167  moab::ErrorCode setTagData(moab::Tag tag, moab::EntityHandle ent, void* data);
168 
170  bool getTetSets(ElemType type, std::vector< std::vector<unsigned int> > &perms);
171 
173  moab::ErrorCode buildGraveyard(unsigned int & vol_id, unsigned int & surf_id);
174 
176  std::vector<Point> boxCoords(const BoundingBox& box, double factor);
177 
179  void findMaterials();
180 
182  void clearElemMaps();
183 
185  void addElem(dof_id_type id,moab::EntityHandle ent);
186 
188  void setSolution(unsigned int iSysNow, unsigned int iVarNow,std::vector< double > &results, double scaleFactor, bool isErr, bool normToVol);
189 
191  dof_id_type elem_to_soln_index(const Elem& elem,unsigned int iSysNow, unsigned int iVarNow);
192 
194  NumericVector<Number>& getSerialisedSolution(libMesh::System* sysPtr);
195 
197  void setMeshFunction(std::string var_name_in);
198 
200  double evalMeshFunction(std::shared_ptr<MeshFunction> meshFunctionPtr,
201  const Point& p);
202 
204  std::shared_ptr<MeshFunction> getMeshFunction(std::string var_name_in);
205 
207  bool sortElemsByResults();
208 
210  bool findSurfaces();
211 
214  void groupLocalElems(std::set<dof_id_type> elems, std::vector<moab::Range>& localElems);
215 
217  int getResultsBin(double value);
219  inline int getResultsBinLin(double value);
221  int getResultsBinLog(double value);
223  inline int getRelDensityBin(double value);
224 
226  int getSortBin(int iVarBin, int iDenBin, int iMat,
227  int nVarBinsIn, int nDenBinsIn,int nMatsIn);
230  int getSortBin(int iVarBin, int iDenBin, int iMat){
231  return getSortBin(iVarBin,iDenBin,iMat,nVarBins,nDenBins,nMatBins);
232  }
233 
235  int getMatBin(int iVarBin, int iDenBin, int nVarBinsIn, int nDenBinsIn);
238  int getMatBin(int iVarBin, int iDenBin){
239  return getMatBin(iVarBin,iDenBin,nVarBins,nDenBins);
240  }
241 
243  void calcMidpoints();
245  void calcMidpointsLin();
247  void calcMidpointsLog();
249  void calcDenMidpoints();
250 
252  void calcMidpointsLin(double var_min_in, double bin_width_in,int nbins_in,std::vector<double>& midpoints_in);
253 
255  Point elemCentroid(Elem& elem);
256 
258  void resetContainers();
259 
261  bool resetMOAB();
262 
264  bool findSurface(const moab::Range& region,moab::EntityHandle group, unsigned int & vol_id, unsigned int & surf_id,moab::EntityHandle& volume_set);
265 
267  bool write();
268 
270  void communicateDofSet(std::set<dof_id_type>& dofset);
271 
273  FEProblemBase * _problem_ptr;
274 
276  std::unique_ptr< moab::Skinner > skinner;
277 
279  std::unique_ptr< moab::GeomTopoTool > gtt;
280 
282  double lengthscale;
283 
285  double densityscale;
286 
288  std::map<dof_id_type,std::vector<moab::EntityHandle> > _id_to_elem_handles;
289 
291  moab::EntityHandle offset;
292 
293  // Data members relating to binning in temperature
294 
296  std::string var_name;
298  bool binElems;
300  bool logscale;
302  double var_min;
304  double var_max;
306  double bin_width;
308  int powMin;
310  int powMax;
312  unsigned int nVarBins;
314  unsigned int nPow;
316  unsigned int nMinor;
318  std::vector<double> midpoints;
320  std::vector<double> den_midpoints;
321 
323 
325  std::string den_var_name;
329  double rel_den_min;
331  double rel_den_max;
333  double rel_den_bw;
335  unsigned int nDenBins;
337  unsigned int nMatBins;
338 
340  std::vector<std::set<dof_id_type> > sortedElems;
341 
343  std::map<std::string, std::shared_ptr<MeshFunction> > meshFunctionPtrs;
344 
346  // N.B. For big problems this is going to be a memory bottleneck
347  // TODO: We will need to come up with a better solution
348  // Map is from systems index
349  std::map<unsigned int, std::unique_ptr<NumericVector<Number> > > serial_solutions;
350 
351  // Materials data
352 
354  std::vector<std::string> mat_names;
356  std::vector<std::string> openmc_mat_names;
358  std::vector< std::set<SubdomainID> > mat_blocks;
360  std::vector<double> initialDensities;
361 
363  moab::EntityHandle meshset;
364 
366  std::map<moab::EntityHandle, std::vector<VolData> > surfsToVols;
367 
368  // Some moab tags
369 
373  moab::Tag id_tag;
375  moab::Tag faceting_tol_tag;
379  moab::Tag category_tag;
381  moab::Tag name_tag;
382 
384  const unsigned int nNodesPerTet = 4;
385 
386  // DagMC settings
388  double faceting_tol;
390  double geom_tol;
391 
396 
397  // Settings to control the optional writing of surfaces to file.
398 
404  std::string output_base;
406  std::string output_base_full;
408  unsigned int n_output;
410  unsigned int n_period;
412  unsigned int n_write;
414  unsigned int n_its;
415 
417  PerfID _init_timer;
422 
423 };
MOABMaterialProperties
Convenience struct.
Definition: MoabUserObject.h:24
MoabUserObject::setTagData
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.
Definition: MoabUserObject.C:680
MoabUserObject::var_min
double var_min
Minimum value of our variable.
Definition: MoabUserObject.h:302
MoabUserObject::createCornerTris
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)
Definition: MoabUserObject.C:1665
MoabUserObject::setTags
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.
Definition: MoabUserObject.C:652
MoabUserObject::elemCentroid
Point elemCentroid(Elem &elem)
Return the centroid position of an element.
Definition: MoabUserObject.C:1074
MoabUserObject::mat_blocks
std::vector< std::set< SubdomainID > > mat_blocks
all element blocks assigned to mats
Definition: MoabUserObject.h:358
MoabUserObject::meshset
moab::EntityHandle meshset
An entitiy handle to represent the set of all tets.
Definition: MoabUserObject.h:363
MoabUserObject::createNodesFromBox
moab::ErrorCode createNodesFromBox(const BoundingBox &box, double factor, std::vector< moab::EntityHandle > &vert_handles)
Create MOAB nodes from a bounding box.
Definition: MoabUserObject.C:1604
MoabUserObject::_problem_ptr
FEProblemBase * _problem_ptr
Pointer to the feProblem we care about.
Definition: MoabUserObject.h:273
MoabUserObject::_id_to_elem_handles
std::map< dof_id_type, std::vector< moab::EntityHandle > > _id_to_elem_handles
Map from libmesh id to MOAB element entity handles.
Definition: MoabUserObject.h:288
MoabUserObject::openmc_mat_names
std::vector< std::string > openmc_mat_names
OpenMC material names.
Definition: MoabUserObject.h:356
MoabUserObject::getMatBin
int getMatBin(int iVarBin, int iDenBin)
Definition: MoabUserObject.h:238
MoabUserObject::VolData
Encode MOAB information about volumes needed when creating surfaces.
Definition: MoabUserObject.h:104
MoabUserObject::updateSurfData
moab::ErrorCode updateSurfData(moab::EntityHandle surface_set, VolData data)
Add parent-child metadata relating a surface to its volume.
Definition: MoabUserObject.C:633
MoabUserObject::nPow
unsigned int nPow
Number of powers of 10 to bin in for binning on a log scale.
Definition: MoabUserObject.h:314
MoabUserObject::logscale
bool logscale
Whether or not to bin in a log scale.
Definition: MoabUserObject.h:300
MoabUserObject::execute
virtual void execute()
Override MOOSE virtual method to do nothing.
Definition: MoabUserObject.h:51
MoabUserObject::getMatBin
int getMatBin(int iVarBin, int iDenBin, int nVarBinsIn, int nDenBinsIn)
Map density and temp bin indices onto a linearised index.
Definition: MoabUserObject.C:1410
MoabUserObject::skinner
std::unique_ptr< moab::Skinner > skinner
Pointer to a moab skinner for finding temperature surfaces.
Definition: MoabUserObject.h:276
MoabUserObject::densityscale
double densityscale
Convert MOOSE density units to openmc density units.
Definition: MoabUserObject.h:285
MoabUserObject::getMaterialProperties
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.
Definition: MoabUserObject.C:800
MoabUserObject::sortElemsByResults
bool sortElemsByResults()
Sort elems in to bins of a given temperature.
Definition: MoabUserObject.C:987
MoabUserObject::surfsToVols
std::map< moab::EntityHandle, std::vector< VolData > > surfsToVols
Save some topological data: map from surface handle to vol handle and sense.
Definition: MoabUserObject.h:366
MoabUserObject::createSurf
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.
Definition: MoabUserObject.C:606
MoabUserObject::write
bool write()
Write to file.
Definition: MoabUserObject.C:1168
MoabUserObject::mesh
MeshBase & mesh()
Get a modifyable reference to the underlying libmesh mesh.
Definition: MoabUserObject.C:174
MoabUserObject::_update_timer
PerfID _update_timer
Performance timer for update.
Definition: MoabUserObject.h:419
MoabUserObject::resetMOAB
bool resetMOAB()
Clear MOAB entity sets.
MoabUserObject::faceting_tol_tag
moab::Tag faceting_tol_tag
Tag for faceting tolerance.
Definition: MoabUserObject.h:375
MoabUserObject::output_base_full
std::string output_base_full
Base name of full database output file.
Definition: MoabUserObject.h:406
MoabUserObject::calcDenMidpoints
void calcDenMidpoints()
Calculate the density evaluated at the bin midpoints.
Definition: MoabUserObject.C:1431
MoabUserObject::getSortBin
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.
Definition: MoabUserObject.C:1383
MoabUserObject::n_its
unsigned int n_its
Store the number of times writeSurfaces is called.
Definition: MoabUserObject.h:414
MoabUserObject::n_period
unsigned int n_period
Period of writes (skip every n_period -1)
Definition: MoabUserObject.h:410
MoabUserObject::getSortBin
int getSortBin(int iVarBin, int iDenBin, int iMat)
Definition: MoabUserObject.h:230
MoabUserObject::calcMidpointsLog
void calcMidpointsLog()
Calculate the variable evaluated at the bin midpoints for log binning.
Definition: MoabUserObject.C:1364
MoabUserObject::findMaterials
void findMaterials()
Look for materials in the FE problem.
Definition: MoabUserObject.C:281
MoabUserObject::geometry_dimension_tag
moab::Tag geometry_dimension_tag
Tag for dimension for geometry.
Definition: MoabUserObject.h:371
MoabUserObject::Sense
Sense
Encode the whether the surface normal faces into or out of the volume.
Definition: MoabUserObject.h:101
MoabUserObject::getRelDensityBin
int getRelDensityBin(double value)
Return the bin index of a given relative density.
Definition: MoabUserObject.C:1377
MoabUserObject::name_tag
moab::Tag name_tag
Tag for name of entity set.
Definition: MoabUserObject.h:381
MoabUserObject::initialDensities
std::vector< double > initialDensities
vector for initial densities if binning by density
Definition: MoabUserObject.h:360
MoabUserObject::createSurfaceFromBox
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.
Definition: MoabUserObject.C:1575
MoabUserObject::_init_timer
PerfID _init_timer
Performance timer for initialisation.
Definition: MoabUserObject.h:417
MoabUserObject::systems
EquationSystems & systems()
Get a modifyable reference to the underlying libmesh equation systems.
Definition: MoabUserObject.C:183
MoabUserObject::createTags
moab::ErrorCode createTags()
Helper method to create MOAB tags.
Definition: MoabUserObject.C:543
MoabUserObject::nDenBins
unsigned int nDenBins
Number of relative density bins.
Definition: MoabUserObject.h:335
MoabUserObject::den_midpoints
std::vector< double > den_midpoints
Store the relative density corresponding to the bin mipoint.
Definition: MoabUserObject.h:320
MoabUserObject::nNodesPerTet
const unsigned int nNodesPerTet
Const to encode that MOAB tets have 4 nodes.
Definition: MoabUserObject.h:384
MoabUserObject::binElems
bool binElems
Whether or not to perform binning.
Definition: MoabUserObject.h:298
MoabUserObject::hasProblem
bool hasProblem()
Check if problem has been set.
Definition: MoabUserObject.h:67
MoabUserObject::offset
moab::EntityHandle offset
Save the first tet entity handle.
Definition: MoabUserObject.h:291
MoabUserObject::geometry_resabs_tag
moab::Tag geometry_resabs_tag
Tag needed by DAGMC.
Definition: MoabUserObject.h:377
MoabUserObject::powMin
int powMin
Minimum power of 10.
Definition: MoabUserObject.h:308
MoabUserObject::problem
FEProblemBase & problem()
Get a reference to the FE problem.
Definition: MoabUserObject.C:165
MoabUserObject::getResultsBinLin
int getResultsBinLin(double value)
Find results bin if we have linear binning.
Definition: MoabUserObject.C:1322
MoabUserObject::resetContainers
void resetContainers()
Clear the containers of elements grouped into bins of constant temp.
Definition: MoabUserObject.C:1278
MoabUserObject::initMOAB
void initMOAB()
Initialise MOAB.
Definition: MoabUserObject.C:195
MoabUserObject::initBinningData
void initBinningData()
Intialise objects needed to perform binning of elements.
Definition: MoabUserObject.C:872
MoabUserObject::groupLocalElems
void groupLocalElems(std::set< dof_id_type > elems, std::vector< moab::Range > &localElems)
Definition: MoabUserObject.C:1207
MoabUserObject::powMax
int powMax
Maximum power of 10.
Definition: MoabUserObject.h:310
MoabUserObject::createTri
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.
Definition: MoabUserObject.C:1694
MoabUserObject::rel_den_max
double rel_den_max
Max relative density diff.
Definition: MoabUserObject.h:331
MoabUserObject::getResultsBinLog
int getResultsBinLog(double value)
Find results bin if we have logarithmic.
Definition: MoabUserObject.C:1328
MoabUserObject::boxCoords
std::vector< Point > boxCoords(const BoundingBox &box, double factor)
Get the coords of the box back as an array (possibly scaled)
Definition: MoabUserObject.C:1632
MoabUserObject::buildGraveyard
moab::ErrorCode buildGraveyard(unsigned int &vol_id, unsigned int &surf_id)
Build the graveyard (needed by OpenMC)
Definition: MoabUserObject.C:1542
MoabUserObject::findSurface
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.
Definition: MoabUserObject.C:1448
MoabUserObject::lengthscale
double lengthscale
Convert MOOSE units to dagmc length units.
Definition: MoabUserObject.h:282
MoabUserObject::scalefactor_outer
double scalefactor_outer
Scalefactors applied to bounding box for outer surface of graveyard.
Definition: MoabUserObject.h:395
MoabUserObject::mat_names
std::vector< std::string > mat_names
material names
Definition: MoabUserObject.h:354
MoabUserObject::reset
void reset()
Clear mesh data.
Definition: MoabUserObject.C:1301
MoabUserObject::getSerialisedSolution
NumericVector< Number > & getSerialisedSolution(libMesh::System *sysPtr)
Get a serialised version of solution for a given system.
Definition: MoabUserObject.C:885
MoabUserObject::createVol
moab::ErrorCode createVol(unsigned int id, moab::EntityHandle &volume_set, moab::EntityHandle group_set)
Helper method to create MOAB volume entity set.
Definition: MoabUserObject.C:590
MoabUserObject::clearElemMaps
void clearElemMaps()
Clear the maps between entity handles and dof ids.
Definition: MoabUserObject.C:698
MoabUserObject::binByDensity
bool binByDensity
Switch to determine if we should bin by material density.
Definition: MoabUserObject.h:327
MoabUserObject::elem_to_soln_index
dof_id_type elem_to_soln_index(const Elem &elem, unsigned int iSysNow, unsigned int iVarNow)
Helper method to convert between elem / solution indices.
Definition: MoabUserObject.C:857
MoabUserObject::bin_width
double bin_width
Fixed bin width for binning on a linear scale.
Definition: MoabUserObject.h:306
MoabUserObject::n_output
unsigned int n_output
Number of times to write to file.
Definition: MoabUserObject.h:408
MoabUserObject::moabPtr
std::shared_ptr< moab::Interface > moabPtr
Publically available pointer to MOAB interface.
Definition: MoabUserObject.h:94
MoabUserObject::nVarBins
unsigned int nVarBins
Number of variable bins to use.
Definition: MoabUserObject.h:312
MoabUserObject::rel_den_min
double rel_den_min
Minimum relative density diff.
Definition: MoabUserObject.h:329
MoabUserObject::nMatBins
unsigned int nMatBins
Number of distinct subdomains (e.g. vols, mats)
Definition: MoabUserObject.h:337
MoabUserObject::setSolution
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.
Definition: MoabUserObject.C:251
MoabUserObject::finalize
virtual void finalize()
Override MOOSE virtual method to do nothing.
Definition: MoabUserObject.h:55
MoabUserObject::createSurfaces
moab::ErrorCode createSurfaces(moab::Range &reversed, VolData &voldata, unsigned int &surf_id)
Helper method to create MOAB surfaces with no overlaps.
Definition: MoabUserObject.C:1481
MoabUserObject::midpoints
std::vector< double > midpoints
Store the temperature corresponding to the bin mipoint.
Definition: MoabUserObject.h:318
MoabUserObject::createGroup
moab::ErrorCode createGroup(unsigned int id, std::string name, moab::EntityHandle &group_set)
Helper method to create MOAB group entity set.
Definition: MoabUserObject.C:578
MoabUserObject::meshFunctionPtrs
std::map< std::string, std::shared_ptr< MeshFunction > > meshFunctionPtrs
A map to store mesh functions against their variable name.
Definition: MoabUserObject.h:343
MoabUserObject::var_max
double var_max
Maximum value of our variable for binning on a linear scale.
Definition: MoabUserObject.h:304
MoabUserObject
UserObject class which wraps a moab::Interface pointer.
Definition: MoabUserObject.h:44
MoabUserObject::output_base
std::string output_base
Base name of skins output file.
Definition: MoabUserObject.h:404
MoabUserObject::output_full
bool output_full
Flag to control whether to output the full MOAB mesh database.
Definition: MoabUserObject.h:402
MoabUserObject::update
bool update()
Update MOAB with any results from MOOSE.
Definition: MoabUserObject.C:229
MoabUserObject::evalMeshFunction
double evalMeshFunction(std::shared_ptr< MeshFunction > meshFunctionPtr, const Point &p)
Evaluate a mesh function at a point.
Definition: MoabUserObject.C:946
MoabUserObject::_setsolution_timer
PerfID _setsolution_timer
Performance timer for setSolution.
Definition: MoabUserObject.h:421
MoabUserObject::getMeshFunction
std::shared_ptr< MeshFunction > getMeshFunction(std::string var_name_in)
Fetch the mesh function associated with a variable.
Definition: MoabUserObject.C:970
MoabUserObject::nMinor
unsigned int nMinor
Number of minor divisions for binning on a log scale.
Definition: MoabUserObject.h:316
MoabUserObject::id_tag
moab::Tag id_tag
Tag for entitiy set ID.
Definition: MoabUserObject.h:373
MoabUserObject::threadJoin
virtual void threadJoin(const UserObject &)
Override MOOSE virtual method to do nothing.
Definition: MoabUserObject.h:57
MoabUserObject::den_var_name
std::string den_var_name
Data members relating to binning in density.
Definition: MoabUserObject.h:325
MoabUserObject::getResultsBin
int getResultsBin(double value)
Given a value of our variable, find what bin this corresponds to.
Definition: MoabUserObject.C:1315
MoabUserObject::calcMidpointsLin
void calcMidpointsLin()
Calculate the variable evaluated at the bin midpoints for linear binning.
Definition: MoabUserObject.C:1358
MoabUserObject::findSurfaces
bool findSurfaces()
Group the binned elems into local temperature regions and find their surfaces.
Definition: MoabUserObject.C:1093
MoabUserObject::gtt
std::unique_ptr< moab::GeomTopoTool > gtt
Pointer for gtt for setting surface sense.
Definition: MoabUserObject.h:279
MoabUserObject::createElems
void createElems(std::map< dof_id_type, moab::EntityHandle > &node_id_to_handle)
Helper method to create MOAB elements.
Definition: MoabUserObject.C:409
MoabUserObject::setMeshFunction
void setMeshFunction(std::string var_name_in)
Create and save a mesh function for the provided variable.
Definition: MoabUserObject.C:912
MoabUserObject::initialize
virtual void initialize()
Override MOOSE virtual method to do nothing.
Definition: MoabUserObject.h:53
MoabUserObject::output_skins
bool output_skins
Flag to control whether to save surface skins to file.
Definition: MoabUserObject.h:400
MoabUserObject::createNodes
moab::ErrorCode createNodes(std::map< dof_id_type, moab::EntityHandle > &node_id_to_handle)
Helper method to create MOAB nodes.
Definition: MoabUserObject.C:364
MoabUserObject::var_name
std::string var_name
Name of the MOOSE variable.
Definition: MoabUserObject.h:296
MoabUserObject::communicateDofSet
void communicateDofSet(std::set< dof_id_type > &dofset)
MPI communication of DOFs of binned elements.
Definition: MoabUserObject.C:1087
MoabUserObject::calcMidpoints
void calcMidpoints()
Calculate the variable evaluated at the bin midpoints.
Definition: MoabUserObject.C:1350
MoabUserObject::addElem
void addElem(dof_id_type id, moab::EntityHandle ent)
Add an element to maps.
Definition: MoabUserObject.C:705
MoabUserObject::getTetSets
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.
Definition: MoabUserObject.C:506
MoabUserObject::geom_tol
double geom_tol
Geometry tolerence needed by DAGMC.
Definition: MoabUserObject.h:390
MoabUserObject::sortedElems
std::vector< std::set< dof_id_type > > sortedElems
Container for elems sorted by variable bin and materials.
Definition: MoabUserObject.h:340
MoabUserObject::serial_solutions
std::map< unsigned int, std::unique_ptr< NumericVector< Number > > > serial_solutions
A place to store the entire solution.
Definition: MoabUserObject.h:349
MoabUserObject::category_tag
moab::Tag category_tag
Tag for type of entity set.
Definition: MoabUserObject.h:379
MoabUserObject::faceting_tol
double faceting_tol
Faceting tolerence needed by DAGMC.
Definition: MoabUserObject.h:388
MoabUserObject::system
System & system(std::string var_now)
Get a modifyable reference to the underlying libmesh system.
Definition: MoabUserObject.C:189
MoabUserObject::rel_den_bw
double rel_den_bw
Relative density diff bin width.
Definition: MoabUserObject.h:333
MoabUserObject::setProblem
void setProblem(FEProblemBase *problem)
Pass in the FE Problem.
Definition: MoabUserObject.h:60
MoabUserObject::scalefactor_inner
double scalefactor_inner
Scalefactors applied to bounding box for inner surface of graveyard.
Definition: MoabUserObject.h:393
MoabUserObject::n_write
unsigned int n_write
Count number of times file has been written to.
Definition: MoabUserObject.h:412