www.mooseframework.org
ElementUserObject.C
Go to the documentation of this file.
1 /****************************************************************/
2 /* DO NOT MODIFY THIS HEADER */
3 /* MOOSE - Multiphysics Object Oriented Simulation Environment */
4 /* */
5 /* (c) 2010 Battelle Energy Alliance, LLC */
6 /* ALL RIGHTS RESERVED */
7 /* */
8 /* Prepared by Battelle Energy Alliance, LLC */
9 /* Under Contract No. DE-AC07-05ID14517 */
10 /* With the U. S. Department of Energy */
11 /* */
12 /* See COPYRIGHT for full restrictions */
13 /****************************************************************/
14 
15 #include "ElementUserObject.h"
16 #include "MooseVariable.h"
17 #include "SubProblem.h"
18 #include "Assembly.h"
19 
20 #include "libmesh/elem.h"
21 
22 template <>
25 {
30  params += validParams<RandomInterface>();
31  return params;
32 }
33 
35  : UserObject(parameters),
36  BlockRestrictable(this),
37  MaterialPropertyInterface(this, blockIDs()),
38  UserObjectInterface(this),
39  Coupleable(this, false),
41  TransientInterface(this),
43  RandomInterface(parameters, _fe_problem, _tid, false),
44  ZeroInterface(parameters),
45  _mesh(_subproblem.mesh()),
46  _current_elem(_assembly.elem()),
47  _current_elem_volume(_assembly.elemVolume()),
48  _q_point(_assembly.qPoints()),
49  _qrule(_assembly.qRule()),
50  _JxW(_assembly.JxW()),
51  _coord(_assembly.coordTransformation())
52 {
53  // Keep track of which variables are coupled so we know what we depend on
54  const std::vector<MooseVariable *> & coupled_vars = getCoupledMooseVars();
55  for (const auto & var : coupled_vars)
57 }
InputParameters validParams< MaterialPropertyInterface >()
Interface for objects that need parallel consistent random numbers without patterns over the course o...
InputParameters validParams< BlockRestrictable >()
const std::vector< MooseVariable * > & getCoupledMooseVars() const
Get the list of coupled variables.
Definition: Coupleable.h:63
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
void addMooseVariableDependency(MooseVariable *var)
Call this function to add the passed in MooseVariable as a variable that this object depends on...
InputParameters validParams< ElementUserObject >()
Interface for objects that needs transient capabilities.
InputParameters validParams< RandomInterface >()
InputParameters validParams< UserObject >()
Definition: UserObject.C:23
Interface for objects that need to use UserObjects.
Interface for objects that needs coupling capabilities.
Definition: Coupleable.h:35
Interface to bring zero values inside objects.
Definition: ZeroInterface.h:35
An interface for accessing Materials.
An interface that restricts an object to subdomains via the &#39;blocks&#39; input parameter.
ElementUserObject(const InputParameters &parameters)
InputParameters validParams< TransientInterface >()
Base class for user-specific data.
Definition: UserObject.h:42
Interface class for classes which interact with Postprocessors.