https://mooseframework.inl.gov
AuxKernel.C
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://mooseframework.inl.gov
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 "AuxKernel.h"
11 
12 // local includes
13 #include "FEProblem.h"
14 #include "SubProblem.h"
15 #include "AuxiliarySystem.h"
16 #include "MooseTypes.h"
17 #include "Assembly.h"
18 #include "MortarNodalAuxKernel.h"
19 
20 #include "libmesh/numeric_vector.h"
21 #include "libmesh/dof_map.h"
22 #include "libmesh/quadrature.h"
23 #include "libmesh/boundary_info.h"
24 
25 template <typename ComputeValueType>
28 {
32  params += RandomInterface::validParams();
36 
37  // Add the SetupInterface parameter 'execute_on' with 'linear' and 'timestep_end'
38  params += SetupInterface::validParams();
39  ExecFlagEnum & exec_enum = params.set<ExecFlagEnum>("execute_on", true);
41  exec_enum = {EXEC_LINEAR, EXEC_TIMESTEP_END};
42  params.setDocString("execute_on", exec_enum.getDocString());
43 
44  params.addRequiredParam<AuxVariableName>("variable",
45  "The name of the variable that this object applies to");
46 
47  params.addParam<bool>("use_displaced_mesh",
48  false,
49  "Whether or not this object should use the "
50  "displaced mesh for computation. Note that "
51  "in the case this is true but no "
52  "displacements are provided in the Mesh block "
53  "the undisplaced mesh will still be used.");
54  params.addParamNamesToGroup("use_displaced_mesh", "Advanced");
55  params.addParam<bool>("check_boundary_restricted",
56  true,
57  "Whether to check for multiple element sides on the boundary "
58  "in the case of a boundary restricted, element aux variable. "
59  "Setting this to false will allow contribution to a single element's "
60  "elemental value(s) from multiple boundary sides on the same element "
61  "(example: when the restricted boundary exists on two or more sides "
62  "of an element, such as at a corner of a mesh");
63 
64  // This flag is set to true if the AuxKernelTempl is being used on a boundary
65  params.addPrivateParam<bool>("_on_boundary", false);
66 
67  params.addRelationshipManager("GhostLowerDElems",
70 
71  params.declareControllable("enable"); // allows Control to enable/disable this type of object
72  params.registerBase("AuxKernel");
73  params.registerSystemAttributeName("AuxKernel");
74 
75  if (typeid(AuxKernelTempl<ComputeValueType>).name() == typeid(VectorAuxKernel).name())
76  params.registerBase("VectorAuxKernel");
77  if (typeid(AuxKernelTempl<ComputeValueType>).name() == typeid(ArrayAuxKernel).name())
78  params.registerBase("ArrayAuxKernel");
79  return params;
80 }
81 
82 template <typename ComputeValueType>
84  : MooseObject(parameters),
85  MooseVariableInterface<ComputeValueType>(
86  this,
87  parameters.getCheckedPointerParam<SystemBase *>("_sys")
88  ->getVariable(parameters.get<THREAD_ID>("_tid"),
89  parameters.get<AuxVariableName>("variable"))
90  .isNodal(),
91  "variable",
93  std::is_same<Real, ComputeValueType>::value
95  : (std::is_same<RealVectorValue, ComputeValueType>::value
98  BlockRestrictable(this),
99  BoundaryRestrictable(this, mooseVariableBase()->isNodal()),
100  SetupInterface(this),
101  CoupleableMooseVariableDependencyIntermediateInterface(this, mooseVariableBase()->isNodal()),
102  FunctionInterface(this),
103  UserObjectInterface(this),
104  TransientInterface(this),
105  MaterialPropertyInterface(this, blockIDs(), boundaryIDs()),
108  RandomInterface(parameters,
109  *parameters.getCheckedPointerParam<FEProblemBase *>("_fe_problem_base"),
110  parameters.get<THREAD_ID>("_tid"),
111  mooseVariableBase()->isNodal()),
113  Restartable(this, "AuxKernels"),
114  MeshChangedInterface(parameters),
116  ElementIDInterface(this),
117  NonADFunctorInterface(this),
118  _check_boundary_restricted(getParam<bool>("check_boundary_restricted")),
119  _subproblem(*getCheckedPointerParam<SubProblem *>("_subproblem")),
120  _sys(*getCheckedPointerParam<SystemBase *>("_sys")),
121  _nl_sys(*getCheckedPointerParam<SystemBase *>("_nl_sys")),
122  _aux_sys(static_cast<AuxiliarySystem &>(_sys)),
123  _tid(parameters.get<THREAD_ID>("_tid")),
124  _var(_aux_sys.getActualFieldVariable<ComputeValueType>(
125  _tid, parameters.get<AuxVariableName>("variable"))),
126  _nodal(_var.isNodal()),
127  _u(_nodal ? _var.nodalValueArray() : _var.sln()),
128 
129  _assembly(_subproblem.assembly(_tid, 0)),
130  _bnd(boundaryRestricted()),
131  _mesh(_subproblem.mesh()),
132 
133  _test(_bnd ? _var.phiFace() : _var.phi()),
134  _q_point(_bnd ? _assembly.qPointsFace() : _assembly.qPoints()),
135  _qrule(_bnd ? _assembly.qRuleFace() : _assembly.qRule()),
136  _JxW(_bnd ? _assembly.JxWFace() : _assembly.JxW()),
137  _coord(_assembly.coordTransformation()),
138 
139  _current_elem(_assembly.elem()),
140  _current_side(_assembly.side()),
141  _current_elem_volume(_assembly.elemVolume()),
142  _current_side_volume(_assembly.sideElemVolume()),
143 
144  _current_node(_assembly.node()),
145  _current_boundary_id(_assembly.currentBoundaryID()),
146  _solution(_aux_sys.solution()),
147 
148  _current_lower_d_elem(_assembly.lowerDElem()),
149  _coincident_lower_d_calc(_bnd && !isNodal() && _var.isLowerD())
150 {
152  _supplied_vars.insert(parameters.get<AuxVariableName>("variable"));
153 
155  {
156  // when the variable is elemental and this aux kernel operates on boundaries,
157  // we need to check that no elements are visited more than once through visiting
158  // all the sides on the boundaries
159  auto boundaries = _mesh.getMesh().get_boundary_info().build_side_list();
160  std::set<dof_id_type> elements;
161  for (const auto & t : boundaries)
162  {
163  if (hasBoundary(std::get<2>(t)))
164  {
165  const auto eid = std::get<0>(t);
166  const auto stat = elements.insert(eid);
167  if (!stat.second) // already existed in the set
168  mooseError(
169  "Boundary restricted auxiliary kernel '",
170  name(),
171  "' has element (id=",
172  eid,
173  ") connected with more than one boundary sides.\nTo skip this error check, "
174  "set 'check_boundary_restricted = false'.\nRefer to the AuxKernel "
175  "documentation on boundary restricted aux kernels for understanding this error.");
176  }
177  }
178  }
179 
180  // Check for supported variable types
181  // Any 'nodal' family that actually has DoFs outside of nodes, or gradient dofs at nodes is
182  // not properly set by AuxKernelTempl::compute
183  // NOTE: We could add a few exceptions, lower order from certain unsupported families and on
184  // certain element types only have value-DoFs on nodes
185  const auto type = _var.feType();
186  if (_var.isNodal() && !((type.family == LAGRANGE) || (type.order <= FIRST)))
187  paramError("variable",
188  "Variable family " + Moose::stringify(type.family) + " is not supported at order " +
189  Moose::stringify(type.order) + " by the AuxKernel system.");
190 }
191 
192 template <typename ComputeValueType>
193 const std::set<std::string> &
195 {
196  return _depend_vars;
197 }
198 
199 template <typename ComputeValueType>
200 const std::set<std::string> &
202 {
203  return _supplied_vars;
204 }
205 
206 template <typename ComputeValueType>
207 void
209 {
210  _depend_uo.insert(uo.name());
211  for (const auto & indirect_dependent : uo.getDependObjects())
212  _depend_uo.insert(indirect_dependent);
213 }
214 
215 template <typename ComputeValueType>
216 void
218  const PostprocessorName & name) const
219 {
220  getUserObjectBaseByName(name); // getting the UO will call addUserObjectDependencyHelper()
221 }
222 
223 template <typename ComputeValueType>
224 void
226  const VectorPostprocessorName & name) const
227 {
228  getUserObjectBaseByName(name); // getting the UO will call addUserObjectDependencyHelper()
229 }
230 
231 template <typename ComputeValueType>
232 void
233 AuxKernelTempl<ComputeValueType>::coupledCallback(const std::string & var_name, bool is_old) const
234 {
235  if (!is_old)
236  {
237  const auto & var_names = getParam<std::vector<VariableName>>(var_name);
238  _depend_vars.insert(var_names.begin(), var_names.end());
239  }
240 }
241 
242 template <typename ComputeValueType>
243 const VariableValue &
244 AuxKernelTempl<ComputeValueType>::coupledDot(const std::string & var_name, unsigned int comp) const
245 {
246  auto var = getVar(var_name, comp);
247  if (var->kind() == Moose::VAR_AUXILIARY)
248  mooseError(
249  name(),
250  ": Unable to couple time derivative of an auxiliary variable into the auxiliary system.");
251 
252  return Coupleable::coupledDot(var_name, comp);
253 }
254 
255 template <typename ComputeValueType>
256 const VariableValue &
258  unsigned int comp) const
259 {
260  auto var = getVar(var_name, comp);
261  if (var->kind() == Moose::VAR_AUXILIARY)
262  mooseError(
263  name(),
264  ": Unable to couple time derivative of an auxiliary variable into the auxiliary system.");
265 
266  return Coupleable::coupledDotDu(var_name, comp);
267 }
268 
269 template <>
270 void
271 AuxKernelTempl<Real>::setDofValueHelper(const Real & value)
272 {
273  mooseAssert(_n_local_dofs == 1,
274  "Should only be calling setDofValue if there is one dof for the aux var");
275  _var.setDofValue(value, 0);
276 }
277 
278 template <>
279 void
281 {
282  mooseError("Not implemented");
283 }
284 
285 template <typename ComputeValueType>
286 void
288 {
289  if (_coincident_lower_d_calc)
290  _var.insertLower(_aux_sys.solution());
291  else
292  _var.insert(_aux_sys.solution());
293 }
294 
295 template <typename ComputeValueType>
296 void
298 {
299  precalculateValue();
300 
301  if (isNodal()) /* nodal variables */
302  {
303  mooseAssert(!_coincident_lower_d_calc,
304  "Nodal evaluations are point evaluations. We don't have to concern ourselves with "
305  "coincidence of lower-d blocks and higher-d faces because they share nodes");
306  if (_var.isNodalDefined())
307  {
308  _qp = 0;
309  ComputeValueType value = computeValue();
310  // update variable data, which is referenced by other kernels, so the value is up-to-date
311  _var.setNodalValue(value);
312  }
313  }
314  else /* elemental variables */
315  {
316  _n_local_dofs = _coincident_lower_d_calc ? _var.dofIndicesLower().size() : _var.numberOfDofs();
317 
318  if (_coincident_lower_d_calc)
319  {
320  static const std::string lower_error = "Make sure that the lower-d variable lives on a "
321  "lower-d block that is a superset of the boundary";
322  if (!_current_lower_d_elem)
323  mooseError("No lower-dimensional element. ", lower_error);
324  if (!_n_local_dofs)
325  mooseError("No degrees of freedom. ", lower_error);
326  }
327 
328  if (_n_local_dofs == 1) /* p0 */
329  {
330  ComputeValueType value = 0;
331  for (_qp = 0; _qp < _qrule->n_points(); _qp++)
332  value += _JxW[_qp] * _coord[_qp] * computeValue();
333  value /= (_bnd ? _current_side_volume : _current_elem_volume);
334  if (_var.isFV())
335  setDofValueHelper(value);
336  else
337  {
338  // update the variable data referenced by other kernels.
339  // Note that this will update the values at the quadrature points too
340  // (because this is an Elemental variable)
341  if (_coincident_lower_d_calc)
342  {
343  _local_sol.resize(1);
344  if constexpr (std::is_same<Real, ComputeValueType>::value)
345  _local_sol(0) = value;
346  else
347  mooseAssert(false, "We should not enter the single dof branch with a vector variable");
348  _var.setLowerDofValues(_local_sol);
349  }
350  else
351  _var.setNodalValue(value);
352  }
353  }
354  else /* high-order */
355  {
356  _local_re.resize(_n_local_dofs);
357  _local_re.zero();
358  _local_ke.resize(_n_local_dofs, _n_local_dofs);
359  _local_ke.zero();
360 
361  const auto & test = _coincident_lower_d_calc ? _var.phiLower() : _test;
362 
363  // assemble the local mass matrix and the load
364  for (unsigned int i = 0; i < test.size(); i++)
365  for (_qp = 0; _qp < _qrule->n_points(); _qp++)
366  {
367  ComputeValueType t = _JxW[_qp] * _coord[_qp] * test[i][_qp];
368  _local_re(i) += t * computeValue();
369  for (unsigned int j = 0; j < test.size(); j++)
370  _local_ke(i, j) += t * test[j][_qp];
371  }
372  // mass matrix is always SPD but in case of boundary restricted, it will be rank deficient
373  _local_sol.resize(_n_local_dofs);
374  if (_bnd)
375  _local_ke.svd_solve(_local_re, _local_sol);
376  else
377  _local_ke.cholesky_solve(_local_re, _local_sol);
378 
379  _coincident_lower_d_calc ? _var.setLowerDofValues(_local_sol) : _var.setDofValues(_local_sol);
380  }
381  }
382 }
383 
384 template <>
385 void
387 {
388  precalculateValue();
389 
390  if (isNodal()) /* nodal variables */
391  {
392  if (_var.isNodalDefined())
393  {
394  _qp = 0;
395  RealEigenVector value = computeValue();
396  // update variable data, which is referenced by other kernels, so the value is up-to-date
397  _var.setNodalValue(value);
398  }
399  }
400  else /* elemental variables */
401  {
402  _n_local_dofs = _var.numberOfDofs();
403  if (_n_local_dofs == 1) /* p0 */
404  {
405  RealEigenVector value = RealEigenVector::Zero(_var.count());
406  for (_qp = 0; _qp < _qrule->n_points(); _qp++)
407  value += _JxW[_qp] * _coord[_qp] * computeValue();
408  value /= (_bnd ? _current_side_volume : _current_elem_volume);
409  // update the variable data referenced by other kernels.
410  // Note that this will update the values at the quadrature points too
411  // (because this is an Elemental variable)
412  _var.setNodalValue(value);
413  }
414  else /* high-order */
415  {
416  _local_re.resize(_n_local_dofs);
417  for (unsigned int i = 0; i < _local_re.size(); ++i)
418  _local_re(i) = RealEigenVector::Zero(_var.count());
419  _local_ke.resize(_n_local_dofs, _n_local_dofs);
420  _local_ke.zero();
421 
422  // assemble the local mass matrix and the load
423  for (unsigned int i = 0; i < _test.size(); i++)
424  for (_qp = 0; _qp < _qrule->n_points(); _qp++)
425  {
426  Real t = _JxW[_qp] * _coord[_qp] * _test[i][_qp];
427  _local_re(i) += t * computeValue();
428  for (unsigned int j = 0; j < _test.size(); j++)
429  _local_ke(i, j) += t * _test[j][_qp];
430  }
431 
432  // mass matrix is always SPD
433  _local_sol.resize(_n_local_dofs);
434  for (unsigned int i = 0; i < _local_re.size(); ++i)
435  _local_sol(i) = RealEigenVector::Zero(_var.count());
436  DenseVector<Number> re(_n_local_dofs);
437  DenseVector<Number> sol(_n_local_dofs);
438  for (unsigned int i = 0; i < _var.count(); ++i)
439  {
440  for (unsigned int j = 0; j < _n_local_dofs; ++j)
441  re(j) = _local_re(j)(i);
442 
443  if (_bnd)
444  _local_ke.svd_solve(re, sol);
445  else
446  _local_ke.cholesky_solve(re, sol);
447 
448  for (unsigned int j = 0; j < _n_local_dofs; ++j)
449  _local_sol(j)(i) = sol(j);
450  }
451 
452  _var.setDofValues(_local_sol);
453  }
454  }
455 }
456 
457 template <typename ComputeValueType>
460 {
461  if (_sys.solutionStatesInitialized())
462  mooseError("The solution states have already been initialized when calling ",
463  type(),
464  "::uOld().\n\n",
465  "Make sure to call uOld() within the object constructor.");
466 
467  return _nodal ? _var.nodalValueOldArray() : _var.slnOld();
468 }
469 
470 template <typename ComputeValueType>
473 {
474  if (_sys.solutionStatesInitialized())
475  mooseError("The solution states have already been initialized when calling ",
476  type(),
477  "::uOlder().\n\n",
478  "Make sure to call uOlder() within the object constructor.");
479 
480  return _nodal ? _var.nodalValueOlderArray() : _var.slnOlder();
481 }
482 
483 template <typename ComputeValueType>
484 bool
486 {
487  return dynamic_cast<MortarNodalAuxKernelTempl<ComputeValueType> *>(this) != nullptr;
488 }
489 
490 // Explicitly instantiates the three versions of the AuxKernelTempl class
491 template class AuxKernelTempl<Real>;
492 template class AuxKernelTempl<RealVectorValue>;
493 template class AuxKernelTempl<RealEigenVector>;
An interface for accessing Moose::Functors for systems that do not care about automatic differentiati...
std::string name(const ElemQuality q)
Interface for objects that need parallel consistent random numbers without patterns over the course o...
LAGRANGE
VarFieldType
Definition: MooseTypes.h:721
virtual bool isNodal() const
Is this variable nodal.
const libMesh::FEType & feType() const
Get the type of finite element object.
A MultiMooseEnum object to hold "execute_on" flags.
Definition: ExecFlagEnum.h:21
A class for creating restricted objects.
Definition: Restartable.h:28
void setDocString(const std::string &name, const std::string &doc)
Set the doc string of a parameter.
MooseMesh & _mesh
Mesh this kernel is active on.
Definition: AuxKernel.h:188
void addPrivateParam(const std::string &name, const T &value)
These method add a parameter to the InputParameters object which can be retrieved like any other para...
const OutputTools< ComputeValueType >::VariableValue & uOlder() const
Retrieves the older value of the variable that this AuxKernel operates on.
Definition: AuxKernel.C:472
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302
std::vector< std::pair< R1, R2 > > get(const std::string &param1, const std::string &param2) const
Combine two vector parameters into a single vector of pairs.
void addPostprocessorDependencyHelper(const PostprocessorName &name) const override final
Helper for deriving classes to override to add dependencies when a Postprocessor is requested...
Definition: AuxKernel.C:217
FIRST
T * get(const std::unique_ptr< T > &u)
The MooseUtils::get() specializations are used to support making forwards-compatible code changes fro...
Definition: MooseUtils.h:1155
T & set(const std::string &name, bool quiet_mode=false)
Returns a writable reference to the named parameters.
virtual const VariableValue & coupledDot(const std::string &var_name, unsigned int comp=0) const
Time derivative of a coupled variable.
Definition: Coupleable.C:1140
MeshBase & mesh
void registerSystemAttributeName(const std::string &value)
This method is used to define the MOOSE system name that is used by the TheWarehouse object for stori...
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
/class BoundaryRestrictable /brief Provides functionality for limiting the object to certain boundary...
static InputParameters validParams()
void addAvailableFlags(const ExecFlagType &flag, Args... flags)
Add additional execute_on flags to the list of possible flags.
Definition: ExecFlagEnum.h:82
static InputParameters validParams()
const ExecFlagType EXEC_TIMESTEP_END
Definition: Moose.C:34
virtual void setDofValue(const OutputData &value, unsigned int index)=0
Degree of freedom value setters.
void addRelationshipManager(const std::string &name, Moose::RelationshipManagerType rm_type, Moose::RelationshipManagerInputParameterCallback input_parameter_callback=nullptr)
Tells MOOSE about a RelationshipManager that this object needs.
Base class for a system (of equations)
Definition: SystemBase.h:84
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:57
void addRequiredParam(const std::string &name, const std::string &doc_string)
This method adds a parameter and documentation string to the InputParameters object that will be extr...
static InputParameters validParams()
bool _bnd
true if the kernel is boundary kernel, false if it is interior kernels
Definition: AuxKernel.h:186
void registerBase(const std::string &value)
This method must be called from every base "Moose System" to create linkage with the Action System...
virtual void compute()
Computes the value and stores it in the solution vector.
Definition: AuxKernel.C:297
Interface for objects that needs transient capabilities.
static InputParameters validParams()
Interface for notifications that the mesh has changed.
virtual const std::set< std::string > & getRequestedItems() override
Return a set containing the names of items requested by the object.
Definition: AuxKernel.C:194
Real value(unsigned n, unsigned alpha, unsigned beta, Real x)
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:3443
Every object that can be built by the factory should be derived from this class.
Definition: MooseObject.h:28
static InputParameters validParams()
VarKindType
Framework-wide stuff.
Definition: MooseTypes.h:714
bool isMortar()
Definition: AuxKernel.C:485
AuxKernelTempl(const InputParameters &parameters)
Definition: AuxKernel.C:83
const std::string & type() const
Get the type of this class.
Definition: MooseBase.h:51
std::string getDocString() const
Generate a documentation string for the "execute_on" parameter.
Definition: ExecFlagEnum.C:40
virtual const OutputTools< ComputeValueType >::VariableValue & value()
The value of the variable this object is operating on.
Interface for objects that need to use UserObjects.
void paramError(const std::string &param, Args... args) const
Emits an error prefixed with the file and line number of the given param (from the input file) along ...
Base class for creating new nodally-based mortar auxiliary kernels.
std::set< UserObjectName > getDependObjects() const
Recursively return a set of user objects this user object depends on Note: this can be called only af...
Definition: UserObject.C:98
const ExecFlagType EXEC_LINEAR
Definition: Moose.C:29
std::string stringify(const T &t)
conversion to string
Definition: Conversion.h:64
static InputParameters validParams()
virtual const VariableValue & coupledDot(const std::string &var_name, unsigned int comp=0) const override
Time derivative of a coupled variable.
Definition: AuxKernel.C:244
static InputParameters validParams()
virtual const std::set< std::string > & getSuppliedItems() override
Return a set containing the names of items owned by the object.
Definition: AuxKernel.C:201
bool hasBoundary(const BoundaryName &name) const
Test if the supplied boundary name is valid for this object.
OutputTools< Real >::VariableValue VariableValue
Definition: MooseTypes.h:314
const ExecFlagType EXEC_PRE_DISPLACE
Definition: Moose.C:50
virtual const VariableValue & coupledDotDu(const std::string &var_name, unsigned int comp=0) const
Time derivative of a coupled variable with respect to the coefficients.
Definition: Coupleable.C:1438
const OutputTools< ComputeValueType >::VariableValue & uOld() const
Retrieves the old value of the variable that this AuxKernel operates on.
Definition: AuxKernel.C:459
void insert()
Insert the just computed values into the auxiliary solution vector.
Definition: AuxKernel.C:287
void addMooseVariableDependency(MooseVariableFieldBase *var)
Call this function to add the passed in MooseVariableFieldBase as a variable that this object depends...
MooseVariableField< ComputeValueType > & _var
This is a regular kernel so we cast to a regular MooseVariable.
Definition: AuxKernel.h:174
void addVectorPostprocessorDependencyHelper(const VectorPostprocessorName &name) const override final
Helper for deriving classes to override to add dependencies when a VectorPostprocessor is requested...
Definition: AuxKernel.C:225
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
Generic class for solving transient nonlinear problems.
Definition: SubProblem.h:78
An interface for accessing Materials.
Intermediate base class that ties together all the interfaces for getting MooseVariableFEBases with t...
Interface for objects that need to get values of MooseVariables.
An interface that restricts an object to subdomains via the &#39;blocks&#39; input parameter.
Interface for sorting dependent vectors of objects.
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
const InputParameters & parameters() const
Get the parameters of the object.
void addUserObjectDependencyHelper(const UserObject &uo) const override final
Helper for deriving classes to override to add dependencies when a UserObject is requested.
Definition: AuxKernel.C:208
void addParam(const std::string &name, const S &value, const std::string &doc_string)
These methods add an optional parameter and a documentation string to the InputParameters object...
static InputParameters validParams()
Definition: AuxKernel.C:27
Eigen::Matrix< Real, Eigen::Dynamic, 1 > RealEigenVector
Definition: MooseTypes.h:146
Base class for creating new auxiliary kernels and auxiliary boundary conditions.
Definition: AuxKernel.h:36
MOOSE now contains C++17 code, so give a reasonable error message stating what the user can do to add...
const bool & _check_boundary_restricted
Whether or not to check for repeated element sides on the sideset to which the auxkernel is restricte...
Definition: AuxKernel.h:161
virtual const VariableValue & coupledDotDu(const std::string &var_name, unsigned int comp=0) const override
Time derivative of a coupled variable with respect to the coefficients.
Definition: AuxKernel.C:257
void setDofValueHelper(const ComputeValueType &dof_value)
Currently only used when the auxiliary variable is a finite volume variable, this helps call through ...
static InputParameters validParams()
Definition: MooseObject.C:25
void coupledCallback(const std::string &var_name, bool is_old) const override
A call-back function provided by the derived object for actions before coupling a variable with funct...
Definition: AuxKernel.C:233
bool boundaryRestricted(const std::set< BoundaryID > &boundary_ids)
std::set< std::string > _supplied_vars
Definition: AuxKernel.h:263
Interface for objects that need to use functions.
void declareControllable(const std::string &name, std::set< ExecFlagType > execute_flags={})
Declare the given parameters as controllable.
A system that holds auxiliary variables.
Base class for user-specific data.
Definition: UserObject.h:40
bool isNodal() const
Nodal or elemental kernel?
Definition: AuxKernel.h:86
unsigned int _n_local_dofs
number of local dofs for elemental variables
Definition: AuxKernel.h:233
Interface class for classes which interact with Postprocessors.
unsigned int THREAD_ID
Definition: MooseTypes.h:209
void addParamNamesToGroup(const std::string &space_delim_names, const std::string group_name)
This method takes a space delimited list of parameter names and adds them to the specified group name...
const bool _coincident_lower_d_calc
Whether we are computing for a lower dimensional variable using boundary restriction, e.g.
Definition: AuxKernel.h:227