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