www.mooseframework.org
ElementUserObject.C
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://www.mooseframework.org
3 //*
4 //* All rights reserved, see COPYRIGHT for full restrictions
5 //* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6 //*
7 //* Licensed under LGPL 2.1, please see LICENSE for details
8 //* https://www.gnu.org/licenses/lgpl-2.1.html
9 
10 #include "ElementUserObject.h"
11 #include "MooseVariableFE.h"
12 #include "SubProblem.h"
13 #include "Assembly.h"
14 
15 #include "libmesh/elem.h"
16 
19 {
24  params += RandomInterface::validParams();
25  return params;
26 }
27 
29  : UserObject(parameters),
30  BlockRestrictable(this),
32  Coupleable(this, false),
34  TransientInterface(this),
35  RandomInterface(parameters, _fe_problem, _tid, false),
36  ElementIDInterface(this),
37  _mesh(_subproblem.mesh()),
38  _current_elem(_assembly.elem()),
39  _current_elem_volume(_assembly.elemVolume()),
40  _q_point(_assembly.qPoints()),
41  _qrule(_assembly.qRule()),
42  _JxW(_assembly.JxW()),
43  _coord(_assembly.coordTransformation())
44 {
45  // Keep track of which variables are coupled so we know what we depend on
46  const std::vector<MooseVariableFEBase *> & coupled_vars = getCoupledMooseVars();
47  for (const auto & var : coupled_vars)
49 }
Interface for objects that need parallel consistent random numbers without patterns over the course o...
static InputParameters validParams()
MeshBase & mesh
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
static InputParameters validParams()
static InputParameters validParams()
static InputParameters validParams()
Interface for objects that needs transient capabilities.
static InputParameters validParams()
const std::vector< MooseVariableFieldBase * > & getCoupledMooseVars() const
Get the list of all coupled variables.
Definition: Coupleable.h:70
Interface for objects that needs coupling capabilities.
Definition: Coupleable.h:45
void addMooseVariableDependency(MooseVariableFieldBase *var)
Call this function to add the passed in MooseVariableFieldBase as a variable that this object depends...
An interface for accessing Materials.
const std::set< BoundaryID > EMPTY_BOUNDARY_IDS
Definition: MooseTypes.h:597
An interface that restricts an object to subdomains via the &#39;blocks&#39; input parameter.
ElementUserObject(const InputParameters &parameters)
MOOSE now contains C++17 code, so give a reasonable error message stating what the user can do to add...
Base class for user-specific data.
Definition: UserObject.h:39
static InputParameters validParams()
Definition: UserObject.C:18