18#include <unordered_map>
41#ifdef MOOSE_KOKKOS_ENABLED
73 bool isCoupledScalar(
const std::string & var_name,
unsigned int i = 0)
const;
87 unsigned int coupledScalar(
const std::string & var_name,
unsigned int comp = 0)
const;
104 unsigned int comp = 0)
const;
113 unsigned int comp = 0)
const;
122 template <
bool is_ad>
124 unsigned int comp = 0)
const;
153 unsigned int comp = 0)
const;
162 unsigned int comp = 0)
const;
180 unsigned int comp = 0)
const;
189 unsigned int comp = 0)
const;
198 unsigned int comp = 0)
const;
207 unsigned int comp = 0)
const;
217 unsigned int comp = 0)
const;
227 unsigned int comp = 0)
const;
275 void checkVar(
const std::string & var_name)
const;
298 mutable std::unordered_map<std::string, std::unique_ptr<VariableValue>>
_default_value;
Moose::GenericType< VariableValue, is_ad > GenericVariableValue
OutputTools< Real >::VariableValue VariableValue
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
Every object that can be built by the factory should be derived from this class.
Class for scalar variables (they are different).
Interface for objects that needs scalar coupling capabilities.
const VariableValue & coupledScalarValue(const std::string &var_name, unsigned int comp=0) const
Returns value of a scalar coupled variable.
const std::string & _sc_name
The name of the object this interface is part of.
const VariableValue & _scalar_zero
Zero value of a scalar variable.
std::unordered_map< std::string, std::unique_ptr< VariableValue > > _default_value
Will hold the default value for optional coupled scalar variables.
const VariableValue & coupledMatrixTagScalarValue(const std::string &var_name, TagID tag, unsigned int comp=0) const
Returns value of a scalar coupled variable.
const std::set< TagID > & getScalarVariableCoupleableVectorTags() const
const VariableValue & coupledScalarDotDot(const std::string &var_name, unsigned int comp=0) const
Returns the second time derivative of a scalar coupled variable.
void checkVar(const std::string &var_name) const
Check that the right kind of variable is being coupled in.
std::vector< MooseVariableScalar * > _coupled_moose_scalar_vars
Vector of coupled variables.
unsigned int coupledScalarComponents(const std::string &var_name) const
Return the number of components to the coupled scalar variable.
void validateExecutionerType(const std::string &name, const std::string &fn_name) const
Checks to make sure that the current Executioner has set "_is_transient" when old/older values are co...
std::unordered_map< std::string, std::vector< MooseVariableFieldBase * > > _sc_coupled_vars
Field variables coupled into this object (for error checking)
const std::vector< MooseVariableScalar * > & getCoupledMooseScalarVars()
Get the list of coupled scalar variables.
std::set< TagID > _sc_coupleable_vector_tags
The scalar coupleable vector tags.
const InputParameters & _sc_parameters
std::set< TagID > _sc_coupleable_matrix_tags
The scalar coupleable matrix tags.
const Real & _real_zero
Scalar zero.
const VariableValue & coupledScalarValueOld(const std::string &var_name, unsigned int comp=0) const
Returns the old (previous time step) value of a scalar coupled variable.
const VariableValue & coupledScalarDotDotDu(const std::string &var_name, unsigned int comp=0) const
Second time derivative of a scalar coupled variable with respect to the coefficients.
const VariableValue & coupledScalarValueOlder(const std::string &var_name, unsigned int comp=0) const
Returns the older (two time steps previous) value of a scalar coupled variable.
const ADVariableValue & adCoupledScalarDot(const std::string &var_name, unsigned int comp=0) const
Returns the time derivative of a scalar coupled variable, including its dependence on the nonlinear d...
const VariableValue & coupledScalarDotOld(const std::string &var_name, unsigned int comp=0) const
Returns the old time derivative of a scalar coupled variable.
const VariableValue & coupledScalarDotDotOld(const std::string &var_name, unsigned int comp=0) const
Returns the old second time derivative of a scalar coupled variable.
const VariableValue * getDefaultValue(const std::string &var_name) const
Helper method to return (and insert if necessary) the default value for an uncoupled variable.
const VariableValue & coupledVectorTagScalarValue(const std::string &var_name, TagID tag, unsigned int comp=0) const
Returns value of a scalar coupled variable.
std::unordered_map< std::string, std::unique_ptr< ADVariableValue > > _dual_default_value
Will hold the default AD value for optional coupled scalar variables.
bool isCoupledScalar(const std::string &var_name, unsigned int i=0) const
Returns true if a variables has been coupled_as name.
const std::set< TagID > & getScalarVariableCoupleableMatrixTags() const
std::unordered_map< std::string, std::vector< MooseVariableScalar * > > _coupled_scalar_vars
Coupled vars whose values we provide.
unsigned int coupledScalar(const std::string &var_name, unsigned int comp=0) const
Returns the index for a scalar coupled variable by name.
FEProblemBase & _sc_fe_problem
libMesh::Order coupledScalarOrder(const std::string &var_name, unsigned int comp=0) const
Returns the order for a scalar coupled variable by name.
const MooseVariableScalar * getScalarVar(const std::string &var_name, unsigned int comp) const
Extract pointer to a scalar coupled variable.
const ADVariableValue & adCoupledScalarValue(const std::string &var_name, unsigned int comp=0) const
Returns AD value of a scalar coupled variable.
const GenericVariableValue< is_ad > & coupledGenericScalarValue(const std::string &var_name, unsigned int comp=0) const
Returns value of a coupled scalar variable for use in templated automatic differentiation classes.
const VariableValue & coupledScalarDot(const std::string &var_name, unsigned int comp=0) const
Returns the time derivative of a scalar coupled variable.
const THREAD_ID _sc_tid
Thread ID of the thread using this object.
const VariableValue & coupledScalarDotDu(const std::string &var_name, unsigned int comp=0) const
Time derivative of a scalar coupled variable with respect to the coefficients.
const Point & _point_zero
Zero point.
const bool _sc_is_implicit
True if implicit value is required.
const ADVariableValue * getADDefaultValue(const std::string &var_name) const
Helper method to return (and insert if necessary) the AD default value for an uncoupled variable.