https://mooseframework.inl.gov
Loading...
Searching...
No Matches
AuxKernelBase.h
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#pragma once
11
12#include "MooseObject.h"
13#include "MooseVariableFE.h"
14#include "SetupInterface.h"
17#include "FunctionInterface.h"
18#include "UserObjectInterface.h"
19#include "TransientInterface.h"
22#include "RandomInterface.h"
24#include "BlockRestrictable.h"
26#include "Restartable.h"
29#include "ElementIDInterface.h"
30#include "UserObjectBase.h"
32
33// forward declarations
34class SubProblem;
35class AuxiliarySystem;
36class SystemBase;
37class MooseMesh;
38
43 public BlockRestrictable,
45 public SetupInterface,
47 public FunctionInterface,
49 public TransientInterface,
53 public RandomInterface,
55 public Restartable,
58 public ElementIDInterface,
59 protected NonADFunctorInterface
60{
61public:
63
65
66#ifdef MOOSE_KOKKOS_ENABLED
70 AuxKernelBase(const AuxKernelBase & object, const Moose::Kokkos::FunctorCopy & key);
71#endif
72
73 virtual void compute() = 0;
74
75 const std::set<UserObjectName> & getDependObjects() const { return _depend_uo; }
76
77 void coupledCallback(const std::string & var_name, bool is_old) const override;
78
79 virtual const std::set<std::string> & getRequestedItems() override;
80
81 virtual const std::set<std::string> & getSuppliedItems() override;
82
83 virtual void initialSetup() override;
84
85protected:
88
90 const bool _bnd;
91
101
108
111
114
117
118private:
119 void addPostprocessorDependencyHelper(const PostprocessorName & name) const override final;
120 void addUserObjectDependencyHelper(const UserObjectBase & uo) const override final;
121 void
122 addVectorPostprocessorDependencyHelper(const VectorPostprocessorName & name) const override final;
123
126
128 mutable std::set<std::string> _depend_vars;
129 std::set<std::string> _supplied_vars;
130
132 mutable std::set<UserObjectName> _depend_uo;
133};
unsigned int THREAD_ID
Definition MooseTypes.h:237
Keeps track of stuff related to assembling.
Definition Assembly.h:110
Base class for auxiliary kernels.
MooseVariableFieldBase & getVariableHelper(const InputParameters &parameters)
Get MooseVariable of base type from parameter.
std::set< UserObjectName > _depend_uo
Depend UserObjects.
std::set< std::string > _supplied_vars
SubProblem & _subproblem
Subproblem this kernel is part of.
SystemBase & _nl_sys
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...
AuxiliarySystem & _aux_sys
void addPostprocessorDependencyHelper(const PostprocessorName &name) const override final
Helper for deriving classes to override to add dependencies when a Postprocessor is requested.
Assembly & _assembly
Assembly class.
const std::set< UserObjectName > & getDependObjects() const
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.
const THREAD_ID _tid
Thread ID.
MooseVariableFieldBase & _var
Base MooseVariable.
virtual void compute()=0
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.
/class BoundaryRestrictable /brief Provides functionality for limiting the object to certain boundary...
Intermediate base class that ties together all the interfaces for getting MooseVariableFEBases with t...
Interface for sorting dependent vectors of objects.
Interface for objects that need to use functions.
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system.
An interface for accessing Materials.
Interface for notifications that the mesh has changed.
const InputParameters & parameters() const
Get the parameters of the object.
Definition MooseBase.h:131
const std::string & name() const
Get the name of the class.
Definition MooseBase.h:103
MooseMesh wraps a libMesh::Mesh object and enhances its capabilities by caching additional data and s...
Definition MooseMesh.h:95
Every object that can be built by the factory should be derived from this class.
Definition MooseObject.h:31
This class provides an interface for common operations on field variables of both FE and FV types wit...
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...
A class for creating restricted objects.
Definition Restartable.h:29
Generic class for solving transient nonlinear problems.
Definition SubProblem.h:79
Base class for a system (of equations)
Definition SystemBase.h:87
Interface for objects that needs transient capabilities.
Interface for objects that need to use UserObjects.