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)),
94 _bnd(boundaryRestricted()),
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())
125#ifdef MOOSE_KOKKOS_ENABLED
148 _check_boundary_restricted(object._check_boundary_restricted),
149 _subproblem(object._subproblem),
151 _nl_sys(object._nl_sys),
152 _aux_sys(object._aux_sys),
154 _assembly(object._assembly),
170 auto boundaries =
_mesh.
getMesh().get_boundary_info().build_side_list();
171 std::set<dof_id_type> element_ids;
172 for (
const auto & [elem_id, _, boundary_id] : boundaries)
176 const auto [_, inserted] = element_ids.insert(elem_id);
179 "Boundary restricted auxiliary kernel '",
181 "' has element (id=",
183 ") connected with more than one boundary sides.\nTo skip this error check, "
184 "set 'check_boundary_restricted = false'.\nRefer to the AuxKernel "
185 "documentation on boundary restricted aux kernels for understanding this error.");
191const std::set<std::string> &
197const std::set<std::string> &
208 const auto & var_names = getParam<std::vector<VariableName>>(var_name);
209 _depend_vars.insert(var_names.begin(), var_names.end());
const ExecFlagType EXEC_TIMESTEP_END
const ExecFlagType EXEC_LINEAR
const ExecFlagType EXEC_PRE_DISPLACE
Base class for auxiliary kernels.
MooseVariableFieldBase & getVariableHelper(const InputParameters ¶meters)
Get MooseVariable of base type from parameter.
std::set< UserObjectName > _depend_uo
Depend UserObjects.
std::set< std::string > _supplied_vars
AuxKernelBase(const InputParameters ¶meters)
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...
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...
void addPostprocessorDependencyHelper(const PostprocessorName &name) const override final
Helper for deriving classes to override to add dependencies when a Postprocessor is requested.
SystemBase & _sys
System this kernel is part of.
virtual void initialSetup() override
Gets called at the beginning of the simulation before this object is asked to do its job.
const bool _bnd
true if the kernel is boundary kernel, false if it is interior kernels
virtual const std::set< std::string > & getSuppliedItems() override
Return a set containing the names of items owned by the object.
virtual const std::set< std::string > & getRequestedItems() override
Return a set containing the names of items requested by the object.
void addVectorPostprocessorDependencyHelper(const VectorPostprocessorName &name) const override final
Helper for deriving classes to override to add dependencies when a VectorPostprocessor is requested.
void addUserObjectDependencyHelper(const UserObjectBase &uo) const override final
Helper for deriving classes to override to add dependencies when a UserObject is requested.
MooseVariableFieldBase & _var
Base MooseVariable.
MooseMesh & _mesh
Mesh this kernel is active on.
std::set< std::string > _depend_vars
Depend AuxKernelTempls.
A system that holds auxiliary variables.
An interface that restricts an object to subdomains via the 'blocks' input parameter.
static InputParameters validParams()
/class BoundaryRestrictable /brief Provides functionality for limiting the object to certain boundary...
bool hasBoundary(const BoundaryName &name) const
Test if the supplied boundary name is valid for this object.
static InputParameters validParams()
Interface for sorting dependent vectors of objects.
A MultiMooseEnum object to hold "execute_on" flags.
std::string getDocString() const
Generate a documentation string for the "execute_on" parameter.
void addAvailableFlags(const ExecFlagType &flag, Args... flags)
Add additional execute_on flags to the list of possible flags.
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
Interface for objects that need to use functions.
static InputParameters validParams()
static InputParameters validParams()
An interface for accessing Materials.
static InputParameters validParams()
Interface for notifications that the mesh has changed.
static InputParameters validParams()
const InputParameters & parameters() const
Get the parameters of the object.
const std::string & type() const
Get the type of this class.
const std::string & name() const
Get the name of the class.
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 ...
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...
virtual Elem * elemPtr(const dof_id_type i)
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 libMesh::FEType & feType() const
Get the type of finite element object.
virtual bool isNodal() const
Is this variable nodal.
unsigned int number() const
Get variable number coming from libMesh.
void addMooseVariableDependency(MooseVariableFieldBase *var)
Call this function to add the passed in MooseVariableFieldBase as a variable that this object depends...
This class provides an interface for common operations on field variables of both FE and FV types wit...
virtual void requireQpComputations() const
Request that quadrature point data be (pre)computed.
An interface for accessing Moose::Functors for systems that do not care about automatic differentiati...
Interface class for classes which interact with Postprocessors.
Interface for objects that need parallel consistent random numbers without patterns over the course o...
static InputParameters validParams()
A class for creating restricted objects.
static InputParameters validParams()
Generic class for solving transient nonlinear problems.
Base class for a system (of equations)
unsigned int number() const
Gets the number of this system.
Interface for objects that needs transient capabilities.
std::set< UserObjectName > getDependObjects() const
Recursively return a set of user objects this user object depends on Note: this can be called only af...
Interface for objects that need to use UserObjects.
const UserObjectBase & getUserObjectBaseByName(const UserObjectName &object_name, bool is_dependency=true) const
Get an user object with the name object_name.
std::string stringify(const T &t)
conversion to string