12#ifdef MOOSE_KOKKOS_SCOPE
23#include <unordered_map>
46#ifdef MOOSE_KOKKOS_ENABLED
78 bool isCoupledScalar(
const std::string & var_name,
unsigned int i = 0)
const;
92 unsigned int coupledScalar(
const std::string & var_name,
unsigned int comp = 0)
const;
109 unsigned int comp = 0)
const;
118 unsigned int comp = 0)
const;
127 template <
bool is_ad>
129 unsigned int comp = 0)
const;
139 const std::string & tag_param_name,
140 unsigned int comp = 0)
const;
150 const std::string & tag_param_name,
151 unsigned int comp = 0)
const;
160 unsigned int comp = 0)
const;
169 unsigned int comp = 0)
const;
187 unsigned int comp = 0)
const;
196 unsigned int comp = 0)
const;
205 unsigned int comp = 0)
const;
214 unsigned int comp = 0)
const;
224 unsigned int comp = 0)
const;
234 unsigned int comp = 0)
const;
236#ifdef MOOSE_KOKKOS_SCOPE
238 const std::string & tag_name,
239 unsigned int comp = 0)
const;
241 const std::string & tag_param_name,
242 unsigned int comp = 0)
const;
245 unsigned int comp = 0)
const;
247 unsigned int comp = 0)
const;
249 unsigned int comp = 0)
const;
251 unsigned int comp = 0)
const;
253 unsigned int comp = 0)
const;
302 void checkVar(
const std::string & var_name)
const;
312#ifdef MOOSE_KOKKOS_SCOPE
314 const std::string & tag_name,
315 unsigned int comp)
const;
331 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).
The Kokkos wrapper class that can hold the reference of an arithmetic scalar variable.
The Kokkos wrapper classes for MOOSE-like variable value access.
The Kokkos variable object that carries the coupled variable and tag information.
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 VariableValue & coupledMatrixTagScalarValue(const std::string &var_name, const std::string &tag_param_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 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.
Moose::Kokkos::VariableValue kokkosCoupledScalarValueOld(const std::string &var_name, unsigned int comp=0) const
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)
Moose::Kokkos::VariableValue kokkosCoupledVectorTagScalarValue(const std::string &var_name, const std::string &tag_param_name, unsigned int comp=0) const
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 & coupledVectorTagScalarValue(const std::string &var_name, const std::string &tag_param_name, unsigned int comp=0) const
Returns value of a scalar coupled variable.
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...
Moose::Kokkos::VariableValue kokkosCoupledScalarValueOlder(const std::string &var_name, unsigned int comp=0) const
const VariableValue & coupledScalarDotOld(const std::string &var_name, unsigned int comp=0) const
Returns the old time derivative of a scalar coupled variable.
Moose::Kokkos::VariableValue kokkosCoupledVectorTagScalarValueByName(const std::string &var_name, const std::string &tag_name, unsigned int comp=0) const
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.
Moose::Kokkos::Scalar< const Real > kokkosCoupledScalarDotDu(const std::string &var_name, unsigned int comp=0) const
std::unordered_map< std::string, std::unique_ptr< ADVariableValue > > _dual_default_value
Will hold the default AD value for optional coupled scalar variables.
Moose::Kokkos::VariableValue kokkosCoupledScalarValue(const std::string &var_name, unsigned int comp=0) const
Moose::Kokkos::Variable kokkosCoupledVectorTagScalarVariable(const std::string &var_name, const std::string &tag_name, unsigned int comp) const
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.
Moose::Kokkos::VariableValue kokkosCoupledScalarDot(const std::string &var_name, unsigned int comp=0) const
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.