39 "The name of the variable that this object applies to");
41 params.
addParam<
bool>(
"use_displaced_mesh",
43 "Whether or not this object should use the " 44 "displaced mesh for computation. Note that " 45 "in the case this is true but no " 46 "displacements are provided in the Mesh block " 47 "the undisplaced mesh will still be used.");
49 params.
addParam<
bool>(
"check_boundary_restricted",
51 "Whether to check for multiple element sides on the boundary " 52 "in the case of a boundary restricted, element aux variable. " 53 "Setting this to false will allow contribution to a single element's " 54 "elemental value(s) from multiple boundary sides on the same element " 55 "(example: when the restricted boundary exists on two or more sides " 56 "of an element, such as at a corner of a mesh");
74 getVariableHelper(parameters).isNodal()),
82 *parameters.getCheckedPointerParam<
FEProblemBase *>(
"_fe_problem_base"),
84 getVariableHelper(parameters).isNodal()),
92 _var(getVariableHelper(parameters)),
94 _check_boundary_restricted(getParam<bool>(
"check_boundary_restricted")),
95 _coincident_lower_d_calc(_bnd && !_var.isNodal() && _var.isLowerD()),
96 _subproblem(*getCheckedPointerParam<
SubProblem *>(
"_subproblem")),
97 _sys(*getCheckedPointerParam<
SystemBase *>(
"_sys")),
98 _nl_sys(*getCheckedPointerParam<
SystemBase *>(
"_nl_sys")),
101 _assembly(_subproblem.assembly(_tid, 0)),
102 _mesh(_subproblem.
mesh())
112 auto boundaries =
_mesh.
getMesh().get_boundary_info().build_side_list();
113 std::set<dof_id_type> elements;
114 for (
const auto & t : boundaries)
118 const auto eid = std::get<0>(t);
119 const auto stat = elements.insert(eid);
122 "Boundary restricted auxiliary kernel '",
124 "' has element (id=",
126 ") connected with more than one boundary sides.\nTo skip this error check, " 127 "set 'check_boundary_restricted = false'.\nRefer to the AuxKernel " 128 "documentation on boundary restricted aux kernels for understanding this error.");
145 #ifdef MOOSE_KOKKOS_ENABLED 168 _check_boundary_restricted(object._check_boundary_restricted),
169 _coincident_lower_d_calc(object._coincident_lower_d_calc),
170 _subproblem(object._subproblem),
172 _nl_sys(object._nl_sys),
173 _aux_sys(object._aux_sys),
175 _assembly(object._assembly),
181 const std::set<std::string> &
187 const std::set<std::string> &
198 const auto & var_names = getParam<std::vector<VariableName>>(var_name);
199 _depend_vars.insert(var_names.begin(), var_names.end());
An interface for accessing Moose::Functors for systems that do not care about automatic differentiati...
Interface for objects that need parallel consistent random numbers without patterns over the course o...
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.
A class for creating restricted objects.
Base class for auxiliary kernels.
virtual const std::set< std::string > & getSuppliedItems() override
Return a set containing the names of items owned by the object.
void paramError(const std::string ¶m, Args... args) const
Emits an error prefixed with the file and line number of the given param (from the input file) along ...
MooseVariableFieldBase & _var
Base MooseVariable.
AuxKernelBase(const InputParameters ¶meters)
const InputParameters & parameters() const
Get the parameters of the object.
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...
T * get(const std::unique_ptr< T > &u)
The MooseUtils::get() specializations are used to support making forwards-compatible code changes fro...
std::set< std::string > _supplied_vars
/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.
static InputParameters validParams()
This class provides an interface for common operations on field variables of both FE and FV types wit...
const ExecFlagType EXEC_TIMESTEP_END
Base class for a system (of equations)
MooseMesh & _mesh
Mesh this kernel is active on.
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
const bool _bnd
true if the kernel is boundary kernel, false if it is interior kernels
static InputParameters validParams()
void addVectorPostprocessorDependencyHelper(const VectorPostprocessorName &name) const override final
Helper for deriving classes to override to add dependencies when a VectorPostprocessor is requested...
Interface for objects that needs transient capabilities.
const std::string & name() const
Get the name of the class.
static InputParameters validParams()
const bool _check_boundary_restricted
Whether or not to check for repeated element sides on the sideset to which the auxkernel is restricte...
Interface for notifications that the mesh has changed.
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Every object that can be built by the factory should be derived from this class.
static InputParameters validParams()
const std::string & type() const
Get the type of this class.
std::string getDocString() const
Generate a documentation string for the "execute_on" parameter.
Interface for objects that need to use UserObjects.
std::set< UserObjectName > getDependObjects() const
Recursively return a set of user objects this user object depends on Note: this can be called only af...
const ExecFlagType EXEC_LINEAR
std::string stringify(const T &t)
conversion to string
void addPostprocessorDependencyHelper(const PostprocessorName &name) const override final
Helper for deriving classes to override to add dependencies when a Postprocessor is requested...
static InputParameters validParams()
static InputParameters validParams()
static InputParameters validParams()
bool hasBoundary(const BoundaryName &name) const
Test if the supplied boundary name is valid for this object.
const ExecFlagType EXEC_PRE_DISPLACE
void addMooseVariableDependency(MooseVariableFieldBase *var)
Call this function to add the passed in MooseVariableFieldBase as a variable that this object depends...
Generic class for solving transient nonlinear problems.
An interface for accessing Materials.
void addUserObjectDependencyHelper(const UserObject &uo) const override final
Helper for deriving classes to override to add dependencies when a UserObject is requested.
An interface that restricts an object to subdomains via the 'blocks' input parameter.
virtual const std::set< std::string > & getRequestedItems() override
Return a set containing the names of items requested by the object.
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...
Interface for sorting dependent vectors of objects.
const UserObject & getUserObjectBaseByName(const UserObjectName &object_name, bool is_dependency=true) const
Get an user object with the name object_name.
static InputParameters validParams()
std::set< UserObjectName > _depend_uo
Depend UserObjects.
static InputParameters validParams()
std::set< std::string > _depend_vars
Depend AuxKernelTempls.
bool boundaryRestricted(const std::set< BoundaryID > &boundary_ids)
Interface for objects that need to use functions.
A system that holds auxiliary variables.
Base class for user-specific data.
MooseVariableFieldBase & getVariableHelper(const InputParameters ¶meters)
Get MooseVariable of base type from parameter.
Interface class for classes which interact with Postprocessors.
const bool _coincident_lower_d_calc
Whether we are computing for a lower dimensional variable using boundary restriction, e.g.