12#ifdef MOOSE_KOKKOS_SCOPE
16#include <unordered_map>
25#define usingCoupleableMembers \
26 using Coupleable::_zero; \
27 using Coupleable::_grad_zero; \
28 using Coupleable::_ad_zero; \
29 using Coupleable::_ad_grad_zero; \
30 using Coupleable::coupled; \
31 using Coupleable::isCoupled; \
32 using Coupleable::coupledComponents
63#ifdef MOOSE_KOKKOS_ENABLED
74 const std::unordered_map<std::string, std::vector<MooseVariableFieldBase *>> &
157 virtual bool isCoupled(
const std::string & var_name,
unsigned int i = 0)
const;
179 VariableName
coupledName(
const std::string & var_name,
unsigned int comp = 0)
const;
186 std::vector<VariableName>
coupledNames(
const std::string & var_name)
const;
195 virtual unsigned int coupled(
const std::string & var_name,
unsigned int comp = 0)
const;
202 std::vector<unsigned int>
coupledIndices(
const std::string & var_name)
const;
212 unsigned int comp = 0)
const;
219 std::vector<const VariableValue *>
coupledValues(
const std::string & var_name)
const;
226 std::vector<const VectorVariableValue *>
coupledVectorValues(
const std::string & var_name)
const;
234 template <
bool is_ad>
236 unsigned int comp = 0)
const;
245 template <
bool is_ad>
247 unsigned int comp = 0)
const;
255 template <
bool is_ad>
256 std::vector<const GenericVariableValue<is_ad> *>
265 template <
bool is_ad>
267 unsigned int comp = 0)
const;
276 template <
bool is_ad>
278 unsigned int comp = 0)
const;
287 template <
bool is_ad>
289 unsigned int comp = 0)
const;
298 unsigned int comp = 0)
const;
314 std::vector<const ADVariableValue *>
adCoupledValues(
const std::string & var_name)
const;
323 unsigned int comp = 0)
const;
333 unsigned int comp = 0)
const;
341 std::vector<const ADVectorVariableValue *>
356 const std::string & tag_name,
357 unsigned int index = 0)
const;
369 const std::string & tag_name)
const;
381 unsigned int index = 0)
const;
384 const std::string & tag_name,
385 unsigned int index = 0)
const;
396 std::vector<const ArrayVariableValue *>
411 const std::string & tag_name,
412 unsigned int index = 0)
const;
423 std::vector<const VariableGradient *>
437 unsigned int index = 0)
const;
440 const std::string & tag_name,
441 unsigned int index = 0)
const;
449 std::vector<const ArrayVariableGradient *>
452 std::vector<const ArrayVariableGradient *>
466 const std::string & tag_name,
467 unsigned int index = 0)
const;
476 const std::string & tag_name,
477 unsigned int comp = 0)
const;
489 const std::string & tag_name)
const;
503 const std::string & tag_name,
504 unsigned int index = 0)
const;
516 const std::string & tag_name)
const;
526 unsigned int comp = 0)
const;
536 unsigned int comp = 0)
const;
543 std::vector<const ArrayVariableValue *>
coupledArrayValues(
const std::string & var_name)
const;
583 unsigned int comp = 0)
const;
590 std::vector<const VariableValue *>
coupledValuesOld(
const std::string & var_name)
const;
597 std::vector<const VectorVariableValue *>
608 unsigned int comp = 0)
const;
615 std::vector<const VariableValue *>
coupledValuesOlder(
const std::string & var_name)
const;
624 unsigned int comp = 0)
const;
634 unsigned int comp = 0)
const;
644 unsigned int comp = 0)
const;
654 unsigned int comp = 0)
const;
664 unsigned int comp = 0)
const;
674 unsigned int comp = 0)
const;
681 std::vector<const VariableGradient *>
coupledGradients(
const std::string & var_name)
const;
691 unsigned int comp = 0)
const;
701 unsigned int comp = 0)
const;
709 std::vector<const ADVariableGradient *>
adCoupledGradients(
const std::string & var_name)
const;
718 template <
bool is_ad>
720 unsigned int comp = 0)
const;
728 template <
bool is_ad>
729 std::vector<const GenericVariableGradient<is_ad> *>
740 unsigned int comp = 0)
const;
749 unsigned int comp = 0)
const;
759 unsigned int comp = 0)
const;
769 unsigned int comp = 0)
const;
776 std::vector<const VariableGradient *>
coupledGradientsOld(
const std::string & var_name)
const;
786 unsigned int comp = 0)
const;
795 unsigned int comp = 0)
const;
805 unsigned int comp = 0)
const;
815 unsigned int comp = 0)
const;
825 unsigned int comp = 0)
const;
835 unsigned int comp = 0)
const;
845 unsigned int comp = 0)
const;
855 unsigned int comp = 0)
const;
865 unsigned int comp = 0)
const;
875 unsigned int comp = 0)
const;
885 unsigned int comp = 0)
const;
895 unsigned int comp = 0)
const;
905 unsigned int comp = 0)
const;
915 unsigned int comp = 0)
const;
925 unsigned int comp = 0)
const;
936 unsigned int comp = 0)
const;
947 unsigned int comp = 0)
const;
958 unsigned int comp = 0)
const;
968 unsigned int comp = 0)
const;
979 unsigned int comp = 0)
const;
990 unsigned int comp = 0)
const;
999 unsigned int comp = 0)
const;
1008 unsigned int comp = 0)
const;
1015 std::vector<const VariableValue *>
coupledDots(
const std::string & var_name)
const;
1025 unsigned int comp = 0)
const;
1034 unsigned int comp = 0)
const;
1044 unsigned int comp = 0)
const;
1060 std::vector<const ADVariableValue *>
adCoupledDots(
const std::string & var_name)
const;
1070 unsigned int comp = 0)
const;
1081 unsigned int comp = 0)
const;
1091 unsigned int comp = 0)
const;
1101 unsigned int comp = 0)
const;
1111 unsigned int comp = 0)
const;
1121 unsigned int comp = 0)
const;
1131 unsigned int comp = 0)
const;
1141 unsigned int comp = 0)
const;
1151 unsigned int comp = 0)
const;
1161 unsigned int comp = 0)
const;
1171 unsigned int comp = 0)
const;
1181 unsigned int comp = 0)
const;
1191 unsigned int comp = 0)
const;
1201 unsigned int comp = 0)
const;
1211 unsigned int comp = 0)
const;
1219 template <
typename T>
1220 const T &
coupledNodalValue(
const std::string & var_name,
unsigned int comp = 0)
const;
1228 template <
typename T>
1230 unsigned int comp = 0)
const;
1238 template <
typename T>
1247 template <
typename T>
1256 template <
typename T>
1266 template <
typename T>
1267 const T &
coupledNodalDot(
const std::string & var_name,
unsigned int comp = 0)
const;
1277 unsigned int comp = 0)
const;
1287 unsigned int comp = 0)
const;
1297 unsigned int comp = 0)
const;
1306 unsigned int comp = 0)
const;
1314 std::vector<const VariableValue *>
coupledAllDofValues(
const std::string & var_name)
const;
1323 unsigned int comp = 0)
const;
1340 unsigned int comp = 0)
const;
1357 unsigned int comp = 0)
const;
1367 unsigned int comp = 0)
const;
1390 template <
bool is_ad>
1397 template <
bool is_ad>
1404 template <
bool is_ad>
1423 std::unordered_map<std::string, std::vector<MooseVariableFieldBase *>>
_coupled_vars;
1456 mutable std::unordered_map<std::string, std::vector<std::unique_ptr<VariableValue>>>
1463 mutable std::unordered_map<std::string, std::unique_ptr<VectorVariableValue>>
1470 mutable std::unordered_map<std::string, std::unique_ptr<MooseArray<ADRealVectorValue>>>
1549 checkVar(
const std::string & var_name,
unsigned int comp = 0,
unsigned int comp_bound = 0)
const;
1555 template <
typename T>
1562 template <
typename T>
1564 const std::string & tag_name,
1565 unsigned int index = 0)
const;
1570 template <
typename T>
1577 template <
typename T>
1579 const std::string & var_name,
const std::string & tag_name,
unsigned int comp = 0)
const;
1586 template <
typename T>
1588 requestStates(
const std::string & var_name,
const TagName & tag_name,
const unsigned int comp);
1643 std::vector<const MooseVariableFieldBase *>
getFieldVars(
const std::string & var_name)
const;
1648 template <
typename T>
1649 const T *
getVarHelper(
const std::string & var_name,
unsigned int comp)
const;
1654 template <
typename T>
1655 T *
getVarHelper(
const std::string & var_name,
unsigned int comp);
1662 template <
typename T>
1663 std::vector<const T *>
getVarsHelper(
const std::string & var_name)
const;
1721 template <
typename T,
typename Func>
1725 std::vector<T> vals(components);
1726 for (MooseIndex(components) comp = 0; comp < components; ++comp)
1727 vals[comp] = func(comp);
1811 template <
typename T>
1814 template <
typename T>
1848#ifdef MOOSE_KOKKOS_SCOPE
1850 const std::string & tag_name,
1851 unsigned int comp)
const;
1853 const std::string & tag_name)
const;
1855 const std::string & tag_name,
1856 unsigned int comp)
const;
1858 const std::string & tag_name)
const;
1863 const std::string & tag_name,
1864 unsigned int comp = 0)
const;
1867 const std::string & tag_name)
const;
1869 const std::string & tag_name,
1870 unsigned int comp = 0)
const;
1873 const std::string & tag_name)
const;
1875 const std::string & tag_name,
1876 unsigned int comp = 0)
const;
1879 const std::string & tag_name)
const;
1881 const std::string & tag_name,
1882 unsigned int comp = 0)
const;
1885 const std::string & tag_name)
const;
1888 const std::string & tag_param_name,
1889 unsigned int comp = 0)
const;
1892 const std::string & tag_param_name)
const;
1894 const std::string & tag_param_name,
1895 unsigned int comp = 0)
const;
1898 const std::string & tag_param_name)
const;
1900 const std::string & tag_param_name,
1901 unsigned int comp = 0)
const;
1904 const std::string & tag_param_name)
const;
1906 const std::string & tag_param_name,
1907 unsigned int comp = 0)
const;
1910 const std::string & tag_param_name)
const;
1913 const std::string & var_name,
const std::string & tag_name,
unsigned int comp = 0)
const;
1916 const std::string & tag_name)
const;
1918 const std::string & var_name,
const std::string & tag_name,
unsigned int comp = 0)
const;
1921 const std::string & tag_name)
const;
1923 const std::string & var_name,
const std::string & tag_name,
unsigned int comp = 0)
const;
1926 const std::string & tag_name)
const;
1928 const std::string & var_name,
const std::string & tag_name,
unsigned int comp = 0)
const;
1931 const std::string & tag_name)
const;
1935 const std::string & tag_param_name,
1936 unsigned int comp = 0)
const;
1939 const std::string & tag_param_name)
const;
1942 const std::string & tag_param_name,
1943 unsigned int comp = 0)
const;
1946 const std::string & tag_param_name)
const;
1949 const std::string & tag_param_name,
1950 unsigned int comp = 0)
const;
1953 const std::string & tag_param_name)
const;
1956 const std::string & tag_param_name,
1957 unsigned int comp = 0)
const;
1960 const std::string & tag_param_name)
const;
1963 unsigned int comp = 0)
const;
1966 unsigned int comp = 0)
const;
1969 unsigned int comp = 0)
const;
1972 unsigned int comp = 0)
const;
1976 unsigned int comp = 0)
const;
1979 unsigned int comp = 0)
const;
1982 unsigned int comp = 0)
const;
1985 unsigned int comp = 0)
const;
1989 unsigned int comp = 0)
const;
1992 unsigned int comp = 0)
const;
1995 unsigned int comp = 0)
const;
1998 unsigned int comp = 0)
const;
2002 unsigned int comp = 0)
const;
2005 unsigned int comp = 0)
const;
2009 unsigned int comp = 0)
const;
2011 unsigned int comp = 0)
const;
2013 unsigned int comp = 0)
const;
2015 unsigned int comp = 0)
const;
2025 unsigned int comp = 0)
const;
2027 unsigned int comp = 0)
const;
2029 unsigned int comp = 0)
const;
2031 unsigned int comp = 0)
const;
2042 unsigned int comp = 0)
const;
2048 unsigned int comp = 0)
const;
2059 unsigned int comp = 0)
const;
2061 unsigned int comp = 0)
const;
2067 const std::string & tag_name,
2068 unsigned int comp = 0)
const;
2071 const std::string & tag_name)
const;
2073 const std::string & var_name,
const std::string & tag_name,
unsigned int comp = 0)
const;
2076 const std::string & tag_name)
const;
2078 const std::string & var_name,
const std::string & tag_name,
unsigned int comp = 0)
const;
2081 const std::string & tag_name)
const;
2083 const std::string & var_name,
const std::string & tag_name,
unsigned int comp = 0)
const;
2086 const std::string & tag_name)
const;
2089 const std::string & tag_param_name,
2090 unsigned int comp = 0)
const;
2093 const std::string & tag_param_name)
const;
2096 const std::string & tag_param_name,
2097 unsigned int comp = 0)
const;
2100 const std::string & tag_param_name)
const;
2103 const std::string & tag_param_name,
2104 unsigned int comp = 0)
const;
2107 const std::string & tag_param_name)
const;
2110 const std::string & tag_param_name,
2111 unsigned int comp = 0)
const;
2114 const std::string & tag_param_name)
const;
2117 unsigned int comp = 0)
const;
2120 unsigned int comp = 0)
const;
2123 unsigned int comp = 0)
const;
2126 unsigned int comp = 0)
const;
2130 unsigned int comp = 0)
const;
2133 unsigned int comp = 0)
const;
2136 unsigned int comp = 0)
const;
2139 unsigned int comp = 0)
const;
2143 unsigned int comp = 0)
const;
2146 unsigned int comp = 0)
const;
2150 unsigned int comp = 0)
const;
2154 unsigned int comp = 0)
const;
2158 unsigned int comp = 0)
const;
2161 unsigned int comp = 0)
const;
2165 unsigned int comp = 0)
const;
2173template <
typename T>
2178 auto name_to_use = var_name;
2189 auto deprecated_name = it->second;
2190 if (
checkVar(deprecated_name, comp, 0))
2191 name_to_use = deprecated_name;
2200 "Trying to get a coupled var " << name_to_use <<
" that doesn't exist");
2201 mooseAssert(comp < coupled_vars_it->second.size(),
2202 "Component index outside of coupled variables vector");
2203 auto *
const base_var = coupled_vars_it->second[comp];
2205 if (
auto coupled_var =
dynamic_cast<T *
>(base_var))
2210 if (var->name() == base_var->name())
2211 mooseError(
"The named variable is a standard variable, try a "
2212 "'coupled[Value/Gradient/Dot/etc]...' function instead");
2214 if (var->name() == base_var->name())
2215 mooseError(
"The named variable is a vector variable, try a "
2216 "'coupledVector[Value/Gradient/Dot/etc]...' function instead");
2218 if (var->name() == base_var->name())
2219 mooseError(
"The named variable is an array variable, try a "
2220 "'coupledArray[Value/Gradient/Dot/etc]...' function instead");
2222 if (var->name() == base_var->name())
2223 mooseError(
"The named variable is a finite volume variable, which the coupled[...] routine "
2224 "used does not support. Try using the functor system routines instead.");
2227 "' is of a different C++ type than you tried to fetch it as.");
2231template <
typename T>
2235 return const_cast<Coupleable *
>(
this)->getVarHelper<T>(var_name, comp);
2238template <
typename T>
2239std::vector<const T *>
2243 std::vector<const T *>
vars(components);
2244 for (
const auto i : make_range(components))
2245 vars[i] = getVarHelper<T>(var_name, i);
MooseVariableField< Real > MooseWritableVariable
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application.
OutputTools< Real >::VariablePhiValue VariablePhiValue
OutputTools< RealVectorValue >::VariableCurl VectorVariableCurl
OutputTools< Real >::VariableGradient VariableGradient
OutputTools< RealEigenVector >::VariableValue ArrayVariableValue
Moose::GenericType< VariableValue, is_ad > GenericVariableValue
Moose::GenericType< VectorVariableValue, is_ad > GenericVectorVariableValue
Moose::GenericType< VariableSecond, is_ad > GenericVariableSecond
OutputTools< Real >::VariableValue VariableValue
OutputTools< RealVectorValue >::VariableDivergence VectorVariableDivergence
OutputTools< Real >::VariablePhiGradient VariablePhiGradient
Moose::GenericType< VariableGradient, is_ad > GenericVariableGradient
OutputTools< RealEigenVector >::VariableGradient ArrayVariableGradient
OutputTools< Real >::VariableSecond VariableSecond
OutputTools< RealVectorValue >::VariableGradient VectorVariableGradient
OutputTools< Real >::VariablePhiSecond VariablePhiSecond
OutputTools< RealVectorValue >::VariableValue VectorVariableValue
Interface for objects that needs coupling capabilities.
const ADVariableValue & adZeroValue() const
method that returns _zero to RESIDUAL computing objects and _ad_zero to JACOBIAN computing objects
virtual const VariableValue & coupledNodalDotOld(const std::string &var_name, unsigned int comp=0) const
Nodal values of old time derivative of a coupled variable.
std::unordered_map< std::string, std::vector< MooseVariableScalar * > > _c_coupled_scalar_vars
Scalar variables coupled into this object (for error checking)
std::unordered_map< std::string, std::unique_ptr< ArrayVariableValue > > _default_array_value
Will hold the default value for optional array coupled variables.
Moose::Kokkos::VariableValue kokkosCoupledNodalValuesOld(const std::string &var_name) const
virtual const ArrayVariableGradient & coupledArrayGradientDot(const std::string &var_name, unsigned int comp=0) const
Retun a gradient of a coupled array variable's time derivative.
virtual const VariableGradient & coupledGradientOlder(const std::string &var_name, unsigned int comp=0) const
Returns an old gradient from two time steps previous of a coupled variable.
bool hasWritableCoupledVariables() const
Checks whether the object has any writable coupled variables.
std::vector< const VariableValue * > coupledVectorTagValues(const std::string &var_names, TagID tag) const
Returns the values for all the coupled variables desired for a given tag.
virtual const VectorVariableValue & coupledVectorValue(const std::string &var_name, unsigned int comp=0) const
Returns value of a coupled vector variable.
Moose::Kokkos::VectorVariableValue kokkosCoupledVectorTagVectorNodalValuesByName(const std::string &var_name, const std::string &tag_name) const
virtual const ADVariableValue & adCoupledDofValues(const std::string &var_name, unsigned int comp=0) const
Returns DOF value of a coupled variable for use in Automatic Differentiation.
const std::set< TagID > & getFEVariableCoupleableMatrixTags() const
Moose::Kokkos::ADVariableValue kokkosADCoupledVectorTagDofValueByName(const std::string &var_name, const std::string &tag_name, unsigned int comp=0) const
const ADVariableValue * getADDefaultValue(const std::string &var_name) const
Helper method to return (and insert if necessary) the default value for Automatic Differentiation for...
Moose::Kokkos::VariableGradient kokkosCoupledGradientOld(const std::string &var_name, unsigned int comp=0) const
VectorVariableCurl _default_vector_curl
This will always be zero because the default values for optionally coupled variables is always consta...
const ADVariableValue & adCoupledDotDot(const std::string &var_name, unsigned int comp=0) const
Second time derivative of a coupled variable for ad simulations.
const GenericVariableGradient< is_ad > & coupledGenericGradient(const std::string &var_name, unsigned int comp=0) const
Returns gradient of a coupled variable for use in templated automatic differentiation.
Moose::Kokkos::VariableValue kokkosCoupledNodalDot(const std::string &var_name, unsigned int comp=0) const
bool _c_is_implicit
True if implicit value is required.
virtual const VectorVariableCurl & coupledCurlOld(const std::string &var_name, unsigned int comp=0) const
Returns an old curl from previous time step of a coupled variable.
Moose::Kokkos::VariableValue kokkosCoupledDofValuesOlder(const std::string &var_name) const
Moose::Kokkos::VariableValue kokkosCoupledVectorTagValueByName(const std::string &var_name, const std::string &tag_name, unsigned int comp=0) const
virtual const ArrayVariableGradient & coupledArrayGradient(const std::string &var_name, unsigned int comp=0) const
Returns gradient of a coupled array variable.
virtual const VectorVariableGradient & coupledVectorGradientOlder(const std::string &var_name, unsigned int comp=0) const
Returns an old gradient from two time steps previous of a coupled vector variable.
virtual const ArrayVariableGradient & coupledArrayGradientOld(const std::string &var_name, unsigned int comp=0) const
Returns an old gradient from previous time step of a coupled array variable.
virtual const VectorVariableValue & coupledVectorDotOld(const std::string &var_name, unsigned int comp=0) const
Old time derivative of a coupled vector variable.
Moose::Kokkos::VectorVariableValue kokkosCoupledVectorNodalValues(const std::string &var_name) const
Moose::Kokkos::VariableGradient kokkosCoupledVectorTagGradient(const std::string &var_name, const std::string &tag_param_name, unsigned int comp=0) const
const GenericVariableValue< is_ad > & coupledGenericValue(const std::string &var_name, unsigned int comp=0) const
Returns value of a coupled variable for use in templated automatic differentiation classes.
Moose::Kokkos::VariableValue kokkosCoupledNodalValuesOlder(const std::string &var_name) const
virtual const ArrayVariableGradient & coupledVectorTagArrayGradient(const std::string &var_names, TagID tag, unsigned int index=0) const
Returns gradient of a coupled array variable for a given tag.
virtual const VectorVariableValue & coupledVectorDotDotOld(const std::string &var_name, unsigned int comp=0) const
Old second time derivative of a coupled vector variable.
const ADVariableGradient & adCoupledGradient(const std::string &var_name, unsigned int comp=0) const
Returns gradient of a coupled variable for use in Automatic Differentiation.
Moose::Kokkos::VariableValue kokkosCoupledNodalValue(const std::string &var_name, unsigned int comp=0) const
Moose::Kokkos::Scalar< const Real > kokkosCoupledDotDu(const std::string &var_name, unsigned int comp=0) const
std::vector< ArrayMooseVariable * > _coupled_array_moose_vars
Vector of array coupled variables.
std::unordered_map< std::string, std::vector< unsigned int > > _optional_var_index
Unique indices for optionally coupled vars that weren't provided.
Moose::Kokkos::VariableValue kokkosCoupledDots(const std::string &var_name) const
virtual bool isCoupledConstant(const std::string &var_name) const
Returns true if a variable passed as a coupled value is really a constant.
MooseArray< ADRealTensorValue > _ad_default_second
This will always be zero because the default values for optionally coupled variables is always consta...
Moose::Kokkos::ADVariableValue kokkosADCoupledVectorTagValuesByName(const std::string &var_name, const std::string &tag_name) const
Moose::Kokkos::ADVariableValue kokkosADCoupledVectorTagNodalValuesByName(const std::string &var_name, const std::string &tag_name) const
Moose::Kokkos::ADVariableValue kokkosADCoupledVectorTagDofValues(const std::string &var_name, const std::string &tag_param_name) const
Moose::Kokkos::VectorVariableValue kokkosCoupledVectorValue(const std::string &var_name, unsigned int comp=0) const
const OutputTools< T >::VariableValue & vectorTagDofValueHelper(const std::string &var_name, TagID tag, unsigned int comp=0) const
Generic helper method to get vector tag degree of freedom values based on tag ID.
virtual const VectorVariableDivergence & coupledDivOld(const std::string &var_name, unsigned int comp=0) const
Returns an old divergence from previous time step of a coupled variable.
virtual const VariableValue & coupledDot(const std::string &var_name, unsigned int comp=0) const
Time derivative of a coupled variable.
Moose::Kokkos::VariableValue kokkosCoupledNodalValueOld(const std::string &var_name, unsigned int comp=0) const
virtual const ArrayVariableValue & coupledArrayValue(const std::string &var_name, unsigned int comp=0) const
Returns value of a coupled array variable.
Moose::Kokkos::VariableGradient kokkosZeroGradient() const
Moose::Kokkos::VectorVariableValue kokkosCoupledVectorNodalValueOld(const std::string &var_name, unsigned int comp=0) const
Moose::Kokkos::VectorVariableGradient kokkosCoupledVectorGradientsOld(const std::string &var_name) const
Moose::Kokkos::VectorVariableValue kokkosCoupledVectorValuesOlder(const std::string &var_name) const
virtual const VariableValue & coupledVectorDotDotDu(const std::string &var_name, unsigned int comp=0) const
Second time derivative of a coupled vector variable with respect to the coefficients.
std::unordered_map< std::string, std::vector< std::unique_ptr< VariableValue > > > _default_value
Will hold the default value for optional coupled variables.
Moose::Kokkos::VariableValue kokkosCoupledVectorTagDofValueByName(const std::string &var_name, const std::string &tag_name, unsigned int comp=0) const
Moose::Kokkos::VectorVariableGradient kokkosCoupledVectorTagVectorGradientsByName(const std::string &var_name, const std::string &tag_name) const
virtual const ArrayVariableValue & coupledArrayDotOld(const std::string &var_name, unsigned int comp=0) const
Old time derivative of a coupled array variable.
void addFEVariableCoupleableVectorTag(TagID tag)
const GenericVariableGradient< is_ad > & genericZeroGradient()
Returns zero gradient templated with automatic differentiation boolean.
Moose::Kokkos::VariableValue kokkosCoupledVectorTagNodalValuesByName(const std::string &var_name, const std::string &tag_name) const
Moose::Kokkos::VectorVariableValue kokkosCoupledVectorDofValues(const std::string &var_name) const
virtual const VariableValue & coupledValueOld(const std::string &var_name, unsigned int comp=0) const
Returns an old value from previous time step of a coupled variable.
virtual const VariableGradient & coupledGradientDot(const std::string &var_name, unsigned int comp=0) const
Time derivative of the gradient of a coupled variable.
const ArrayVariableValue & coupledVectorTagArrayDofValue(const std::string &var_name, const std::string &tag_name, unsigned int comp=0) const
Returns evaluations of a tagged vector at the requested variable's degree of freedom indices.
const GenericVariableSecond< is_ad > & genericZeroSecond()
Returns zero second derivative templated with automatic differentiation boolean.
bool checkVar(const std::string &var_name, unsigned int comp=0, unsigned int comp_bound=0) const
Check that the right kind of variable is being coupled in.
virtual const VariableValue & coupledValue(const std::string &var_name, unsigned int comp=0) const
Returns value of a coupled variable.
Moose::Kokkos::ADVariableValue kokkosADCoupledDofValueOlder(const std::string &var_name, unsigned int comp=0) const
const ADVectorVariableValue & adCoupledVectorValue(const std::string &var_name, unsigned int comp=0) const
Returns value of a coupled vector variable for use in Automatic Differentiation.
std::vector< const ArrayVariableGradient * > coupledVectorTagArrayGradients(const std::string &var_names, TagID tag) const
Returns gradients for all the coupled variables desired for a given tag.
Moose::Kokkos::ADVariableValue kokkosADCoupledVectorTagNodalValue(const std::string &var_name, const std::string &tag_param_name, unsigned int comp=0) const
std::vector< const VariableValue * > coupledVectorTagDofValues(const std::string &var_names, TagID tag) const
Returns the dof values for all the coupled variables desired for a given tag.
std::vector< const VariableGradient * > coupledGradientsOld(const std::string &var_name) const
Returns the old gradients for all of a coupled variable's components.
Moose::Kokkos::VariableValue kokkosCoupledValues(const std::string &var_name) const
ArrayVariableValue _default_array_value_zero
This will always be zero because the default values for optionally coupled variables is always consta...
Moose::Kokkos::VariableValue kokkosCoupledNodalValues(const std::string &var_name) const
Moose::Kokkos::Variable kokkosCoupledVectorTagVectorVariable(const std::string &var_name, const std::string &tag_name, unsigned int comp) const
const GenericVariableValue< is_ad > & coupledGenericDofValue(const std::string &var_name, unsigned int comp=0) const
Returns DOF value of a coupled variable for use in templated automatic differentiation classes.
Moose::Kokkos::ADVariableGradient kokkosADCoupledGradientsOlder(const std::string &var_name) const
virtual const VariableGradient & coupledGradientPreviousNL(const std::string &var_name, unsigned int comp=0) const
Returns gradient of a coupled variable for previous Newton iterate.
VectorVariableDivergence _default_div
This will always be zero because the default values for optionally coupled variables is always consta...
Moose::Kokkos::VariableValue kokkosCoupledDofValue(const std::string &var_name, unsigned int comp=0) const
const ADVariableValue & adCoupledLowerValue(const std::string &var_name, unsigned int comp=0) const
Returns value of a coupled lower-dimensional variable for use in Automatic Differentiation.
std::vector< const ADVariableValue * > adCoupledValues(const std::string &var_name) const
Returns the values for all of a coupled variable's components for use in Automatic Differentiation.
const VariableValue & _zero
Zero value of a variable.
auto & getWritableCoupledVariables() const
returns a reference to the set of writable coupled variables
Moose::Kokkos::VariableValue kokkosCoupledVectorTagDofValues(const std::string &var_name, const std::string &tag_param_name) const
std::unordered_map< std::string, std::vector< MooseVariableFieldBase * > > _coupled_vars
Coupled vars whose values we provide.
std::vector< const ADVariableValue * > adCoupledDots(const std::string &var_name) const
Returns the time derivatives for all of a coupled variable's components for ad simulations.
Moose::Kokkos::VariableValue kokkosCoupledVectorTagNodalValue(const std::string &var_name, const std::string &tag_param_name, unsigned int comp=0) const
Moose::Kokkos::VariableValue kokkosCoupledDofValueOlder(const std::string &var_name, unsigned int comp=0) const
Moose::Kokkos::ADVariableValue kokkosADCoupledDofValuesOld(const std::string &var_name) const
Moose::Kokkos::VectorVariableValue kokkosCoupledVectorNodalValuesOld(const std::string &var_name) const
const ADVariableValue & adCoupledValue(const std::string &var_name, unsigned int comp=0) const
Returns value of a coupled variable for use in Automatic Differentiation.
Moose::Kokkos::ADVariableValue kokkosADCoupledNodalValueOlder(const std::string &var_name, unsigned int comp=0) const
Moose::Kokkos::ADVariableValue kokkosADCoupledDofValue(const std::string &var_name, unsigned int comp=0) const
std::vector< T > coupledVectorHelper(const std::string &var_name, const Func &func) const
Moose::Kokkos::VectorVariableValue kokkosCoupledVectorValues(const std::string &var_name) const
const VariableGradient & _grad_zero
Zero gradient of a variable.
const ADVariableSecond & adCoupledSecond(const std::string &var_name, unsigned int comp=0) const
Returns second derivatives of a coupled variable for use in Automatic Differentiation.
Moose::Kokkos::VectorVariableValue kokkosCoupledVectorTagVectorValue(const std::string &var_name, const std::string &tag_param_name, unsigned int comp=0) const
MooseArray< ADRealTensorValue > _ad_default_vector_gradient
This will always be zero because the default values for optionally coupled vector variables is always...
virtual const VariableValue & coupledNodalDotDotOld(const std::string &var_name, unsigned int comp=0) const
Nodal values of old second time derivative of a coupled variable.
virtual const VectorVariableDivergence & coupledDivOlder(const std::string &var_name, unsigned int comp=0) const
Returns an old divergence from two time steps previous of a coupled variable.
std::unordered_map< std::string, std::unique_ptr< MooseArray< ADReal > > > _ad_default_value
Will hold the default value for optional coupled variables for automatic differentiation.
virtual const VectorVariableCurl & coupledCurl(const std::string &var_name, unsigned int comp=0) const
Returns curl of a coupled variable.
Moose::Kokkos::ADVariableValue kokkosADCoupledNodalValue(const std::string &var_name, unsigned int comp=0) const
const MooseObject *const _obj
virtual const VariableValue & coupledValueOlder(const std::string &var_name, unsigned int comp=0) const
Returns an old value from two time steps previous of a coupled variable.
Moose::Kokkos::ADVariableValue kokkosADCoupledValuesOlder(const std::string &var_name) const
bool _c_nodal
True if we provide coupling to nodal values.
Moose::Kokkos::VariableGradient kokkosCoupledGradient(const std::string &var_name, unsigned int comp=0) const
Moose::Kokkos::VectorVariableValue kokkosCoupledVectorDot(const std::string &var_name, unsigned int comp=0) const
VectorVariableGradient _default_vector_gradient
This will always be zero because the default values for optionally coupled variables is always consta...
Moose::Kokkos::VectorVariableGradient kokkosCoupledVectorGradientsOlder(const std::string &var_name) const
std::set< TagID > & getFEVariableCoupleableVectorTags()
Moose::Kokkos::VariableValue kokkosCoupledValueOlder(const std::string &var_name, unsigned int comp=0) const
const MooseArray< ADRealTensorValue > & _ad_second_zero
std::vector< const VariableGradient * > coupledGradients(const std::string &var_name) const
Returns the gradients for all of a coupled variable's components.
virtual const VariableSecond & coupledSecondPreviousNL(const std::string &var_name, unsigned int comp=0) const
Returns second derivative of a coupled variable for the previous Newton iterate.
const VectorVariableCurl & _vector_curl_zero
Zero value of the curl of a vector variable.
virtual const VariableSecond & coupledSecondOld(const std::string &var_name, unsigned int comp=0) const
Returns an old second spatial derivatives from previous time step of a coupled variable.
MooseArray< ADRealVectorValue > _ad_default_curl
This will always be zero because the default values for optionally coupled vector variables is always...
Moose::Kokkos::VariableGradient kokkosCoupledVectorTagGradientByName(const std::string &var_name, const std::string &tag_name, unsigned int comp=0) const
std::set< TagID > _fe_coupleable_matrix_tags
Moose::Kokkos::ADVariableValue kokkosADCoupledVectorTagDofValuesByName(const std::string &var_name, const std::string &tag_name) const
Moose::Kokkos::VariableGradient kokkosCoupledVectorTagGradients(const std::string &var_name, const std::string &tag_param_name) const
const ADVariableGradient & adZeroGradient() const
method that returns _grad_zero to RESIDUAL computing objects and _ad_grad_zero to JACOBIAN computing ...
virtual const VectorVariableGradient & coupledVectorGradient(const std::string &var_name, unsigned int comp=0) const
Returns gradient of a coupled vector variable.
const ADVectorVariableSecond & adCoupledVectorSecond(const std::string &var_name, unsigned int comp=0) const
Returns second derivatives of a coupled vector variable for use in Automatic Differentiation.
std::vector< const VectorVariableValue * > coupledVectorValuesOld(const std::string &var_name) const
Returns the old values for all of a coupled vector variable's components.
std::unordered_map< std::string, std::unique_ptr< MooseArray< ADRealVectorValue > > > _ad_default_vector_value
Will hold the default value for optional vector coupled variables for automatic differentiation.
Moose::Kokkos::ADVariableValue kokkosADCoupledNodalDots(const std::string &var_name) const
const ADVectorVariableValue & adCoupledVectorDot(const std::string &var_name, unsigned int comp=0) const
Time derivative of a vector coupled variable for ad simulations.
MooseVariable * getVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled variable.
Moose::Kokkos::Variable kokkosZeroVariable() const
Moose::Kokkos::ADVariableValue kokkosADCoupledNodalValuesOld(const std::string &var_name) const
const ADVariableSecond & adZeroSecond() const
Retrieve a zero second for automatic differentiation.
const T & coupledNodalDot(const std::string &var_name, unsigned int comp=0) const
Nodal values of time derivative of a coupled variable.
Moose::Kokkos::VectorVariableValue kokkosCoupledVectorTagVectorDofValue(const std::string &var_name, const std::string &tag_param_name, unsigned int comp=0) const
Moose::Kokkos::VariableValue kokkosCoupledVectorTagDofValuesByName(const std::string &var_name, const std::string &tag_name) const
Moose::Kokkos::ADVariableValue kokkosADCoupledValues(const std::string &var_name) const
const T & coupledNodalValue(const std::string &var_name, unsigned int comp=0) const
Returns nodal values of a coupled variable.
const VariableValue * getDefaultValue(const std::string &var_name, unsigned int comp) const
Helper method to return (and insert if necessary) the default value for an uncoupled variable.
Moose::Kokkos::ADVariableValue kokkosADCoupledNodalDot(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...
Moose::Kokkos::VectorVariableValue kokkosCoupledVectorValueOlder(const std::string &var_name, unsigned int comp=0) const
Moose::Kokkos::ADVariableGradient kokkosADCoupledGradients(const std::string &var_name) const
Moose::Kokkos::VariableValue kokkosCoupledNodalDots(const std::string &var_name) const
std::vector< const VariableValue * > coupledAllDofValuesOld(const std::string &var_name) const
Returns DoFs in the old solution vector of all of a coupled variable's components for the local eleme...
Moose::Kokkos::VectorVariableGradient kokkosCoupledVectorGradient(const std::string &var_name, unsigned int comp=0) const
void addFEVariableCoupleableMatrixTag(TagID tag)
VectorVariableValue _default_vector_value_zero
This will always be zero because the default values for optionally coupled variables is always consta...
Moose::Kokkos::Variable kokkosCoupledVectorTagVariables(const std::string &var_name, const std::string &tag_name) const
virtual const VectorVariableValue & coupledVectorDot(const std::string &var_name, unsigned int comp=0) const
Time derivative of a coupled vector variable.
Moose::Kokkos::VariableValue kokkosCoupledVectorTagNodalValueByName(const std::string &var_name, const std::string &tag_name, unsigned int comp=0) const
const GenericVariableValue< is_ad > & coupledGenericDotDot(const std::string &var_name, unsigned int comp=0) const
Returns the second time derivative of a coupled variable for use in templated automatic differentiati...
std::unordered_map< std::string, std::unique_ptr< VectorVariableValue > > _default_vector_value
Will hold the default value for optional vector coupled variables.
Moose::Kokkos::ADVariableGradient kokkosADCoupledGradientOlder(const std::string &var_name, unsigned int comp=0) const
Moose::Kokkos::ADVariableValue kokkosADCoupledDot(const std::string &var_name, unsigned int comp=0) const
Moose::Kokkos::VariableValue kokkosCoupledVectorTagDofValue(const std::string &var_name, const std::string &tag_param_name, unsigned int comp=0) const
std::vector< const VariableGradient * > coupledVectorTagGradients(const std::string &var_names, TagID tag) const
Returns gradients for all the coupled variables desired for a given tag.
Moose::Kokkos::VariableValue kokkosCoupledDofValuesOld(const std::string &var_name) const
Moose::Kokkos::VectorVariableValue kokkosCoupledVectorTagVectorDofValuesByName(const std::string &var_name, const std::string &tag_name) const
const T & getDefaultNodalValue(const std::string &var_name, unsigned int comp=0) const
Get nodal default value.
Moose::Kokkos::VectorVariableValue kokkosCoupledVectorTagVectorValuesByName(const std::string &var_name, const std::string &tag_name) const
Moose::Kokkos::ADVariableGradient kokkosADCoupledVectorTagGradients(const std::string &var_name, const std::string &tag_param_name) const
Moose::Kokkos::VariableGradient kokkosCoupledGradientOlder(const std::string &var_name, unsigned int comp=0) const
const ADVariableSecond & getADDefaultSecond() const
Helper method to return (and insert if necessary) the default second derivatives for Automatic Differ...
Moose::Kokkos::ADVariableGradient kokkosADCoupledVectorTagGradient(const std::string &var_name, const std::string &tag_param_name, unsigned int comp=0) const
const std::string & _c_name
The name of the object this interface is part of.
Moose::Kokkos::VectorVariableValue kokkosCoupledVectorDofValueOlder(const std::string &var_name, unsigned int comp=0) const
Moose::Kokkos::VariableValue kokkosZeroNodalValue() const
std::vector< const GenericVariableValue< is_ad > * > coupledGenericValues(const std::string &var_name) const
Returns the values for all of a coupled variable's components for use in templated automatic differen...
Moose::Kokkos::VariableGradient kokkosCoupledGradientsOld(const std::string &var_name) const
const std::vector< ArrayMooseVariable * > & getCoupledArrayMooseVars() const
Get the list of array coupled variables.
Moose::Kokkos::Variable kokkosCoupledVectorTagVectorVariables(const std::string &var_name, const std::string &tag_name) const
const VariablePhiGradient & _grad_phi_zero
Zero gradient of trial function.
virtual const VariableValue & coupledDofValuesOld(const std::string &var_name, unsigned int comp=0) const
Returns DoFs in the old solution vector of a coupled variable for the local element.
virtual const VariableValue & coupledDotDu(const std::string &var_name, unsigned int comp=0) const
Time derivative of a coupled variable with respect to the coefficients.
std::vector< unsigned int > coupledIndices(const std::string &var_name) const
Returns the indices for a coupled variable's components.
const T & coupledNodalValueOlder(const std::string &var_name, unsigned int comp=0) const
Returns an old nodal value from two time steps previous of a coupled variable.
Moose::Kokkos::ADVariableValue kokkosADCoupledValue(const std::string &var_name, unsigned int comp=0) const
const std::vector< MooseVariableFieldBase * > & getCoupledMooseVars() const
Get the list of all coupled variables.
Moose::Kokkos::VariableValue kokkosCoupledValueOld(const std::string &var_name, unsigned int comp=0) const
Moose::Kokkos::ADVariableValue kokkosADCoupledVectorTagDofValue(const std::string &var_name, const std::string &tag_param_name, unsigned int comp=0) const
virtual const VariableValue & coupledValueLower(const std::string &var_name, unsigned int comp=0) const
Returns value of a coupled lower-dimensional variable.
VectorMooseVariable * getVectorVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled vector variable.
Moose::Kokkos::VariableValue kokkosCoupledVectorTagValues(const std::string &var_name, const std::string &tag_param_name) const
std::vector< const ArrayVariableValue * > coupledVectorTagArrayValues(const std::string &var_names, TagID tag) const
Returns the values for all the coupled variables desired for a given tag.
const ADVariableGradient & getADDefaultGradient() const
Helper method to return (and insert if necessary) the default gradient for Automatic Differentiation ...
const GenericVariableValue< is_ad > & genericZeroValue()
Returns zero value templated with automatic differentiation boolean.
Moose::Kokkos::VectorVariableValue kokkosCoupledVectorTagVectorValues(const std::string &var_name, const std::string &tag_param_name) const
const GenericVariableValue< is_ad > & coupledGenericDot(const std::string &var_name, unsigned int comp=0) const
Returns time derivative of a coupled variable for use in templated automatic differentiation classes.
virtual const VariableValue & coupledNodalDotDot(const std::string &var_name, unsigned int comp=0) const
Nodal values of second time derivative of a coupled variable.
std::vector< const VariableValue * > coupledDots(const std::string &var_name) const
Returns the time derivatives for all of a coupled variable's components.
std::vector< const ADVariableGradient * > adCoupledGradients(const std::string &var_name) const
Returns the gradients for all of a coupled variable's components for use in Automatic Differentiation...
const Moose::Functor< T > & getDefaultFunctor(const std::string &var_name) const
FEProblemBase & _c_fe_problem
const MooseVariableFieldBase * getFieldVar(const std::string &var_name, unsigned int comp) const
const MooseVariableFieldBase * getFEVar(const std::string &var_name, unsigned int comp) const
Deprecated method.
THREAD_ID _c_tid
Thread ID of the thread using this object.
virtual const VariableValue & coupledDotDotOld(const std::string &var_name, unsigned int comp=0) const
Old second time derivative of a coupled variable.
const ADVectorVariableCurl & adCoupledCurl(const std::string &var_name, unsigned int comp=0) const
Returns curl of a coupled variable for use in objects utilizing Automatic Differentiation.
const std::set< std::string > _older_state_tags
vector tag names for which we need to request older solution states from the system
Moose::Kokkos::VectorVariableValue kokkosCoupledVectorNodalValue(const std::string &var_name, unsigned int comp=0) const
virtual const VariableSecond & coupledSecond(const std::string &var_name, unsigned int comp=0) const
Returns second spatial derivatives of a coupled variable.
const ADVectorVariableGradient & getADDefaultVectorGradient() const
Helper method to return (and insert if necessary) the default gradient for Automatic Differentiation ...
std::vector< const VariableValue * > coupledValues(const std::string &var_name) const
Returns the values for all of a coupled variable components.
virtual const VectorVariableCurl & coupledCurlOlder(const std::string &var_name, unsigned int comp=0) const
Returns an old curl from two time steps previous of a coupled variable.
Moose::Kokkos::VectorVariableGradient kokkosCoupledVectorTagVectorGradients(const std::string &var_name, const std::string &tag_param_name) const
const VariableSecond & _second_zero
Zero second derivative of a variable.
Moose::Kokkos::VectorVariableGradient kokkosCoupledVectorGradientOld(const std::string &var_name, unsigned int comp=0) const
const Real _kokkos_default_value_zero
kokkos-related variables and methods
Moose::Kokkos::VectorVariableGradient kokkosCoupledVectorTagVectorGradient(const std::string &var_name, const std::string &tag_param_name, unsigned int comp=0) const
VariableValue _default_value_zero
This will always be zero because the default values for optionally coupled variables is always consta...
ArrayVariableGradient _default_array_gradient
This will always be zero because the default values for optionally coupled variables is always consta...
virtual const VariableValue & coupledMatrixTagValue(const std::string &var_names, TagID tag, unsigned int index=0) const
Returns value of a coupled variable for a given tag.
const ADVariableValue & adCoupledDot(const std::string &var_name, unsigned int comp=0) const
Time derivative of a coupled variable for ad simulations.
std::vector< const VariableValue * > coupledMatrixTagValues(const std::string &var_names, TagID tag) const
Returns the diagonal matrix values for all the coupled variables desired for a given tag.
VariableGradient _default_gradient
This will always be zero because the default values for optionally coupled variables is always consta...
Moose::Kokkos::VariableGradient kokkosCoupledVectorTagGradientsByName(const std::string &var_name, const std::string &tag_name) const
const InputParameters & _c_parameters
virtual const VariableGradient & coupledGradient(const std::string &var_name, unsigned int comp=0) const
Returns gradient of a coupled variable.
std::set< TagID > _fe_coupleable_vector_tags
std::vector< const T * > getVarsHelper(const std::string &var_name) const
Helper that can be used to retrieve all the component variables of a variable of arbitrary type T.
virtual const ArrayVariableValue & coupledArrayDotDot(const std::string &var_name, unsigned int comp=0) const
Second time derivative of a coupled array variable.
std::vector< const ArrayVariableValue * > coupledArrayValues(const std::string &var_name) const
Returns the values for all of a coupled array variable's components.
Moose::Kokkos::ADVariableValue kokkosADCoupledVectorTagValue(const std::string &var_name, const std::string &tag_param_name, unsigned int comp=0) const
virtual const VariableValue & coupledVectorDotDu(const std::string &var_name, unsigned int comp=0) const
Time derivative of a coupled vector variable with respect to the coefficients.
virtual const VariableValue & coupledValuePreviousNL(const std::string &var_name, unsigned int comp=0) const
Returns value of previous Newton iterate of a coupled variable.
Moose::Kokkos::ADVariableValue kokkosADCoupledValuesOld(const std::string &var_name) const
Moose::Kokkos::VariableValue kokkosCoupledDot(const std::string &var_name, unsigned int comp=0) const
void checkFuncType(const std::string var_name, VarType t, FuncAge age) const
Moose::Kokkos::ADVariableValue kokkosADCoupledValueOld(const std::string &var_name, unsigned int comp=0) const
Moose::Kokkos::VectorVariableValue kokkosCoupledVectorNodalDot(const std::string &var_name, unsigned int comp=0) const
const VectorVariableValue * getDefaultVectorValue(const std::string &var_name) const
Helper method to return (and insert if necessary) the default value for an uncoupled vector variable.
const ADVariableGradient & adCoupledGradientDot(const std::string &var_name, unsigned int comp=0) const
Returns gradient of a coupled variable's time derivative for use in Automatic Differentiation.
Moose::Kokkos::ADVariableValue kokkosADCoupledNodalValueOld(const std::string &var_name, unsigned int comp=0) const
Moose::Kokkos::ADVariableValue kokkosADCoupledNodalValues(const std::string &var_name) const
virtual const ArrayVariableGradient & coupledArrayGradientOlder(const std::string &var_name, unsigned int comp=0) const
Returns an old gradient from two time steps previous of a coupled array variable.
virtual const VectorVariableDivergence & coupledDiv(const std::string &var_name, unsigned int comp=0) const
Returns divergence of a coupled variable.
Moose::Kokkos::VectorVariableValue kokkosCoupledVectorNodalDots(const std::string &var_name) const
unsigned int _coupleable_max_qps
Maximum qps for any element in this system.
Moose::Kokkos::VariableValue kokkosCoupledDofValueOld(const std::string &var_name, unsigned int comp=0) const
virtual VariableValue & writableCoupledValue(const std::string &var_name, unsigned int comp=0)
Returns a writable reference to a coupled variable for writing to multiple AuxVariables from a single...
virtual const ArrayVariableValue & coupledArrayValueOld(const std::string &var_name, unsigned int comp=0) const
Returns an old value from previous time step of a coupled array variable.
ArrayMooseVariable * getArrayVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled array variable.
Moose::Kokkos::ADVariableValue kokkosADCoupledValueOlder(const std::string &var_name, unsigned int comp=0) const
virtual const VariableGradient & coupledGradientOld(const std::string &var_name, unsigned int comp=0) const
Returns an old gradient from previous time step of a coupled variable.
virtual const VectorVariableValue & coupledVectorDotDot(const std::string &var_name, unsigned int comp=0) const
Second time derivative of a coupled vector variable.
Moose::Kokkos::ADVariableValue kokkosADCoupledVectorTagValueByName(const std::string &var_name, const std::string &tag_name, unsigned int comp=0) const
Moose::Kokkos::VectorVariableValue kokkosCoupledVectorValueOld(const std::string &var_name, unsigned int comp=0) const
Moose::Kokkos::VectorVariableValue kokkosCoupledVectorNodalValueOlder(const std::string &var_name, unsigned int comp=0) const
virtual const VariableValue & coupledDofValuesOlder(const std::string &var_name, unsigned int comp=0) const
Returns DoFs in the older solution vector of a coupled variable for the local element.
Moose::Kokkos::VectorVariableValue kokkosCoupledVectorTagVectorDofValues(const std::string &var_name, const std::string &tag_param_name) const
MooseWritableVariable & writableVariable(const std::string &var_name, unsigned int comp=0)
Returns a writable MooseVariable object for a nodal or elemental variable.
Moose::Kokkos::VectorVariableValue kokkosCoupledVectorTagVectorNodalValueByName(const std::string &var_name, const std::string &tag_name, unsigned int comp=0) const
Moose::Kokkos::VariableGradient kokkosCoupledGradientsOlder(const std::string &var_name) const
std::vector< VariableName > coupledNames(const std::string &var_name) const
Names of the variables in the Coupleable interface.
const bool _c_allow_element_to_nodal_coupling
virtual const ArrayVariableValue & coupledArrayDofValues(const std::string &var_name, unsigned int comp=0) const
Returns DoFs in the current solution vector of a coupled array variable for the local element.
std::vector< const VariableValue * > coupledAllDofValues(const std::string &var_name) const
Returns DoFs in the current solution vector of all of a coupled variable's components for the local e...
Moose::Kokkos::VectorVariableGradient kokkosCoupledVectorGradients(const std::string &var_name) const
Moose::Kokkos::VectorVariableValue kokkosCoupledVectorDots(const std::string &var_name) const
const SystemBase *const _c_sys
Pointer to the system object if the moose object this is an interface for has one.
const VariableValue & coupledArrayDotDu(const std::string &var_name, unsigned int comp=0) const
Time derivative of a coupled array variable with respect to the coefficients.
const ADVectorVariableGradient & adCoupledVectorGradient(const std::string &var_name, unsigned int comp=0) const
Returns gradient of a coupled vector variable for use in Automatic Differentiation.
Moose::Kokkos::ADVariableValue kokkosADCoupledDofValueOld(const std::string &var_name, unsigned int comp=0) const
const T & coupledNodalValueOld(const std::string &var_name, unsigned int comp=0) const
Returns an old nodal value from previous time step of a coupled variable.
Moose::Kokkos::VariableGradient kokkosCoupledGradients(const std::string &var_name) const
VariableName coupledName(const std::string &var_name, unsigned int comp=0) const
Names of the variable in the Coupleable interface.
virtual const VariableValue & coupledDotDot(const std::string &var_name, unsigned int comp=0) const
Second time derivative of a coupled variable.
const MooseArray< ADRealVectorValue > & _ad_grad_zero
const ADVectorVariableValue * getADDefaultVectorValue(const std::string &var_name) const
Helper method to return (and insert if necessary) the default vector value for Automatic Differentiat...
Moose::Kokkos::ADVariableGradient kokkosADCoupledVectorTagGradientsByName(const std::string &var_name, const std::string &tag_name) const
Moose::Kokkos::VariableValue kokkosCoupledVectorTagValue(const std::string &var_name, const std::string &tag_param_name, unsigned int comp=0) const
Moose::Kokkos::VariableValue kokkosCoupledVectorTagValuesByName(const std::string &var_name, const std::string &tag_name) const
Moose::Kokkos::Variable kokkosCoupledVectorTagVariable(const std::string &var_name, const std::string &tag_name, unsigned int comp) const
Moose::Kokkos::ADVariableValue kokkosADCoupledVectorTagNodalValues(const std::string &var_name, const std::string &tag_param_name) const
Moose::Kokkos::VectorVariableValue kokkosCoupledVectorDofValuesOld(const std::string &var_name) const
Moose::Kokkos::VectorVariableValue kokkosCoupledVectorTagVectorNodalValues(const std::string &var_name, const std::string &tag_param_name) const
Moose::Kokkos::VectorVariableValue kokkosCoupledVectorValuesOld(const std::string &var_name) const
const T * getVarHelper(const std::string &var_name, unsigned int comp) const
Helper that that be used to retrieve a variable of arbitrary type T.
unsigned int coupledComponents(const std::string &var_name) const
Number of coupled components.
std::vector< const VectorVariableValue * > coupledVectorValues(const std::string &var_name) const
Returns the values for all of a coupled vector variable's components.
Moose::Kokkos::VariableValue kokkosZeroValue() const
Moose::Kokkos::VariableValue kokkosCoupledValuesOld(const std::string &var_name) const
std::vector< const VariableValue * > coupledAllDofValuesOlder(const std::string &var_name) const
Returns DoFs in the older solution vector of all of a coupled variable's components for the local ele...
Moose::Kokkos::VectorVariableGradient kokkosCoupledVectorGradientOlder(const std::string &var_name, unsigned int comp=0) const
std::vector< MooseVariable * > _coupled_standard_moose_vars
Vector of standard coupled variables.
Moose::Kokkos::VectorVariableValue kokkosCoupledVectorTagVectorValueByName(const std::string &var_name, const std::string &tag_name, unsigned int comp=0) const
Moose::Kokkos::ADVariableValue kokkosADCoupledVectorTagValues(const std::string &var_name, const std::string &tag_param_name) const
const VectorVariableValue & _vector_zero
Zero value of a vector variable.
const GenericVectorVariableValue< is_ad > & coupledGenericVectorValue(const std::string &var_name, unsigned int comp=0) const
Returns value of a coupled vector variable for use in templated automatic differentiation classes.
const std::set< TagID > & getFEVariableCoupleableVectorTags() const
virtual const ArrayVariableValue & coupledArrayValueOlder(const std::string &var_name, unsigned int comp=0) const
Returns an old value from two time steps previous of a coupled array variable.
const VariablePhiSecond & _second_phi_zero
Zero second derivative of a test function.
Moose::Kokkos::VectorVariableValue kokkosCoupledVectorDofValueOld(const std::string &var_name, unsigned int comp=0) const
Moose::Kokkos::VectorVariableValue kokkosCoupledVectorDofValue(const std::string &var_name, unsigned int comp=0) const
Moose::Kokkos::ADVariableGradient kokkosADCoupledGradientOld(const std::string &var_name, unsigned int comp=0) const
Moose::Kokkos::ADVariableGradient kokkosADCoupledGradient(const std::string &var_name, unsigned int comp=0) const
virtual const ArrayVariableValue & coupledVectorTagArrayValue(const std::string &var_names, TagID tag, unsigned int index=0) const
Returns value of a coupled array variable for a given tag.
virtual const VariableGradient & coupledGradientDotDot(const std::string &var_name, unsigned int comp=0) const
Second time derivative of the gradient of a coupled variable.
Moose::Kokkos::ADVariableGradient kokkosADCoupledVectorTagGradientByName(const std::string &var_name, const std::string &tag_name, unsigned int comp=0) const
const std::vector< MooseVariable * > & getCoupledStandardMooseVars() const
Get the list of standard coupled variables.
Moose::Kokkos::VectorVariableValue kokkosCoupledVectorNodalValuesOlder(const std::string &var_name) const
const std::unordered_map< std::string, std::vector< MooseVariableFieldBase * > > & getCoupledVars() const
Get the list of coupled variables.
const VariablePhiValue & _phi_zero
std::vector< const ADVectorVariableValue * > adCoupledVectorValues(const std::string &var_name) const
Returns the values for all of a coupled vector variable's components for use in Automatic Differentia...
virtual unsigned int coupled(const std::string &var_name, unsigned int comp=0) const
Returns the index for a coupled variable by name.
virtual const VariableValue & coupledDotOld(const std::string &var_name, unsigned int comp=0) const
Old time derivative of a coupled variable.
const std::vector< VectorMooseVariable * > & getCoupledVectorMooseVars() const
Get the list of vector coupled variables.
std::vector< std::set< MooseWritableVariable * > > _writable_coupled_variables
keep a set of allocated writable variable references to make sure only one object can obtain them per...
std::vector< const VariableValue * > coupledValuesOlder(const std::string &var_name) const
Returns the older values for all of a coupled variable's components.
Moose::Kokkos::ADVariableValue kokkosADCoupledDots(const std::string &var_name) const
std::set< TagID > & getFEVariableCoupleableMatrixTags()
const std::unordered_map< std::string, std::string > & _new_to_deprecated_coupled_vars
map from new to deprecated variable names
Moose::Kokkos::ADVariableValue kokkosADCoupledDofValues(const std::string &var_name) const
void requestStates(const std::string &var_name, const TagName &tag_name, const unsigned int comp)
Method that may request additional solution states from the variable's system depending on the value ...
virtual void coupledCallback(const std::string &, bool) const
A call-back function provided by the derived object for actions before coupling a variable with funct...
Moose::Kokkos::VariableValue kokkosCoupledValuesOlder(const std::string &var_name) const
Moose::Kokkos::VariableValue kokkosCoupledNodalValueOlder(const std::string &var_name, unsigned int comp=0) const
std::vector< MooseVariableFieldBase * > _coupled_moose_vars
Vector of all coupled variables.
Moose::Kokkos::ADVariableGradient kokkosADCoupledGradientsOld(const std::string &var_name) const
virtual bool isCoupled(const std::string &var_name, unsigned int i=0) const
Returns true if a variables has been coupled as name.
virtual const VariableGradient & coupledVectorTagGradient(const std::string &var_names, TagID tag, unsigned int index=0) const
Returns gradient of a coupled variable for a given tag.
const Moose::ADType< T >::type & adCoupledNodalValue(const std::string &var_name, unsigned int comp=0) const
Returns AD nodal values of a coupled variable.
bool _coupleable_neighbor
Whether or not this object is a "neighbor" object: ie all of it's coupled values should be neighbor v...
virtual const ArrayVariableValue & coupledArrayDotDotOld(const std::string &var_name, unsigned int comp=0) const
Old second time derivative of a coupled array variable.
const std::string & _c_type
The type of the object this interface is part of.
Moose::Kokkos::VariableValue kokkosCoupledVectorTagNodalValues(const std::string &var_name, const std::string &tag_param_name) const
Moose::Kokkos::VectorVariableValue kokkosCoupledVectorDofValuesOlder(const std::string &var_name) const
const OutputTools< T >::VariableValue & vectorTagValueHelper(const std::string &var_names, TagID tag, unsigned int index=0) const
Generic helper method to get vector tag values based on tag ID.
virtual const VariableValue & coupledVectorTagValue(const std::string &var_names, TagID tag, unsigned int index=0) const
Returns value of a coupled variable for a given tag.
Moose::Kokkos::VectorVariableValue kokkosCoupledVectorTagVectorDofValueByName(const std::string &var_name, const std::string &tag_name, unsigned int comp=0) const
std::vector< const MooseVariableFieldBase * > getFieldVars(const std::string &var_name) const
std::vector< const VariableValue * > coupledValuesOld(const std::string &var_name) const
Returns the old values for all of a coupled variable's components.
Moose::Kokkos::ADVariableValue kokkosADCoupledDofValuesOlder(const std::string &var_name) const
virtual const VectorVariableGradient & coupledVectorGradientOld(const std::string &var_name, unsigned int comp=0) const
Returns an old gradient from previous time step of a coupled vector variable.
virtual const VariableValue & coupledVectorTagDofValue(const std::string &var_name, TagID tag, unsigned int index=0) const
Returns dof value of a coupled variable for a given tag.
std::vector< const GenericVariableGradient< is_ad > * > coupledGenericGradients(const std::string &var_name) const
Returns the gradients for all of a coupled variable's components for use in templated automatic diffe...
virtual const VariableSecond & coupledSecondOlder(const std::string &var_name, unsigned int comp=0) const
Returns an old second derivative from two time steps previous of a coupled variable.
Moose::Kokkos::VariableValue kokkosCoupledDofValues(const std::string &var_name) const
std::vector< VectorMooseVariable * > _coupled_vector_moose_vars
Vector of vector coupled variables.
virtual const VariableValue & coupledDotDotDu(const std::string &var_name, unsigned int comp=0) const
Second time derivative of a coupled variable with respect to the coefficients.
const T & coupledNodalValuePreviousNL(const std::string &var_name, unsigned int comp=0) const
Returns nodal values of a coupled variable for previous Newton iterate.
const MooseArray< ADReal > & _ad_zero
const ADVectorVariableCurl & getADDefaultCurl() const
Helper method to return (and insert if necessary) the default curl value for Automatic Differentiatio...
Moose::Kokkos::VectorVariableValue kokkosCoupledVectorTagVectorNodalValue(const std::string &var_name, const std::string &tag_param_name, unsigned int comp=0) const
VariableSecond _default_second
This will always be zero because the default values for optionally coupled variables is always consta...
std::vector< MooseVariableField< Real > * > _coupled_fv_moose_vars
Vector of all finite volume coupled variables.
const bool _is_fv
Whether the MooseObject is a finite volume object.
virtual const VectorVariableValue & coupledVectorValueOld(const std::string &var_name, unsigned int comp=0) const
Returns an old value from previous time step of a coupled vector variable.
Moose::Kokkos::VectorVariableGradient kokkosCoupledVectorTagVectorGradientByName(const std::string &var_name, const std::string &tag_name, unsigned int comp=0) const
MooseArray< ADRealVectorValue > _ad_default_gradient
This will always be zero because the default values for optionally coupled variables is always consta...
void checkWritableVar(MooseWritableVariable *var)
Checks that the passed in variable is only accessed writable by one object in a given subdomain.
const ArrayVariableValue * getDefaultArrayValue(const std::string &var_name) const
Helper method to return (and insert if necessary) the default value for an uncoupled array variable.
Moose::Kokkos::ADVariableValue kokkosADCoupledVectorTagNodalValueByName(const std::string &var_name, const std::string &tag_name, unsigned int comp=0) const
virtual const VectorVariableValue & coupledVectorValueOlder(const std::string &var_name, unsigned int comp=0) const
Returns an old value from two time steps previous of a coupled vector variable.
virtual const VariableValue & coupledDofValues(const std::string &var_name, unsigned int comp=0) const
Returns DoFs in the current solution vector of a coupled variable for the local element.
Moose::Kokkos::ADVariableValue kokkosADCoupledNodalValuesOlder(const std::string &var_name) const
Moose::Kokkos::VariableValue kokkosCoupledValue(const std::string &var_name, unsigned int comp=0) const
virtual const ArrayVariableValue & coupledArrayDot(const std::string &var_name, unsigned int comp=0) const
Time derivative of a coupled array variable.
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.
This class provides an interface for common operations on field variables of both FE and FV types wit...
Class for stuff related to variables.
Class for scalar variables (they are different).
This is a wrapper that forwards calls to the implementation, which can be switched out at any time wi...
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.
Base class for a system (of equations)
const TagName OLDER_SOLUTION_TAG
const TagName OLD_SOLUTION_TAG
The following methods are specializations for using the libMesh::Parallel::packed_range_* routines fo...