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");
75 getVariableHelper(parameters).isNodal()),
83 *parameters.getCheckedPointerParam<
FEProblemBase *>(
"_fe_problem_base"),
85 getVariableHelper(parameters).isNodal()),
93 _var(getVariableHelper(parameters)),
95 _check_boundary_restricted(getParam<bool>(
"check_boundary_restricted")),
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())
119 #ifdef MOOSE_KOKKOS_ENABLED 142 _check_boundary_restricted(object._check_boundary_restricted),
143 _subproblem(object._subproblem),
145 _nl_sys(object._nl_sys),
146 _aux_sys(object._aux_sys),
148 _assembly(object._assembly),
164 auto boundaries =
_mesh.
getMesh().get_boundary_info().build_side_list();
165 std::set<dof_id_type> element_ids;
166 for (
const auto & [elem_id, _, boundary_id] : boundaries)
170 const auto [_, inserted] = element_ids.insert(elem_id);
173 "Boundary restricted auxiliary kernel '",
175 "' has element (id=",
177 ") connected with more than one boundary sides.\nTo skip this error check, " 178 "set 'check_boundary_restricted = false'.\nRefer to the AuxKernel " 179 "documentation on boundary restricted aux kernels for understanding this error.");
185 const std::set<std::string> &
191 const std::set<std::string> &
202 const auto & var_names = getParam<std::vector<VariableName>>(var_name);
203 _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.
virtual Elem * elemPtr(const dof_id_type i)
unsigned int number() const
Get variable number coming from libMesh.
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...
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
void addUserObjectDependencyHelper(const UserObjectBase &uo) const override final
Helper for deriving classes to override to add dependencies when a UserObject is requested.
std::set< UserObjectName > getDependObjects() const
Recursively return a set of user objects this user object depends on Note: this can be called only af...
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.
SystemBase & _sys
System this kernel is part of.
static InputParameters validParams()
const UserObjectBase & getUserObjectBaseByName(const UserObjectName &object_name, bool is_dependency=true) const
Get an user object with the name object_name.
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.
unsigned int number() const
Gets the number of this system.
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.
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.
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.
const Elem & get(const ElemType type_in)
MooseVariableFieldBase & getVariableHelper(const InputParameters ¶meters)
Get MooseVariable of base type from parameter.
Interface class for classes which interact with Postprocessors.
virtual void initialSetup() override
Gets called at the beginning of the simulation before this object is asked to do its job...