www.mooseframework.org
AuxKernel.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 "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 
74  if (typeid(AuxKernelTempl<ComputeValueType>).name() == typeid(VectorAuxKernel).name())
75  params.registerBase("VectorAuxKernel");
76  if (typeid(AuxKernelTempl<ComputeValueType>).name() == typeid(ArrayAuxKernel).name())
77  params.registerBase("ArrayAuxKernel");
78  return params;
79 }
80 
81 template <typename ComputeValueType>
83  : MooseObject(parameters),
84  MooseVariableInterface<ComputeValueType>(
85  this,
86  parameters.getCheckedPointerParam<SystemBase *>("_sys")
87  ->getVariable(parameters.get<THREAD_ID>("_tid"),
88  parameters.get<AuxVariableName>("variable"))
89  .isNodal(),
90  "variable",
92  std::is_same<Real, ComputeValueType>::value
94  : (std::is_same<RealVectorValue, ComputeValueType>::value
97  BlockRestrictable(this),
98  BoundaryRestrictable(this, mooseVariableBase()->isNodal()),
99  SetupInterface(this),
100  CoupleableMooseVariableDependencyIntermediateInterface(this, mooseVariableBase()->isNodal()),
101  FunctionInterface(this),
102  UserObjectInterface(this),
103  TransientInterface(this),
104  MaterialPropertyInterface(this, blockIDs(), boundaryIDs()),
107  RandomInterface(parameters,
108  *parameters.getCheckedPointerParam<FEProblemBase *>("_fe_problem_base"),
109  parameters.get<THREAD_ID>("_tid"),
110  mooseVariableBase()->isNodal()),
112  Restartable(this, "AuxKernels"),
113  MeshChangedInterface(parameters),
115  ElementIDInterface(this),
116  NonADFunctorInterface(this),
117  _check_boundary_restricted(getParam<bool>("check_boundary_restricted")),
118  _subproblem(*getCheckedPointerParam<SubProblem *>("_subproblem")),
119  _sys(*getCheckedPointerParam<SystemBase *>("_sys")),
120  _nl_sys(*getCheckedPointerParam<SystemBase *>("_nl_sys")),
121  _aux_sys(static_cast<AuxiliarySystem &>(_sys)),
122  _tid(parameters.get<THREAD_ID>("_tid")),
123  _var(_aux_sys.getActualFieldVariable<ComputeValueType>(
124  _tid, parameters.get<AuxVariableName>("variable"))),
125  _nodal(_var.isNodal()),
126  _u(_nodal ? _var.nodalValueArray() : _var.sln()),
127 
128  _assembly(_subproblem.assembly(_tid, 0)),
129  _bnd(boundaryRestricted()),
130  _mesh(_subproblem.mesh()),
131 
132  _test(_bnd ? _var.phiFace() : _var.phi()),
133  _q_point(_bnd ? _assembly.qPointsFace() : _assembly.qPoints()),
134  _qrule(_bnd ? _assembly.qRuleFace() : _assembly.qRule()),
135  _JxW(_bnd ? _assembly.JxWFace() : _assembly.JxW()),
136  _coord(_assembly.coordTransformation()),
137 
138  _current_elem(_assembly.elem()),
139  _current_side(_assembly.side()),
140  _current_elem_volume(_assembly.elemVolume()),
141  _current_side_volume(_assembly.sideElemVolume()),
142 
143  _current_node(_assembly.node()),
144  _current_boundary_id(_assembly.currentBoundaryID()),
145  _solution(_aux_sys.solution()),
146 
147  _current_lower_d_elem(_assembly.lowerDElem()),
148  _coincident_lower_d_calc(_bnd && !isNodal() && _var.isLowerD())
149 {
151  _supplied_vars.insert(parameters.get<AuxVariableName>("variable"));
152 
154  {
155  // when the variable is elemental and this aux kernel operates on boundaries,
156  // we need to check that no elements are visited more than once through visiting
157  // all the sides on the boundaries
158  auto boundaries = _mesh.getMesh().get_boundary_info().build_side_list();
159  std::set<dof_id_type> elements;
160  for (const auto & t : boundaries)
161  {
162  if (hasBoundary(std::get<2>(t)))
163  {
164  const auto eid = std::get<0>(t);
165  const auto stat = elements.insert(eid);
166  if (!stat.second) // already existed in the set
167  mooseError(
168  "Boundary restricted auxiliary kernel '",
169  name(),
170  "' has element (id=",
171  eid,
172  ") connected with more than one boundary sides.\nTo skip this error check, "
173  "set 'check_boundary_restricted = false'.\nRefer to the AuxKernel "
174  "documentation on boundary restricted aux kernels for understanding this error.");
175  }
176  }
177  }
178 
179  // Check for supported variable types
180  // Any 'nodal' family that actually has DoFs outside of nodes, or gradient dofs at nodes is
181  // not properly set by AuxKernelTempl::compute
182  // NOTE: We could add a few exceptions, lower order from certain unsupported families and on
183  // certain element types only have value-DoFs on nodes
184  const auto type = _var.feType();
185  if (_var.isNodal() && !((type.family == LAGRANGE) || (type.order <= FIRST)))
186  paramError("variable",
187  "Variable family " + Moose::stringify(type.family) + " is not supported at order " +
188  Moose::stringify(type.order) + " by the AuxKernel system.");
189 }
190 
191 template <typename ComputeValueType>
192 const std::set<std::string> &
194 {
195  return _depend_vars;
196 }
197 
198 template <typename ComputeValueType>
199 const std::set<std::string> &
201 {
202  return _supplied_vars;
203 }
204 
205 template <typename ComputeValueType>
206 void
208 {
209  _depend_uo.insert(uo.name());
210  for (const auto & indirect_dependent : uo.getDependObjects())
211  _depend_uo.insert(indirect_dependent);
212 }
213 
214 template <typename ComputeValueType>
215 void
217  const PostprocessorName & name) const
218 {
219  getUserObjectBaseByName(name); // getting the UO will call addUserObjectDependencyHelper()
220 }
221 
222 template <typename ComputeValueType>
223 void
225  const VectorPostprocessorName & name) const
226 {
227  getUserObjectBaseByName(name); // getting the UO will call addUserObjectDependencyHelper()
228 }
229 
230 template <typename ComputeValueType>
231 void
232 AuxKernelTempl<ComputeValueType>::coupledCallback(const std::string & var_name, bool is_old) const
233 {
234  if (!is_old)
235  {
236  const auto & var_names = getParam<std::vector<VariableName>>(var_name);
237  _depend_vars.insert(var_names.begin(), var_names.end());
238  }
239 }
240 
241 template <typename ComputeValueType>
242 const VariableValue &
243 AuxKernelTempl<ComputeValueType>::coupledDot(const std::string & var_name, unsigned int comp) const
244 {
245  auto var = getVar(var_name, comp);
246  if (var->kind() == Moose::VAR_AUXILIARY)
247  mooseError(
248  name(),
249  ": Unable to couple time derivative of an auxiliary variable into the auxiliary system.");
250 
251  return Coupleable::coupledDot(var_name, comp);
252 }
253 
254 template <typename ComputeValueType>
255 const VariableValue &
257  unsigned int comp) const
258 {
259  auto var = getVar(var_name, comp);
260  if (var->kind() == Moose::VAR_AUXILIARY)
261  mooseError(
262  name(),
263  ": Unable to couple time derivative of an auxiliary variable into the auxiliary system.");
264 
265  return Coupleable::coupledDotDu(var_name, comp);
266 }
267 
268 template <>
269 void
270 AuxKernelTempl<Real>::setDofValueHelper(const Real & value)
271 {
272  mooseAssert(_n_local_dofs == 1,
273  "Should only be calling setDofValue if there is one dof for the aux var");
274  _var.setDofValue(value, 0);
275 }
276 
277 template <>
278 void
280 {
281  mooseError("Not implemented");
282 }
283 
284 template <typename ComputeValueType>
285 void
287 {
288  if (_coincident_lower_d_calc)
289  _var.insertLower(_aux_sys.solution());
290  else
291  _var.insert(_aux_sys.solution());
292 }
293 
294 template <typename ComputeValueType>
295 void
297 {
298  precalculateValue();
299 
300  if (isNodal()) /* nodal variables */
301  {
302  mooseAssert(!_coincident_lower_d_calc,
303  "Nodal evaluations are point evaluations. We don't have to concern ourselves with "
304  "coincidence of lower-d blocks and higher-d faces because they share nodes");
305  if (_var.isNodalDefined())
306  {
307  _qp = 0;
308  ComputeValueType value = computeValue();
309  // update variable data, which is referenced by other kernels, so the value is up-to-date
310  _var.setNodalValue(value);
311  }
312  }
313  else /* elemental variables */
314  {
315  _n_local_dofs = _coincident_lower_d_calc ? _var.dofIndicesLower().size() : _var.numberOfDofs();
316 
317  if (_coincident_lower_d_calc)
318  {
319  static const std::string lower_error = "Make sure that the lower-d variable lives on a "
320  "lower-d block that is a superset of the boundary";
321  if (!_current_lower_d_elem)
322  mooseError("No lower-dimensional element. ", lower_error);
323  if (!_n_local_dofs)
324  mooseError("No degrees of freedom. ", lower_error);
325  }
326 
327  if (_n_local_dofs == 1) /* p0 */
328  {
329  ComputeValueType value = 0;
330  for (_qp = 0; _qp < _qrule->n_points(); _qp++)
331  value += _JxW[_qp] * _coord[_qp] * computeValue();
332  value /= (_bnd ? _current_side_volume : _current_elem_volume);
333  if (_var.isFV())
334  setDofValueHelper(value);
335  else
336  {
337  // update the variable data referenced by other kernels.
338  // Note that this will update the values at the quadrature points too
339  // (because this is an Elemental variable)
340  if (_coincident_lower_d_calc)
341  {
342  _local_sol.resize(1);
343  if constexpr (std::is_same<Real, ComputeValueType>::value)
344  _local_sol(0) = value;
345  else
346  mooseAssert(false, "We should not enter the single dof branch with a vector variable");
347  _var.setLowerDofValues(_local_sol);
348  }
349  else
350  _var.setNodalValue(value);
351  }
352  }
353  else /* high-order */
354  {
355  _local_re.resize(_n_local_dofs);
356  _local_re.zero();
357  _local_ke.resize(_n_local_dofs, _n_local_dofs);
358  _local_ke.zero();
359 
360  const auto & test = _coincident_lower_d_calc ? _var.phiLower() : _test;
361 
362  // assemble the local mass matrix and the load
363  for (unsigned int i = 0; i < test.size(); i++)
364  for (_qp = 0; _qp < _qrule->n_points(); _qp++)
365  {
366  ComputeValueType t = _JxW[_qp] * _coord[_qp] * test[i][_qp];
367  _local_re(i) += t * computeValue();
368  for (unsigned int j = 0; j < test.size(); j++)
369  _local_ke(i, j) += t * test[j][_qp];
370  }
371  // mass matrix is always SPD but in case of boundary restricted, it will be rank deficient
372  _local_sol.resize(_n_local_dofs);
373  if (_bnd)
374  _local_ke.svd_solve(_local_re, _local_sol);
375  else
376  _local_ke.cholesky_solve(_local_re, _local_sol);
377 
378  _coincident_lower_d_calc ? _var.setLowerDofValues(_local_sol) : _var.setDofValues(_local_sol);
379  }
380  }
381 }
382 
383 template <>
384 void
386 {
387  precalculateValue();
388 
389  if (isNodal()) /* nodal variables */
390  {
391  if (_var.isNodalDefined())
392  {
393  _qp = 0;
394  RealEigenVector value = computeValue();
395  // update variable data, which is referenced by other kernels, so the value is up-to-date
396  _var.setNodalValue(value);
397  }
398  }
399  else /* elemental variables */
400  {
401  _n_local_dofs = _var.numberOfDofs();
402  if (_n_local_dofs == 1) /* p0 */
403  {
404  RealEigenVector value = RealEigenVector::Zero(_var.count());
405  for (_qp = 0; _qp < _qrule->n_points(); _qp++)
406  value += _JxW[_qp] * _coord[_qp] * computeValue();
407  value /= (_bnd ? _current_side_volume : _current_elem_volume);
408  // update the variable data referenced by other kernels.
409  // Note that this will update the values at the quadrature points too
410  // (because this is an Elemental variable)
411  _var.setNodalValue(value);
412  }
413  else /* high-order */
414  {
415  _local_re.resize(_n_local_dofs);
416  for (unsigned int i = 0; i < _local_re.size(); ++i)
417  _local_re(i) = RealEigenVector::Zero(_var.count());
418  _local_ke.resize(_n_local_dofs, _n_local_dofs);
419  _local_ke.zero();
420 
421  // assemble the local mass matrix and the load
422  for (unsigned int i = 0; i < _test.size(); i++)
423  for (_qp = 0; _qp < _qrule->n_points(); _qp++)
424  {
425  Real t = _JxW[_qp] * _coord[_qp] * _test[i][_qp];
426  _local_re(i) += t * computeValue();
427  for (unsigned int j = 0; j < _test.size(); j++)
428  _local_ke(i, j) += t * _test[j][_qp];
429  }
430 
431  // mass matrix is always SPD
432  _local_sol.resize(_n_local_dofs);
433  for (unsigned int i = 0; i < _local_re.size(); ++i)
434  _local_sol(i) = RealEigenVector::Zero(_var.count());
435  DenseVector<Number> re(_n_local_dofs);
436  DenseVector<Number> sol(_n_local_dofs);
437  for (unsigned int i = 0; i < _var.count(); ++i)
438  {
439  for (unsigned int j = 0; j < _n_local_dofs; ++j)
440  re(j) = _local_re(j)(i);
441 
442  if (_bnd)
443  _local_ke.svd_solve(re, sol);
444  else
445  _local_ke.cholesky_solve(re, sol);
446 
447  for (unsigned int j = 0; j < _n_local_dofs; ++j)
448  _local_sol(j)(i) = sol(j);
449  }
450 
451  _var.setDofValues(_local_sol);
452  }
453  }
454 }
455 
456 template <typename ComputeValueType>
459 {
460  if (_sys.solutionStatesInitialized())
461  mooseError("The solution states have already been initialized when calling ",
462  type(),
463  "::uOld().\n\n",
464  "Make sure to call uOld() within the object constructor.");
465 
466  return _nodal ? _var.nodalValueOldArray() : _var.slnOld();
467 }
468 
469 template <typename ComputeValueType>
472 {
473  if (_sys.solutionStatesInitialized())
474  mooseError("The solution states have already been initialized when calling ",
475  type(),
476  "::uOlder().\n\n",
477  "Make sure to call uOlder() within the object constructor.");
478 
479  return _nodal ? _var.nodalValueOlderArray() : _var.slnOlder();
480 }
481 
482 template <typename ComputeValueType>
483 bool
485 {
486  return dynamic_cast<MortarNodalAuxKernelTempl<ComputeValueType> *>(this) != nullptr;
487 }
488 
489 // Explicitly instantiates the two versions of the AuxKernelTempl class
490 template class AuxKernelTempl<Real>;
491 template class AuxKernelTempl<RealVectorValue>;
492 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:634
virtual bool isNodal() const
Is this variable nodal.
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:471
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:284
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:216
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:1147
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:1118
MeshBase & mesh
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:32
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:56
const FEType & feType() const
Get the type of finite element object.
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:296
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:193
Real value(unsigned n, unsigned alpha, unsigned beta, Real x)
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:3198
Every object that can be built by the factory should be derived from this class.
Definition: MooseObject.h:33
static InputParameters validParams()
VarKindType
Framework-wide stuff.
Definition: MooseTypes.h:627
bool isMortar()
Definition: AuxKernel.C:484
AuxKernelTempl(const InputParameters &parameters)
Definition: AuxKernel.C:82
const std::string & type() const
Get the type of this class.
Definition: MooseBase.h:50
std::string getDocString() const
Generate a documentation string for the "execute_on" parameter.
Definition: ExecFlagEnum.C:39
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:100
const ExecFlagType EXEC_LINEAR
Definition: Moose.C:29
std::string stringify(const T &t)
conversion to string
Definition: Conversion.h:62
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:243
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:200
bool hasBoundary(const BoundaryName &name) const
Test if the supplied boundary name is valid for this object.
OutputTools< Real >::VariableValue VariableValue
Definition: MooseTypes.h:302
const ExecFlagType EXEC_PRE_DISPLACE
Definition: Moose.C:44
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:1402
const OutputTools< ComputeValueType >::VariableValue & uOld() const
Retrieves the old value of the variable that this AuxKernel operates on.
Definition: AuxKernel.C:458
void insert()
Insert the just computed values into the auxiliary solution vector.
Definition: AuxKernel.C:286
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:224
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
Generic class for solving transient nonlinear problems.
Definition: SubProblem.h:75
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:207
void addParam(const std::string &name, const S &value, const std::string &doc_string)
These methods add an option 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:138
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:256
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:24
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:232
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:39
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:198
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