https://mooseframework.inl.gov
Coupleable.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 #ifdef MOOSE_KOKKOS_SCOPE
13 #include "KokkosVariableValue.h"
14 #endif
15 
16 #include <unordered_map>
17 #include "MooseTypes.h"
18 #include "MooseArray.h"
19 #include "MooseVariableFE.h"
20 #include "MooseVariableFV.h"
21 #include "MooseLinearVariableFV.h"
22 #include "InputParameters.h"
23 #include "HasMembers.h"
24 
25 #define usingCoupleableMembers \
26  using Coupleable::_zero; \
27  using Coupleable::_grad_zero; \
28  using Coupleable::_ad_zero; \
29  using Coupleable::_ad_grad_zero
30 
31 // Forward declarations
33 class MooseObject;
34 
35 namespace libMesh
36 {
37 template <typename T>
38 class DenseVector;
39 }
40 
41 template <typename>
44 
50 {
51 public:
58  Coupleable(const MooseObject * moose_object, bool nodal, bool is_fv = false);
59 
60 #ifdef MOOSE_KOKKOS_ENABLED
61 
64  Coupleable(const Coupleable & object, const Moose::Kokkos::FunctorCopy & key);
65 #endif
66 
71  const std::unordered_map<std::string, std::vector<MooseVariableFieldBase *>> &
73  {
74  return _coupled_vars;
75  }
76 
81  const std::vector<MooseVariableFieldBase *> & getCoupledMooseVars() const
82  {
83  return _coupled_moose_vars;
84  }
85 
90  const std::vector<MooseVariable *> & getCoupledStandardMooseVars() const
91  {
93  }
94 
99  const std::vector<VectorMooseVariable *> & getCoupledVectorMooseVars() const
100  {
102  }
103 
108  const std::vector<ArrayMooseVariable *> & getCoupledArrayMooseVars() const
109  {
111  }
112 
114 
116 
118 
120 
121  const std::set<TagID> & getFEVariableCoupleableVectorTags() const
122  {
124  }
125 
126  const std::set<TagID> & getFEVariableCoupleableMatrixTags() const
127  {
129  }
130 
135 
139  bool hasWritableCoupledVariables() const { return !getWritableCoupledVariables().empty(); }
140 
141 protected:
146  virtual void coupledCallback(const std::string & /*var_name*/, bool /*is_old*/) const {}
147 
154  virtual bool isCoupled(const std::string & var_name, unsigned int i = 0) const;
155 
161  virtual bool isCoupledConstant(const std::string & var_name) const;
162 
168  unsigned int coupledComponents(const std::string & var_name) const;
169 
176  VariableName coupledName(const std::string & var_name, unsigned int comp = 0) const;
177 
183  std::vector<VariableName> coupledNames(const std::string & var_name) const;
184 
192  virtual unsigned int coupled(const std::string & var_name, unsigned int comp = 0) const;
193 
199  std::vector<unsigned int> coupledIndices(const std::string & var_name) const;
200 
208  virtual const VariableValue & coupledValue(const std::string & var_name,
209  unsigned int comp = 0) const;
210 
216  std::vector<const VariableValue *> coupledValues(const std::string & var_name) const;
217 
223  std::vector<const VectorVariableValue *> coupledVectorValues(const std::string & var_name) const;
224 
231  template <bool is_ad>
232  const GenericVariableValue<is_ad> & coupledGenericValue(const std::string & var_name,
233  unsigned int comp = 0) const;
234 
242  template <bool is_ad>
243  const GenericVectorVariableValue<is_ad> & coupledGenericVectorValue(const std::string & var_name,
244  unsigned int comp = 0) const;
245 
252  template <bool is_ad>
253  std::vector<const GenericVariableValue<is_ad> *>
254  coupledGenericValues(const std::string & var_name) const;
255 
262  template <bool is_ad>
263  const GenericVariableValue<is_ad> & coupledGenericDofValue(const std::string & var_name,
264  unsigned int comp = 0) const;
265 
273  template <bool is_ad>
274  const GenericVariableValue<is_ad> & coupledGenericDot(const std::string & var_name,
275  unsigned int comp = 0) const;
276 
284  template <bool is_ad>
285  const GenericVariableValue<is_ad> & coupledGenericDotDot(const std::string & var_name,
286  unsigned int comp = 0) const;
287 
294  virtual const VariableValue & coupledValueLower(const std::string & var_name,
295  unsigned int comp = 0) const;
296 
303  const ADVariableValue & adCoupledValue(const std::string & var_name, unsigned int comp = 0) const;
304 
311  std::vector<const ADVariableValue *> adCoupledValues(const std::string & var_name) const;
312 
319  const ADVariableValue & adCoupledLowerValue(const std::string & var_name,
320  unsigned int comp = 0) const;
321 
329  const ADVectorVariableValue & adCoupledVectorValue(const std::string & var_name,
330  unsigned int comp = 0) const;
331 
338  std::vector<const ADVectorVariableValue *>
339  adCoupledVectorValues(const std::string & var_name) const;
340 
349  virtual const VariableValue &
350  coupledVectorTagValue(const std::string & var_names, TagID tag, unsigned int index = 0) const;
351 
352  virtual const VariableValue & coupledVectorTagValue(const std::string & var_names,
353  const std::string & tag_name,
354  unsigned int index = 0) const;
355 
362  std::vector<const VariableValue *> coupledVectorTagValues(const std::string & var_names,
363  TagID tag) const;
364 
365  std::vector<const VariableValue *> coupledVectorTagValues(const std::string & var_names,
366  const std::string & tag_name) const;
367 
376  virtual const ArrayVariableValue & coupledVectorTagArrayValue(const std::string & var_names,
377  TagID tag,
378  unsigned int index = 0) const;
379 
380  virtual const ArrayVariableValue & coupledVectorTagArrayValue(const std::string & var_names,
381  const std::string & tag_name,
382  unsigned int index = 0) const;
383 
390  std::vector<const ArrayVariableValue *> coupledVectorTagArrayValues(const std::string & var_names,
391  TagID tag) const;
392 
393  std::vector<const ArrayVariableValue *>
394  coupledVectorTagArrayValues(const std::string & var_names, const std::string & tag_name) const;
395 
404  virtual const VariableGradient &
405  coupledVectorTagGradient(const std::string & var_names, TagID tag, unsigned int index = 0) const;
406 
407  virtual const VariableGradient & coupledVectorTagGradient(const std::string & var_names,
408  const std::string & tag_name,
409  unsigned int index = 0) const;
410 
417  std::vector<const VariableGradient *> coupledVectorTagGradients(const std::string & var_names,
418  TagID tag) const;
419 
420  std::vector<const VariableGradient *>
421  coupledVectorTagGradients(const std::string & var_names, const std::string & tag_name) const;
422 
432  virtual const ArrayVariableGradient & coupledVectorTagArrayGradient(const std::string & var_names,
433  TagID tag,
434  unsigned int index = 0) const;
435 
436  virtual const ArrayVariableGradient & coupledVectorTagArrayGradient(const std::string & var_names,
437  const std::string & tag_name,
438  unsigned int index = 0) const;
439 
446  std::vector<const ArrayVariableGradient *>
447  coupledVectorTagArrayGradients(const std::string & var_names, TagID tag) const;
448 
449  std::vector<const ArrayVariableGradient *>
450  coupledVectorTagArrayGradients(const std::string & var_names, const std::string & tag_name) const;
451 
459  virtual const VariableValue &
460  coupledVectorTagDofValue(const std::string & var_name, TagID tag, unsigned int index = 0) const;
461 
462  virtual const VariableValue & coupledVectorTagDofValue(const std::string & var_names,
463  const std::string & tag_name,
464  unsigned int index = 0) const;
465 
472  const ArrayVariableValue & coupledVectorTagArrayDofValue(const std::string & var_name,
473  const std::string & tag_name,
474  unsigned int comp = 0) const;
475 
482  std::vector<const VariableValue *> coupledVectorTagDofValues(const std::string & var_names,
483  TagID tag) const;
484 
485  std::vector<const VariableValue *> coupledVectorTagDofValues(const std::string & var_names,
486  const std::string & tag_name) const;
487 
496  virtual const VariableValue &
497  coupledMatrixTagValue(const std::string & var_names, TagID tag, unsigned int index = 0) const;
498 
499  virtual const VariableValue & coupledMatrixTagValue(const std::string & var_names,
500  const std::string & tag_name,
501  unsigned int index = 0) const;
502 
509  std::vector<const VariableValue *> coupledMatrixTagValues(const std::string & var_names,
510  TagID tag) const;
511 
512  std::vector<const VariableValue *> coupledMatrixTagValues(const std::string & var_names,
513  const std::string & tag_name) const;
514 
522  virtual const VectorVariableValue & coupledVectorValue(const std::string & var_name,
523  unsigned int comp = 0) const;
524 
532  virtual const ArrayVariableValue & coupledArrayValue(const std::string & var_name,
533  unsigned int comp = 0) const;
534 
540  std::vector<const ArrayVariableValue *> coupledArrayValues(const std::string & var_name) const;
541 
554  MooseWritableVariable & writableVariable(const std::string & var_name, unsigned int comp = 0);
555 
565  virtual VariableValue & writableCoupledValue(const std::string & var_name, unsigned int comp = 0);
566 
571 
579  virtual const VariableValue & coupledValueOld(const std::string & var_name,
580  unsigned int comp = 0) const;
581 
587  std::vector<const VariableValue *> coupledValuesOld(const std::string & var_name) const;
588 
594  std::vector<const VectorVariableValue *>
595  coupledVectorValuesOld(const std::string & var_name) const;
596 
604  virtual const VariableValue & coupledValueOlder(const std::string & var_name,
605  unsigned int comp = 0) const;
606 
612  std::vector<const VariableValue *> coupledValuesOlder(const std::string & var_name) const;
613 
620  virtual const VariableValue & coupledValuePreviousNL(const std::string & var_name,
621  unsigned int comp = 0) const;
622 
630  virtual const VectorVariableValue & coupledVectorValueOld(const std::string & var_name,
631  unsigned int comp = 0) const;
632 
640  virtual const VectorVariableValue & coupledVectorValueOlder(const std::string & var_name,
641  unsigned int comp = 0) const;
642 
650  virtual const ArrayVariableValue & coupledArrayValueOld(const std::string & var_name,
651  unsigned int comp = 0) const;
652 
660  virtual const ArrayVariableValue & coupledArrayValueOlder(const std::string & var_name,
661  unsigned int comp = 0) const;
662 
670  virtual const VariableGradient & coupledGradient(const std::string & var_name,
671  unsigned int comp = 0) const;
672 
678  std::vector<const VariableGradient *> coupledGradients(const std::string & var_name) const;
679 
687  const ADVariableGradient & adCoupledGradient(const std::string & var_name,
688  unsigned int comp = 0) const;
689 
697  const ADVariableGradient & adCoupledGradientDot(const std::string & var_name,
698  unsigned int comp = 0) const;
699 
706  std::vector<const ADVariableGradient *> adCoupledGradients(const std::string & var_name) const;
707 
715  template <bool is_ad>
716  const GenericVariableGradient<is_ad> & coupledGenericGradient(const std::string & var_name,
717  unsigned int comp = 0) const;
718 
725  template <bool is_ad>
726  std::vector<const GenericVariableGradient<is_ad> *>
727  coupledGenericGradients(const std::string & var_name) const;
728 
736  const ADVectorVariableGradient & adCoupledVectorGradient(const std::string & var_name,
737  unsigned int comp = 0) const;
738 
745  const ADVariableSecond & adCoupledSecond(const std::string & var_name,
746  unsigned int comp = 0) const;
747 
755  const ADVectorVariableSecond & adCoupledVectorSecond(const std::string & var_name,
756  unsigned int comp = 0) const;
757 
765  virtual const VariableGradient & coupledGradientOld(const std::string & var_name,
766  unsigned int comp = 0) const;
767 
773  std::vector<const VariableGradient *> coupledGradientsOld(const std::string & var_name) const;
774 
782  virtual const VariableGradient & coupledGradientOlder(const std::string & var_name,
783  unsigned int comp = 0) const;
784 
791  virtual const VariableGradient & coupledGradientPreviousNL(const std::string & var_name,
792  unsigned int comp = 0) const;
793 
801  virtual const VariableGradient & coupledGradientDot(const std::string & var_name,
802  unsigned int comp = 0) const;
803 
811  virtual const VariableGradient & coupledGradientDotDot(const std::string & var_name,
812  unsigned int comp = 0) const;
813 
821  virtual const VectorVariableGradient & coupledVectorGradient(const std::string & var_name,
822  unsigned int comp = 0) const;
823 
831  virtual const VectorVariableGradient & coupledVectorGradientOld(const std::string & var_name,
832  unsigned int comp = 0) const;
833 
841  virtual const VectorVariableGradient & coupledVectorGradientOlder(const std::string & var_name,
842  unsigned int comp = 0) const;
843 
851  virtual const ArrayVariableGradient & coupledArrayGradient(const std::string & var_name,
852  unsigned int comp = 0) const;
853 
861  virtual const ArrayVariableGradient & coupledArrayGradientOld(const std::string & var_name,
862  unsigned int comp = 0) const;
863 
871  virtual const ArrayVariableGradient & coupledArrayGradientOlder(const std::string & var_name,
872  unsigned int comp = 0) const;
873 
881  virtual const ArrayVariableGradient & coupledArrayGradientDot(const std::string & var_name,
882  unsigned int comp = 0) const;
883 
891  virtual const VectorVariableCurl & coupledCurl(const std::string & var_name,
892  unsigned int comp = 0) const;
893 
901  virtual const VectorVariableCurl & coupledCurlOld(const std::string & var_name,
902  unsigned int comp = 0) const;
903 
911  virtual const VectorVariableCurl & coupledCurlOlder(const std::string & var_name,
912  unsigned int comp = 0) const;
913 
921  const ADVectorVariableCurl & adCoupledCurl(const std::string & var_name,
922  unsigned int comp = 0) const;
923 
932  virtual const VectorVariableDivergence & coupledDiv(const std::string & var_name,
933  unsigned int comp = 0) const;
934 
943  virtual const VectorVariableDivergence & coupledDivOld(const std::string & var_name,
944  unsigned int comp = 0) const;
945 
954  virtual const VectorVariableDivergence & coupledDivOlder(const std::string & var_name,
955  unsigned int comp = 0) const;
956 
964  virtual const VariableSecond & coupledSecond(const std::string & var_name,
965  unsigned int comp = 0) const;
966 
975  virtual const VariableSecond & coupledSecondOld(const std::string & var_name,
976  unsigned int comp = 0) const;
977 
986  virtual const VariableSecond & coupledSecondOlder(const std::string & var_name,
987  unsigned int comp = 0) const;
988 
995  virtual const VariableSecond & coupledSecondPreviousNL(const std::string & var_name,
996  unsigned int comp = 0) const;
997 
1004  virtual const VariableValue & coupledDot(const std::string & var_name,
1005  unsigned int comp = 0) const;
1006 
1012  std::vector<const VariableValue *> coupledDots(const std::string & var_name) const;
1013 
1021  virtual const VariableValue & coupledDotDot(const std::string & var_name,
1022  unsigned int comp = 0) const;
1023 
1030  virtual const VariableValue & coupledDotOld(const std::string & var_name,
1031  unsigned int comp = 0) const;
1032 
1040  virtual const VariableValue & coupledDotDotOld(const std::string & var_name,
1041  unsigned int comp = 0) const;
1042 
1050  const ADVariableValue & adCoupledDot(const std::string & var_name, unsigned int comp = 0) const;
1051 
1057  std::vector<const ADVariableValue *> adCoupledDots(const std::string & var_name) const;
1058 
1066  const ADVariableValue & adCoupledDotDot(const std::string & var_name,
1067  unsigned int comp = 0) const;
1068 
1077  const ADVectorVariableValue & adCoupledVectorDot(const std::string & var_name,
1078  unsigned int comp = 0) const;
1079 
1087  virtual const VectorVariableValue & coupledVectorDot(const std::string & var_name,
1088  unsigned int comp = 0) const;
1089 
1097  virtual const VectorVariableValue & coupledVectorDotDot(const std::string & var_name,
1098  unsigned int comp = 0) const;
1099 
1107  virtual const VectorVariableValue & coupledVectorDotOld(const std::string & var_name,
1108  unsigned int comp = 0) const;
1109 
1117  virtual const VectorVariableValue & coupledVectorDotDotOld(const std::string & var_name,
1118  unsigned int comp = 0) const;
1119 
1127  virtual const VariableValue & coupledVectorDotDu(const std::string & var_name,
1128  unsigned int comp = 0) const;
1129 
1137  virtual const VariableValue & coupledVectorDotDotDu(const std::string & var_name,
1138  unsigned int comp = 0) const;
1139 
1147  virtual const ArrayVariableValue & coupledArrayDot(const std::string & var_name,
1148  unsigned int comp = 0) const;
1149 
1157  virtual const ArrayVariableValue & coupledArrayDotDot(const std::string & var_name,
1158  unsigned int comp = 0) const;
1159 
1167  virtual const ArrayVariableValue & coupledArrayDotOld(const std::string & var_name,
1168  unsigned int comp = 0) const;
1169 
1177  virtual const ArrayVariableValue & coupledArrayDotDotOld(const std::string & var_name,
1178  unsigned int comp = 0) const;
1179 
1187  virtual const VariableValue & coupledDotDu(const std::string & var_name,
1188  unsigned int comp = 0) const;
1189 
1197  virtual const VariableValue & coupledDotDotDu(const std::string & var_name,
1198  unsigned int comp = 0) const;
1199 
1207  const VariableValue & coupledArrayDotDu(const std::string & var_name,
1208  unsigned int comp = 0) const;
1209 
1216  template <typename T>
1217  const T & coupledNodalValue(const std::string & var_name, unsigned int comp = 0) const;
1218 
1225  template <typename T>
1226  const typename Moose::ADType<T>::type & adCoupledNodalValue(const std::string & var_name,
1227  unsigned int comp = 0) const;
1228 
1235  template <typename T>
1236  const T & coupledNodalValueOld(const std::string & var_name, unsigned int comp = 0) const;
1237 
1244  template <typename T>
1245  const T & coupledNodalValueOlder(const std::string & var_name, unsigned int comp = 0) const;
1246 
1253  template <typename T>
1254  const T & coupledNodalValuePreviousNL(const std::string & var_name, unsigned int comp = 0) const;
1255 
1263  template <typename T>
1264  const T & coupledNodalDot(const std::string & var_name, unsigned int comp = 0) const;
1265 
1273  virtual const VariableValue & coupledNodalDotDot(const std::string & var_name,
1274  unsigned int comp = 0) const;
1275 
1283  virtual const VariableValue & coupledNodalDotOld(const std::string & var_name,
1284  unsigned int comp = 0) const;
1285 
1293  virtual const VariableValue & coupledNodalDotDotOld(const std::string & var_name,
1294  unsigned int comp = 0) const;
1295  // coupled-dof-values-begin
1302  virtual const VariableValue & coupledDofValues(const std::string & var_name,
1303  unsigned int comp = 0) const;
1304 
1311  std::vector<const VariableValue *> coupledAllDofValues(const std::string & var_name) const;
1312 
1319  virtual const VariableValue & coupledDofValuesOld(const std::string & var_name,
1320  unsigned int comp = 0) const;
1321 
1328  std::vector<const VariableValue *> coupledAllDofValuesOld(const std::string & var_name) const;
1329 
1336  virtual const VariableValue & coupledDofValuesOlder(const std::string & var_name,
1337  unsigned int comp = 0) const;
1338 
1345  std::vector<const VariableValue *> coupledAllDofValuesOlder(const std::string & var_name) const;
1346 
1353  virtual const ArrayVariableValue & coupledArrayDofValues(const std::string & var_name,
1354  unsigned int comp = 0) const;
1355  // coupled-dof-values-end
1356 
1363  virtual const ADVariableValue & adCoupledDofValues(const std::string & var_name,
1364  unsigned int comp = 0) const;
1365 
1370  const ADVariableValue & adZeroValue() const;
1371 
1376  const ADVariableGradient & adZeroGradient() const;
1377 
1381  const ADVariableSecond & adZeroSecond() const;
1382 
1387  template <bool is_ad>
1389 
1394  template <bool is_ad>
1396 
1401  template <bool is_ad>
1403 
1404 protected:
1405  // Reference to the interface's input parameters
1407 
1409  const std::string & _c_name;
1411  const std::string & _c_type;
1412 
1413  // Reference to FEProblemBase
1415 
1417  const SystemBase * const _c_sys;
1418 
1420  std::unordered_map<std::string, std::vector<MooseVariableFieldBase *>> _coupled_vars;
1421 
1423  std::vector<MooseVariableFieldBase *> _coupled_moose_vars;
1424 
1426  std::vector<MooseVariable *> _coupled_standard_moose_vars;
1427 
1429  std::vector<VectorMooseVariable *> _coupled_vector_moose_vars;
1430 
1432  std::vector<ArrayMooseVariable *> _coupled_array_moose_vars;
1433 
1435  std::vector<MooseVariableField<Real> *> _coupled_fv_moose_vars;
1436 
1438  const std::unordered_map<std::string, std::string> & _new_to_deprecated_coupled_vars;
1439 
1441  bool _c_nodal;
1442 
1445 
1446  // Argument to allow element-to-nodal coupling
1448 
1451 
1453  mutable std::unordered_map<std::string, std::vector<std::unique_ptr<VariableValue>>>
1455 
1457  mutable std::unordered_map<std::string, std::unique_ptr<MooseArray<ADReal>>> _ad_default_value;
1458 
1460  mutable std::unordered_map<std::string, std::unique_ptr<VectorVariableValue>>
1462 
1464  mutable std::unordered_map<std::string, std::unique_ptr<ArrayVariableValue>> _default_array_value;
1465 
1467  mutable std::unordered_map<std::string, std::unique_ptr<MooseArray<ADRealVectorValue>>>
1469 
1475 
1478 
1481 
1484 
1487 
1490 
1493 
1498 
1502 
1505 
1515 
1521 
1524 
1527 
1530 
1536 
1539 
1545  bool
1546  checkVar(const std::string & var_name, unsigned int comp = 0, unsigned int comp_bound = 0) const;
1547 
1548 private:
1552  template <typename T>
1553  const typename OutputTools<T>::VariableValue &
1554  vectorTagValueHelper(const std::string & var_names, TagID tag, unsigned int index = 0) const;
1555 
1559  template <typename T>
1560  const typename OutputTools<T>::VariableValue & vectorTagValueHelper(const std::string & var_names,
1561  const std::string & tag_name,
1562  unsigned int index = 0) const;
1563 
1567  template <typename T>
1568  const typename OutputTools<T>::VariableValue &
1569  vectorTagDofValueHelper(const std::string & var_name, TagID tag, unsigned int comp = 0) const;
1570 
1574  template <typename T>
1576  const std::string & var_name, const std::string & tag_name, unsigned int comp = 0) const;
1577 
1583  template <typename T>
1584  void
1585  requestStates(const std::string & var_name, const TagName & tag_name, const unsigned int comp);
1586 
1587  enum class FuncAge
1588  {
1589  Curr,
1590  Old,
1591  Older,
1592  };
1593 
1594  enum class VarType
1595  {
1596  Ignore,
1597  Gradient,
1598  Second,
1599  GradientDot,
1600  Dot,
1601  };
1602 
1603  void checkFuncType(const std::string var_name, VarType t, FuncAge age) const;
1604 
1605 protected:
1614  const MooseVariableFieldBase * getFEVar(const std::string & var_name, unsigned int comp) const;
1615 
1616  /*
1617  * Extract pointer to a base coupled field variable. Could be either a finite volume or finite
1618  * element variable
1619  * @param var_name Name of parameter desired
1620  * @param comp Component number of multiple coupled variables
1621  * @return Pointer to the desired variable
1622  */
1623  const MooseVariableFieldBase * getFieldVar(const std::string & var_name, unsigned int comp) const;
1624 
1625  /*
1626  * Extract pointer to a base coupled field variable. Could be either a finite volume or finite
1627  * element variable
1628  * @param var_name Name of variable desired
1629  * @param comp Component number of multiple coupled variables
1630  * @return Pointer to the desired variable
1631  */
1632  MooseVariableFieldBase * getFieldVar(const std::string & var_name, unsigned int comp);
1633 
1637  template <typename T>
1638  const T * getVarHelper(const std::string & var_name, unsigned int comp) const;
1639 
1643  template <typename T>
1644  T * getVarHelper(const std::string & var_name, unsigned int comp);
1645 
1652  MooseVariable * getVar(const std::string & var_name, unsigned int comp);
1653 
1660  VectorMooseVariable * getVectorVar(const std::string & var_name, unsigned int comp);
1661 
1668  ArrayMooseVariable * getArrayVar(const std::string & var_name, unsigned int comp);
1669 
1676  const MooseVariable * getVar(const std::string & var_name, unsigned int comp) const;
1677 
1684  const VectorMooseVariable * getVectorVar(const std::string & var_name, unsigned int comp) const;
1685 
1692  const ArrayMooseVariable * getArrayVar(const std::string & var_name, unsigned int comp) const;
1693 
1700  void validateExecutionerType(const std::string & name, const std::string & fn_name) const;
1701 
1702  template <typename T, typename Func>
1703  std::vector<T> coupledVectorHelper(const std::string & var_name, const Func & func) const
1704  {
1705  const auto components = coupledComponents(var_name);
1706  std::vector<T> vals(components);
1707  for (MooseIndex(components) comp = 0; comp < components; ++comp)
1708  vals[comp] = func(comp);
1709  return vals;
1710  }
1711 
1714 
1715 public:
1722  const ADVariableValue * getADDefaultValue(const std::string & var_name) const;
1723 
1730  const ADVectorVariableValue * getADDefaultVectorValue(const std::string & var_name) const;
1731 
1738  const ADVariableGradient & getADDefaultGradient() const;
1739 
1747 
1754  const ADVariableSecond & getADDefaultSecond() const;
1755 
1762  const ADVectorVariableCurl & getADDefaultCurl() const;
1763 
1764 private:
1771  const VariableValue * getDefaultValue(const std::string & var_name, unsigned int comp) const;
1772 
1779  const VectorVariableValue * getDefaultVectorValue(const std::string & var_name) const;
1780 
1787  const ArrayVariableValue * getDefaultArrayValue(const std::string & var_name) const;
1788 
1792  template <typename T>
1793  const T & getDefaultNodalValue(const std::string & var_name, unsigned int comp = 0) const;
1794 
1795  template <typename T>
1796  const Moose::Functor<T> & getDefaultFunctor(const std::string & var_name) const;
1797 
1799  unsigned int _coupleable_max_qps;
1800 
1802  std::unordered_map<std::string, std::vector<unsigned int>> _optional_var_index;
1803 
1805  std::unordered_map<std::string, std::vector<MooseVariableScalar *>> _c_coupled_scalar_vars;
1806 
1808 
1810 
1812  const bool _is_fv;
1813 
1814  const MooseObject * const _obj;
1815 
1817  const std::set<std::string> _older_state_tags = {Moose::OLD_SOLUTION_TAG,
1819 
1821  std::vector<std::set<MooseWritableVariable *>> _writable_coupled_variables;
1822 
1826 private:
1828 
1829 #ifdef MOOSE_KOKKOS_SCOPE
1830  Moose::Kokkos::Variable kokkosCoupledVectorTagVariable(const std::string & var_name,
1831  const std::string & tag_name,
1832  unsigned int comp);
1833  Moose::Kokkos::Variable kokkosCoupledVectorTagVariables(const std::string & var_name,
1834  const std::string & tag_name);
1836 
1837 public:
1839  const std::string & tag_name,
1840  unsigned int comp = 0);
1842  const std::string & tag_name);
1844  const std::string & tag_name,
1845  unsigned int comp = 0);
1847  kokkosCoupledVectorTagGradientsByName(const std::string & var_name, const std::string & tag_name);
1849  const std::string & tag_name,
1850  unsigned int comp = 0);
1852  kokkosCoupledVectorTagNodalValuesByName(const std::string & var_name,
1853  const std::string & tag_name);
1854 
1855  Moose::Kokkos::VariableValue kokkosCoupledVectorTagValue(const std::string & var_name,
1856  const std::string & tag_param_name,
1857  unsigned int comp = 0);
1858  Moose::Kokkos::VariableValue kokkosCoupledVectorTagValues(const std::string & var_name,
1859  const std::string & tag_param_name);
1861  const std::string & tag_param_name,
1862  unsigned int comp = 0);
1864  kokkosCoupledVectorTagGradients(const std::string & var_name, const std::string & tag_param_name);
1866  const std::string & tag_param_name,
1867  unsigned int comp = 0);
1869  kokkosCoupledVectorTagNodalValues(const std::string & var_name,
1870  const std::string & tag_param_name);
1871 
1872  Moose::Kokkos::VariableValue kokkosCoupledValue(const std::string & var_name,
1873  unsigned int comp = 0);
1874  Moose::Kokkos::VariableValue kokkosCoupledValues(const std::string & var_name);
1875  Moose::Kokkos::VariableGradient kokkosCoupledGradient(const std::string & var_name,
1876  unsigned int comp = 0);
1877  Moose::Kokkos::VariableGradient kokkosCoupledGradients(const std::string & var_name);
1878  Moose::Kokkos::VariableValue kokkosCoupledNodalValue(const std::string & var_name,
1879  unsigned int comp = 0);
1880  Moose::Kokkos::VariableValue kokkosCoupledNodalValues(const std::string & var_name);
1881 
1882  Moose::Kokkos::VariableValue kokkosCoupledValueOld(const std::string & var_name,
1883  unsigned int comp = 0);
1884  Moose::Kokkos::VariableValue kokkosCoupledValuesOld(const std::string & var_name);
1885  Moose::Kokkos::VariableGradient kokkosCoupledGradientOld(const std::string & var_name,
1886  unsigned int comp = 0);
1887  Moose::Kokkos::VariableGradient kokkosCoupledGradientsOld(const std::string & var_name);
1888  Moose::Kokkos::VariableValue kokkosCoupledNodalValueOld(const std::string & var_name,
1889  unsigned int comp = 0);
1890  Moose::Kokkos::VariableValue kokkosCoupledNodalValuesOld(const std::string & var_name);
1891 
1892  Moose::Kokkos::VariableValue kokkosCoupledValueOlder(const std::string & var_name,
1893  unsigned int comp = 0);
1894  Moose::Kokkos::VariableValue kokkosCoupledValuesOlder(const std::string & var_name);
1895  Moose::Kokkos::VariableGradient kokkosCoupledGradientOlder(const std::string & var_name,
1896  unsigned int comp = 0);
1897  Moose::Kokkos::VariableGradient kokkosCoupledGradientsOlder(const std::string & var_name);
1898  Moose::Kokkos::VariableValue kokkosCoupledNodalValueOlder(const std::string & var_name,
1899  unsigned int comp = 0);
1900  Moose::Kokkos::VariableValue kokkosCoupledNodalValuesOlder(const std::string & var_name);
1901 
1902  Moose::Kokkos::VariableValue kokkosCoupledDot(const std::string & var_name,
1903  unsigned int comp = 0);
1904  Moose::Kokkos::VariableValue kokkosCoupledDots(const std::string & var_name);
1905  Moose::Kokkos::VariableValue kokkosCoupledNodalDot(const std::string & var_name,
1906  unsigned int comp = 0);
1907  Moose::Kokkos::VariableValue kokkosCoupledNodalDots(const std::string & var_name);
1908 
1909  Moose::Kokkos::Scalar<const Real> kokkosCoupledDotDu(const std::string & var_name,
1910  unsigned int comp = 0);
1911 
1915 #endif
1916 };
1917 
1918 template <typename T>
1919 T *
1920 Coupleable::getVarHelper(const std::string & var_name_in, unsigned int comp)
1921 {
1922  const auto var_name = _c_parameters.checkForRename(var_name_in);
1923  auto name_to_use = var_name;
1924 
1925  // First check for supplied name
1926  if (!checkVar(var_name, comp, 0))
1927  {
1928  // See if there is an associated deprecated name that the user may have used instead
1929  auto it = _new_to_deprecated_coupled_vars.find(var_name);
1930  if (it == _new_to_deprecated_coupled_vars.end())
1931  return nullptr;
1932  else
1933  {
1934  auto deprecated_name = it->second;
1935  if (checkVar(deprecated_name, comp, 0))
1936  name_to_use = deprecated_name;
1937  else
1938  return nullptr;
1939  }
1940  }
1941 
1942  auto coupled_vars_it = _coupled_vars.find(name_to_use);
1943 
1944  mooseAssert(coupled_vars_it != _coupled_vars.end(),
1945  "Trying to get a coupled var " << name_to_use << " that doesn't exist");
1946 
1947  if (auto coupled_var = dynamic_cast<T *>(coupled_vars_it->second[comp]))
1948  return coupled_var;
1949  else
1950  {
1951  for (auto & var : _coupled_standard_moose_vars)
1952  if (var->name() == name_to_use)
1953  mooseError("The named variable is a standard variable, try a "
1954  "'coupled[Value/Gradient/Dot/etc]...' function instead");
1955  for (auto & var : _coupled_vector_moose_vars)
1956  if (var->name() == name_to_use)
1957  mooseError("The named variable is a vector variable, try a "
1958  "'coupledVector[Value/Gradient/Dot/etc]...' function instead");
1959  for (auto & var : _coupled_array_moose_vars)
1960  if (var->name() == name_to_use)
1961  mooseError("The named variable is an array variable, try a "
1962  "'coupledArray[Value/Gradient/Dot/etc]...' function instead");
1963  for (auto & var : _coupled_fv_moose_vars)
1964  if (var->name() == name_to_use)
1965  mooseError("The named variable is a finite volume variable, which the coupled[...] routine "
1966  "used does not support. Try using the functor system routines instead.");
1967  mooseError(
1968  "Variable '", name_to_use, "' is of a different C++ type than you tried to fetch it as.");
1969  }
1970 }
1971 
1972 template <typename T>
1973 const T *
1974 Coupleable::getVarHelper(const std::string & var_name, unsigned int comp) const
1975 {
1976  return const_cast<Coupleable *>(this)->getVarHelper<T>(var_name, comp);
1977 }
virtual const ArrayVariableValue & coupledArrayDotDotOld(const std::string &var_name, unsigned int comp=0) const
Old second time derivative of a coupled array variable.
Definition: Coupleable.C:1446
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.
Definition: Coupleable.C:2057
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.
Definition: Coupleable.C:649
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.
Definition: Coupleable.C:681
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.
Definition: Coupleable.C:1148
OutputTools< Real >::VariableGradient VariableGradient
Definition: MooseTypes.h:316
Moose::Kokkos::VariableValue kokkosCoupledDots(const std::string &var_name)
const T & coupledNodalDot(const std::string &var_name, unsigned int comp=0) const
Nodal values of time derivative of a coupled variable.
Definition: Coupleable.C:1995
Moose::Kokkos::VariableValue kokkosZeroNodalValue()
OutputTools< RealVectorValue >::VariableDivergence VectorVariableDivergence
Definition: MooseTypes.h:336
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...
Definition: Coupleable.C:2148
virtual bool isCoupled(const std::string &var_name, unsigned int i=0) const
Returns true if a variables has been coupled as name.
Definition: Coupleable.C:159
virtual const VectorVariableGradient & coupledVectorGradient(const std::string &var_name, unsigned int comp=0) const
Returns gradient of a coupled vector variable.
Definition: Coupleable.C:1640
const std::vector< ArrayMooseVariable * > & getCoupledArrayMooseVars() const
Get the list of array coupled variables.
Definition: Coupleable.h:108
bool _c_nodal
True if we provide coupling to nodal values.
Definition: Coupleable.h:1441
void checkFuncType(const std::string var_name, VarType t, FuncAge age) const
Definition: Coupleable.C:222
const std::vector< VectorMooseVariable * > & getCoupledVectorMooseVars() const
Get the list of vector coupled variables.
Definition: Coupleable.h:99
Moose::Kokkos::Variable kokkosZeroVariable()
VectorVariableCurl _default_vector_curl
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:1526
Moose::Kokkos::VariableValue kokkosCoupledVectorTagValue(const std::string &var_name, const std::string &tag_param_name, unsigned int comp=0)
Moose::GenericType< VectorVariableValue, is_ad > GenericVectorVariableValue
Definition: MooseTypes.h:665
Moose::Kokkos::VariableValue kokkosCoupledValuesOlder(const std::string &var_name)
VectorMooseVariable * getVectorVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled vector variable.
Definition: Coupleable.C:324
const VariableValue & _zero
Zero value of a variable.
Definition: Coupleable.h:1495
const VariablePhiGradient & _grad_phi_zero
Zero gradient of trial function.
Definition: Coupleable.h:1504
virtual unsigned int coupled(const std::string &var_name, unsigned int comp=0) const
Returns the index for a coupled variable by name.
Definition: Coupleable.C:472
virtual const VectorVariableValue & coupledVectorDotDot(const std::string &var_name, unsigned int comp=0) const
Second time derivative of a coupled vector variable.
Definition: Coupleable.C:1300
const VariablePhiSecond & _second_phi_zero
Zero second derivative of a test function.
Definition: Coupleable.h:1510
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.
Definition: Coupleable.C:1901
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.
Definition: Coupleable.h:1468
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...
Definition: Coupleable.C:427
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::VariableGradient kokkosCoupledGradientsOld(const std::string &var_name)
std::vector< const VariableValue * > coupledValuesOlder(const std::string &var_name) const
Returns the older values for all of a coupled variable&#39;s components.
Definition: Coupleable.C:2726
const ADVariableSecond & adZeroSecond() const
Retrieve a zero second for automatic differentiation.
Definition: Coupleable.C:2444
const ADVectorVariableValue * getADDefaultVectorValue(const std::string &var_name) const
Helper method to return (and insert if necessary) the default vector value for Automatic Differentiat...
Definition: Coupleable.C:2385
virtual const VariableSecond & coupledSecond(const std::string &var_name, unsigned int comp=0) const
Returns second spatial derivatives of a coupled variable.
Definition: Coupleable.C:1853
virtual bool isCoupledConstant(const std::string &var_name) const
Returns true if a variable passed as a coupled value is really a constant.
Definition: Coupleable.C:182
virtual const VariableValue & coupledDotOld(const std::string &var_name, unsigned int comp=0) const
Old time derivative of a coupled variable.
Definition: Coupleable.C:1234
Moose::Kokkos::Variable kokkosCoupledVectorTagVariables(const std::string &var_name, const std::string &tag_name)
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.
Definition: Coupleable.C:1098
Moose::Kokkos::VariableGradient kokkosCoupledGradientsOlder(const std::string &var_name)
Moose::Kokkos::VariableValue kokkosCoupledVectorTagNodalValuesByName(const std::string &var_name, const std::string &tag_name)
std::vector< const ArrayVariableValue * > coupledArrayValues(const std::string &var_name) const
Returns the values for all of a coupled array variable&#39;s components.
Definition: Coupleable.C:901
std::vector< const VariableValue * > coupledDots(const std::string &var_name) const
Returns the time derivatives for all of a coupled variable&#39;s components.
Definition: Coupleable.C:2777
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.
Definition: Coupleable.C:1126
unsigned int TagID
Definition: MooseTypes.h:210
Moose::Kokkos::VariableValue kokkosZeroValue()
VariableName coupledName(const std::string &var_name, unsigned int comp=0) const
Names of the variable in the Coupleable interface.
Definition: Coupleable.C:2514
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.
Definition: Coupleable.C:1656
MooseVariableField< Real > MooseWritableVariable
Definition: Coupleable.h:42
Class for stuff related to variables.
const VectorVariableValue & _vector_zero
Zero value of a vector variable.
Definition: Coupleable.h:1512
const VariableGradient & _grad_zero
Zero gradient of a variable.
Definition: Coupleable.h:1500
std::unordered_map< std::string, std::vector< MooseVariableFieldBase * > > _coupled_vars
Coupled vars whose values we provide.
Definition: Coupleable.h:1420
std::set< TagID > _fe_coupleable_matrix_tags
Definition: Coupleable.h:1809
const MooseArray< ADRealVectorValue > & _ad_grad_zero
Definition: Coupleable.h:1501
virtual const VectorVariableValue & coupledVectorDot(const std::string &var_name, unsigned int comp=0) const
Time derivative of a coupled vector variable.
Definition: Coupleable.C:1284
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.
Definition: Coupleable.C:1493
void checkWritableVar(MooseWritableVariable *var)
Checks that the passed in variable is only accessed writable by one object in a given subdomain...
Definition: Coupleable.C:982
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:323
const bool _is_fv
Whether the MooseObject is a finite volume object.
Definition: Coupleable.h:1812
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.
Definition: Coupleable.C:2077
const TagName OLDER_SOLUTION_TAG
Definition: MooseTypes.C:27
Moose::Kokkos::VariableGradient kokkosCoupledGradientOlder(const std::string &var_name, unsigned int comp=0)
std::vector< const GenericVariableValue< is_ad > * > coupledGenericValues(const std::string &var_name) const
Returns the values for all of a coupled variable&#39;s components for use in templated automatic differen...
std::vector< ArrayMooseVariable * > _coupled_array_moose_vars
Vector of array coupled variables.
Definition: Coupleable.h:1432
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&#39;s degree of freedom indices...
Definition: Coupleable.C:813
const VariableSecond & _second_zero
Zero second derivative of a variable.
Definition: Coupleable.h:1507
std::vector< const VectorVariableValue * > coupledVectorValuesOld(const std::string &var_name) const
Returns the old values for all of a coupled vector variable&#39;s components.
Definition: Coupleable.C:2733
const T & coupledNodalValue(const std::string &var_name, unsigned int comp=0) const
Returns nodal values of a coupled variable.
Definition: Coupleable.C:1919
std::vector< T > coupledVectorHelper(const std::string &var_name, const Func &func) const
Definition: Coupleable.h:1703
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.
Definition: Coupleable.C:797
OutputTools< RealVectorValue >::VariableValue VectorVariableValue
Definition: MooseTypes.h:332
const ADVariableGradient & adCoupledGradient(const std::string &var_name, unsigned int comp=0) const
Returns gradient of a coupled variable for use in Automatic Differentiation.
Definition: Coupleable.C:2222
VectorVariableDivergence _default_div
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:1529
Moose::Kokkos::VariableValue kokkosCoupledNodalValuesOlder(const std::string &var_name)
const bool _c_allow_element_to_nodal_coupling
Definition: Coupleable.h:1447
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.
Definition: Coupleable.C:2604
Moose::Kokkos::VariableGradient kokkosCoupledVectorTagGradientsByName(const std::string &var_name, const std::string &tag_name)
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...
Definition: Coupleable.C:2118
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.
Definition: Coupleable.C:2627
std::set< TagID > _fe_coupleable_vector_tags
Definition: Coupleable.h:1807
This is a wrapper that forwards calls to the implementation, which can be switched out at any time wi...
MooseArray< ADRealVectorValue > _ad_default_curl
This will always be zero because the default values for optionally coupled vector variables is always...
Definition: Coupleable.h:1492
Moose::Kokkos::VariableValue kokkosCoupledValue(const std::string &var_name, unsigned int comp=0)
virtual const VariableValue & coupledDot(const std::string &var_name, unsigned int comp=0) const
Time derivative of a coupled variable.
Definition: Coupleable.C:1170
THREAD_ID _c_tid
Thread ID of the thread using this object.
Definition: Coupleable.h:1450
const ADVariableValue & adCoupledValue(const std::string &var_name, unsigned int comp=0) const
Returns value of a coupled variable for use in Automatic Differentiation.
Definition: Coupleable.C:2184
Moose::Kokkos::VariableValue kokkosCoupledDot(const std::string &var_name, unsigned int comp=0)
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
virtual const VariableValue & coupledNodalDotDot(const std::string &var_name, unsigned int comp=0) const
Nodal values of second time derivative of a coupled variable.
Definition: Coupleable.C:2009
const ADVariableGradient & getADDefaultGradient() const
Helper method to return (and insert if necessary) the default gradient for Automatic Differentiation ...
Definition: Coupleable.C:2402
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...
Definition: Coupleable.C:392
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...
Definition: Coupleable.h:1821
virtual const VariableGradient & coupledGradientDotDot(const std::string &var_name, unsigned int comp=0) const
Second time derivative of the gradient of a coupled variable.
Definition: Coupleable.C:1624
OutputTools< Real >::VariablePhiValue VariablePhiValue
Definition: MooseTypes.h:320
std::unordered_map< std::string, std::vector< MooseVariableScalar * > > _c_coupled_scalar_vars
Scalar variables coupled into this object (for error checking)
Definition: Coupleable.h:1805
VariableValue _default_value_zero
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:1474
MooseVariable * getVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled variable.
Definition: Coupleable.C:318
const ADVectorVariableCurl & getADDefaultCurl() const
Helper method to return (and insert if necessary) the default curl value for Automatic Differentiatio...
Definition: Coupleable.C:2423
Moose::Kokkos::VariableValue kokkosCoupledNodalValue(const std::string &var_name, unsigned int comp=0)
const GenericVariableGradient< is_ad > & genericZeroGradient()
Returns zero gradient templated with automatic differentiation boolean.
OutputTools< RealVectorValue >::VariableCurl VectorVariableCurl
Definition: MooseTypes.h:335
virtual const ArrayVariableValue & coupledArrayDotOld(const std::string &var_name, unsigned int comp=0) const
Old time derivative of a coupled array variable.
Definition: Coupleable.C:1424
Moose::Kokkos::VariableValue kokkosCoupledNodalValueOld(const std::string &var_name, unsigned int comp=0)
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.
Definition: Coupleable.C:1031
This class provides an interface for common operations on field variables of both FE and FV types wit...
virtual const ArrayVariableValue & coupledArrayDot(const std::string &var_name, unsigned int comp=0) const
Time derivative of a coupled array variable.
Definition: Coupleable.C:1380
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...
Moose::Kokkos::VariableValue kokkosCoupledValues(const std::string &var_name)
The following methods are specializations for using the libMesh::Parallel::packed_range_* routines fo...
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.
Definition: Coupleable.C:821
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...
Definition: Coupleable.h:146
const ADVariableGradient & adZeroGradient() const
method that returns _grad_zero to RESIDUAL computing objects and _ad_grad_zero to JACOBIAN computing ...
Definition: Coupleable.C:2437
MooseWritableVariable & writableVariable(const std::string &var_name, unsigned int comp=0)
Returns a writable MooseVariable object for a nodal or elemental variable.
Definition: Coupleable.C:908
Base class for a system (of equations)
Definition: SystemBase.h:84
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.
Definition: Coupleable.C:1837
std::unordered_map< std::string, std::unique_ptr< VectorVariableValue > > _default_vector_value
Will hold the default value for optional vector coupled variables.
Definition: Coupleable.h:1461
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...
Definition: Coupleable.C:944
std::vector< VariableName > coupledNames(const std::string &var_name) const
Names of the variables in the Coupleable interface.
Definition: Coupleable.C:2531
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
virtual const VariableGradient & coupledGradient(const std::string &var_name, unsigned int comp=0) const
Returns gradient of a coupled variable.
Definition: Coupleable.C:1543
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.
Definition: Coupleable.h:1974
Moose::Kokkos::VariableGradient kokkosCoupledGradients(const std::string &var_name)
OutputTools< Real >::VariablePhiSecond VariablePhiSecond
Definition: MooseTypes.h:322
const T & coupledNodalValuePreviousNL(const std::string &var_name, unsigned int comp=0) const
Returns nodal values of a coupled variable for previous Newton iterate.
Definition: Coupleable.C:1979
Moose::Kokkos::VariableValue kokkosCoupledValueOld(const std::string &var_name, unsigned int comp=0)
std::vector< const ADVariableValue * > adCoupledValues(const std::string &var_name) const
Returns the values for all of a coupled variable&#39;s components for use in Automatic Differentiation...
Definition: Coupleable.C:2566
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.
Definition: Coupleable.C:1053
std::vector< MooseVariable * > _coupled_standard_moose_vars
Vector of standard coupled variables.
Definition: Coupleable.h:1426
Moose::Kokkos::VariableGradient kokkosCoupledVectorTagGradient(const std::string &var_name, const std::string &tag_param_name, unsigned int comp=0)
Moose::Kokkos::VariableGradient kokkosCoupledGradient(const std::string &var_name, unsigned int comp=0)
const std::vector< MooseVariable * > & getCoupledStandardMooseVars() const
Get the list of standard coupled variables.
Definition: Coupleable.h:90
const ADVariableValue & adCoupledDotDot(const std::string &var_name, unsigned int comp=0) const
Second time derivative of a coupled variable for ad simulations.
Definition: Coupleable.C:2304
const SystemBase *const _c_sys
Pointer to the system object if the moose object this is an interface for has one.
Definition: Coupleable.h:1417
FEProblemBase & _c_fe_problem
Definition: Coupleable.h:1414
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.
Definition: Coupleable.C:665
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...
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.
Definition: Coupleable.C:1885
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. ...
Definition: Coupleable.C:758
bool _c_is_implicit
True if implicit value is required.
Definition: Coupleable.h:1444
virtual const VariableValue & coupledValue(const std::string &var_name, unsigned int comp=0) const
Returns value of a coupled variable.
Definition: Coupleable.C:527
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.
Definition: Coupleable.C:2204
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.
Definition: Coupleable.C:1113
Moose::Kokkos::VariableValue kokkosCoupledNodalValues(const std::string &var_name)
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< VectorMooseVariable * > _coupled_vector_moose_vars
Vector of vector coupled variables.
Definition: Coupleable.h:1429
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&#39;s system depending on the value ...
Definition: Coupleable.C:578
virtual const VariableValue & coupledValueLower(const std::string &var_name, unsigned int comp=0) const
Returns value of a coupled lower-dimensional variable.
Definition: Coupleable.C:632
Coupleable(const MooseObject *moose_object, bool nodal, bool is_fv=false)
Constructing the object.
Definition: Coupleable.C:27
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.
Definition: Coupleable.C:1559
Moose::Kokkos::VariableGradient kokkosZeroGradient()
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.
Definition: Coupleable.C:2673
const Real _kokkos_default_value_zero
kokkos-related variables and methods
Definition: Coupleable.h:1827
OutputTools< RealEigenVector >::VariableValue ArrayVariableValue
Definition: MooseTypes.h:349
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.
Definition: Coupleable.C:1348
void addFEVariableCoupleableVectorTag(TagID tag)
Definition: Coupleable.h:113
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.
Definition: Coupleable.C:1869
Moose::GenericType< VariableValue, is_ad > GenericVariableValue
Definition: MooseTypes.h:663
auto & getWritableCoupledVariables() const
returns a reference to the set of writable coupled variables
Definition: Coupleable.h:134
const TagName OLD_SOLUTION_TAG
Definition: MooseTypes.C:26
Every object that can be built by the factory should be derived from this class.
Definition: MooseObject.h:27
Moose::GenericType< VariableGradient, is_ad > GenericVariableGradient
Definition: MooseTypes.h:667
virtual const ArrayVariableValue & coupledArrayValue(const std::string &var_name, unsigned int comp=0) const
Returns value of a coupled array variable.
Definition: Coupleable.C:879
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.
Definition: Coupleable.C:552
std::vector< const VariableGradient * > coupledGradientsOld(const std::string &var_name) const
Returns the old gradients for all of a coupled variable&#39;s components.
Definition: Coupleable.C:2770
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.
Definition: Coupleable.C:719
VariableGradient _default_gradient
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:1477
VariableSecond _default_second
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:1486
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.
Definition: Coupleable.h:1457
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...
Definition: Coupleable.C:365
Moose::Kokkos::VariableValue kokkosCoupledNodalValuesOld(const std::string &var_name)
std::vector< const ADVariableValue * > adCoupledDots(const std::string &var_name) const
Returns the time derivatives for all of a coupled variable&#39;s components for ad simulations.
Definition: Coupleable.C:2784
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...
virtual const VariableGradient & coupledGradientDot(const std::string &var_name, unsigned int comp=0) const
Time derivative of the gradient of a coupled variable.
Definition: Coupleable.C:1608
const ADVariableValue * getADDefaultValue(const std::string &var_name) const
Helper method to return (and insert if necessary) the default value for Automatic Differentiation for...
Definition: Coupleable.C:2371
const ADVariableValue & adCoupledDot(const std::string &var_name, unsigned int comp=0) const
Time derivative of a coupled variable for ad simulations.
Definition: Coupleable.C:2281
Moose::Kokkos::VariableValue kokkosCoupledValueOlder(const std::string &var_name, unsigned int comp=0)
const std::string & _c_name
The name of the object this interface is part of.
Definition: Coupleable.h:1409
Moose::Kokkos::VariableValue kokkosCoupledNodalDots(const std::string &var_name)
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...
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.
Definition: Coupleable.C:1756
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.
Definition: Coupleable.C:2131
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.
Definition: Coupleable.C:2041
std::vector< const VariableValue * > coupledAllDofValuesOld(const std::string &var_name) const
Returns DoFs in the old solution vector of all of a coupled variable&#39;s components for the local eleme...
Definition: Coupleable.C:2090
std::vector< const VariableGradient * > coupledGradients(const std::string &var_name) const
Returns the gradients for all of a coupled variable&#39;s components.
Definition: Coupleable.C:2741
std::vector< const VariableValue * > coupledAllDofValuesOlder(const std::string &var_name) const
Returns DoFs in the older solution vector of all of a coupled variable&#39;s components for the local ele...
Definition: Coupleable.C:2110
const std::set< TagID > & getFEVariableCoupleableMatrixTags() const
Definition: Coupleable.h:126
const ADVectorVariableValue & adCoupledVectorDot(const std::string &var_name, unsigned int comp=0) const
Time derivative of a vector coupled variable for ad simulations.
Definition: Coupleable.C:2321
const Moose::Functor< T > & getDefaultFunctor(const std::string &var_name) 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.
Definition: Coupleable.C:2097
const VectorVariableCurl & _vector_curl_zero
Zero value of the curl of a vector variable.
Definition: Coupleable.h:1514
const ADVectorVariableGradient & getADDefaultVectorGradient() const
Helper method to return (and insert if necessary) the default gradient for Automatic Differentiation ...
Definition: Coupleable.C:2409
const ADVariableValue & adZeroValue() const
method that returns _zero to RESIDUAL computing objects and _ad_zero to JACOBIAN computing objects ...
Definition: Coupleable.C:2430
std::vector< unsigned int > coupledIndices(const std::string &var_name) const
Returns the indices for a coupled variable&#39;s components.
Definition: Coupleable.C:2507
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.
Definition: Coupleable.C:1959
const std::vector< MooseVariableFieldBase * > & getCoupledMooseVars() const
Get the list of all coupled variables.
Definition: Coupleable.h:81
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...
Moose::Kokkos::VariableValue kokkosCoupledNodalDot(const std::string &var_name, unsigned int comp=0)
const MooseObject *const _obj
Definition: Coupleable.h:1814
VectorVariableGradient _default_vector_gradient
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:1523
std::vector< MooseVariableFieldBase * > _coupled_moose_vars
Vector of all coupled variables.
Definition: Coupleable.h:1423
virtual const VectorVariableCurl & coupledCurl(const std::string &var_name, unsigned int comp=0) const
Returns curl of a coupled variable.
Definition: Coupleable.C:1740
OutputTools< Real >::VariableValue VariableValue
Definition: MooseTypes.h:315
std::set< TagID > & getFEVariableCoupleableMatrixTags()
Definition: Coupleable.h:119
virtual const ArrayVariableGradient & coupledArrayGradient(const std::string &var_name, unsigned int comp=0) const
Returns gradient of a coupled array variable.
Definition: Coupleable.C:1688
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.
Definition: Coupleable.C:1468
OutputTools< Real >::VariablePhiGradient VariablePhiGradient
Definition: MooseTypes.h:321
unsigned int coupledComponents(const std::string &var_name) const
Number of coupled components.
Definition: Coupleable.C:188
bool _coupleable_neighbor
Whether or not this object is a "neighbor" object: ie all of it&#39;s coupled values should be neighbor v...
Definition: Coupleable.h:1713
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. ...
Definition: Coupleable.C:1714
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.
Definition: Coupleable.C:1364
std::vector< const ADVariableGradient * > adCoupledGradients(const std::string &var_name) const
Returns the gradients for all of a coupled variable&#39;s components for use in Automatic Differentiation...
Definition: Coupleable.C:2763
Interface for objects that needs coupling capabilities.
Definition: Coupleable.h:49
std::vector< MooseVariableField< Real > * > _coupled_fv_moose_vars
Vector of all finite volume coupled variables.
Definition: Coupleable.h:1435
Moose::Kokkos::VariableValue kokkosCoupledVectorTagNodalValues(const std::string &var_name, const std::string &tag_param_name)
Moose::Kokkos::VariableValue kokkosCoupledVectorTagValuesByName(const std::string &var_name, const std::string &tag_name)
const GenericVariableSecond< is_ad > & genericZeroSecond()
Returns zero second derivative templated with automatic differentiation boolean.
std::vector< const VariableValue * > coupledValues(const std::string &var_name) const
Returns the values for all of a coupled variable components.
Definition: Coupleable.C:2538
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
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.
Definition: Coupleable.C:2650
const T & getDefaultNodalValue(const std::string &var_name, unsigned int comp=0) const
Get nodal default value.
Definition: Coupleable.C:449
const std::string & _c_type
The type of the object this interface is part of.
Definition: Coupleable.h:1411
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.
Definition: Coupleable.C:1672
const MooseArray< ADRealTensorValue > & _ad_second_zero
Definition: Coupleable.h:1508
VectorVariableValue _default_vector_value_zero
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:1520
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.
Definition: Coupleable.C:239
virtual const VariableValue & coupledValuePreviousNL(const std::string &var_name, unsigned int comp=0) const
Returns value of previous Newton iterate of a coupled variable.
Definition: Coupleable.C:1075
MooseArray< ADRealTensorValue > _ad_default_vector_gradient
This will always be zero because the default values for optionally coupled vector variables is always...
Definition: Coupleable.h:1483
virtual const VectorVariableValue & coupledVectorValue(const std::string &var_name, unsigned int comp=0) const
Returns value of a coupled vector variable.
Definition: Coupleable.C:854
const std::set< TagID > & getFEVariableCoupleableVectorTags() const
Definition: Coupleable.h:121
std::string checkForRename(const std::string &name) const
Checks whether the provided name is a renamed parameter name.
virtual const VariableValue & coupledDotDotOld(const std::string &var_name, unsigned int comp=0) const
Old second time derivative of a coupled variable.
Definition: Coupleable.C:1259
The Kokkos variable object that carries the coupled variable and tag information. ...
MooseArray< ADRealTensorValue > _ad_default_second
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:1489
Moose::Kokkos::VariableValue kokkosCoupledNodalValueOlder(const std::string &var_name, unsigned int comp=0)
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.
Definition: Coupleable.C:1518
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.
Definition: Coupleable.C:2581
const VariablePhiValue & _phi_zero
Definition: Coupleable.h:1496
ArrayMooseVariable * getArrayVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled array variable.
Definition: Coupleable.C:336
Moose::Kokkos::VariableValue kokkosCoupledValuesOld(const std::string &var_name)
virtual const ArrayVariableValue & coupledArrayDotDot(const std::string &var_name, unsigned int comp=0) const
Second time derivative of a coupled array variable.
Definition: Coupleable.C:1402
Class for scalar variables (they are different).
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.
Definition: Coupleable.C:2355
Moose::Kokkos::VariableGradient kokkosCoupledVectorTagGradients(const std::string &var_name, const std::string &tag_param_name)
std::unordered_map< std::string, std::vector< unsigned int > > _optional_var_index
Unique indices for optionally coupled vars that weren&#39;t provided.
Definition: Coupleable.h:1802
Moose::Kokkos::VariableValue kokkosCoupledVectorTagValues(const std::string &var_name, const std::string &tag_param_name)
const MooseVariableFieldBase * getFEVar(const std::string &var_name, unsigned int comp) const
Deprecated method.
Definition: Coupleable.C:298
std::unordered_map< std::string, std::vector< std::unique_ptr< VariableValue > > > _default_value
Will hold the default value for optional coupled variables.
Definition: Coupleable.h:1454
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...
Definition: Coupleable.C:2696
Moose::GenericType< VariableSecond, is_ad > GenericVariableSecond
Definition: MooseTypes.h:669
const InputParameters & _c_parameters
Definition: Coupleable.h:1406
OutputTools< Real >::VariableSecond VariableSecond
Definition: MooseTypes.h:317
const MooseArray< ADReal > & _ad_zero
Definition: Coupleable.h:1497
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.
Definition: Coupleable.C:1701
const Moose::ADType< T >::type & adCoupledNodalValue(const std::string &var_name, unsigned int comp=0) const
Returns AD nodal values of a coupled variable.
Definition: Coupleable.C:2162
Moose::Kokkos::VariableGradient kokkosCoupledVectorTagGradientByName(const std::string &var_name, const std::string &tag_name, unsigned int comp=0)
virtual const VariableValue & coupledNodalDotOld(const std::string &var_name, unsigned int comp=0) const
Nodal values of old time derivative of a coupled variable.
Definition: Coupleable.C:2025
const GenericVariableValue< is_ad > & genericZeroValue()
Returns zero value templated with automatic differentiation boolean.
std::unordered_map< std::string, std::unique_ptr< ArrayVariableValue > > _default_array_value
Will hold the default value for optional array coupled variables.
Definition: Coupleable.h:1464
Moose::Kokkos::Scalar< const Real > kokkosCoupledDotDu(const std::string &var_name, unsigned int comp=0)
Moose::Kokkos::VariableValue kokkosCoupledVectorTagValueByName(const std::string &var_name, const std::string &tag_name, unsigned int comp=0)
OutputTools< RealVectorValue >::VariableGradient VectorVariableGradient
Definition: MooseTypes.h:333
ArrayVariableGradient _default_array_gradient
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:1538
Moose::Kokkos::VariableValue kokkosCoupledVectorTagNodalValue(const std::string &var_name, const std::string &tag_param_name, unsigned int comp=0)
const ADVariableSecond & getADDefaultSecond() const
Helper method to return (and insert if necessary) the default second derivatives for Automatic Differ...
Definition: Coupleable.C:2416
The Kokkos wrapper classes for MOOSE-like variable value access.
const std::set< std::string > _older_state_tags
vector tag names for which we need to request older solution states from the system ...
Definition: Coupleable.h:1817
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.
Definition: Coupleable.C:1772
Moose::Kokkos::VariableGradient kokkosCoupledGradientOld(const std::string &var_name, unsigned int comp=0)
virtual const VectorVariableDivergence & coupledDiv(const std::string &var_name, unsigned int comp=0) const
Returns divergence of a coupled variable.
Definition: Coupleable.C:1805
virtual const VariableGradient & coupledGradientPreviousNL(const std::string &var_name, unsigned int comp=0) const
Returns gradient of a coupled variable for previous Newton iterate.
Definition: Coupleable.C:1591
ArrayVariableValue _default_array_value_zero
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:1535
Moose::Kokkos::VariableValue kokkosCoupledVectorTagNodalValueByName(const std::string &var_name, const std::string &tag_name, unsigned int comp=0)
unsigned int _coupleable_max_qps
Maximum qps for any element in this system.
Definition: Coupleable.h:1799
OutputTools< RealEigenVector >::VariableGradient ArrayVariableGradient
Definition: MooseTypes.h:350
void addFEVariableCoupleableMatrixTag(TagID tag)
Definition: Coupleable.h:115
std::vector< const ADVectorVariableValue * > adCoupledVectorValues(const std::string &var_name) const
Returns the values for all of a coupled vector variable&#39;s components for use in Automatic Differentia...
Definition: Coupleable.C:2573
std::vector< const VectorVariableValue * > coupledVectorValues(const std::string &var_name) const
Returns the values for all of a coupled vector variable&#39;s components.
Definition: Coupleable.C:2545
virtual const VariableValue & coupledDotDot(const std::string &var_name, unsigned int comp=0) const
Second time derivative of a coupled variable.
Definition: Coupleable.C:1195
Moose::Kokkos::Variable kokkosCoupledVectorTagVariable(const std::string &var_name, const std::string &tag_name, unsigned int comp)
virtual const ArrayVariableGradient & coupledArrayGradientDot(const std::string &var_name, unsigned int comp=0) const
Retun a gradient of a coupled array variable&#39;s time derivative.
Definition: Coupleable.C:1727
std::vector< const GenericVariableGradient< is_ad > * > coupledGenericGradients(const std::string &var_name) const
Returns the gradients for all of a coupled variable&#39;s components for use in templated automatic diffe...
const std::unordered_map< std::string, std::vector< MooseVariableFieldBase * > > & getCoupledVars() const
Get the list of coupled variables.
Definition: Coupleable.h:72
std::set< TagID > & getFEVariableCoupleableVectorTags()
Definition: Coupleable.h:117
virtual const VectorVariableValue & coupledVectorDotOld(const std::string &var_name, unsigned int comp=0) const
Old time derivative of a coupled vector variable.
Definition: Coupleable.C:1316
const ADVariableGradient & adCoupledGradientDot(const std::string &var_name, unsigned int comp=0) const
Returns gradient of a coupled variable&#39;s time derivative for use in Automatic Differentiation.
Definition: Coupleable.C:2239
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.
Definition: Coupleable.C:2256
bool hasWritableCoupledVariables() const
Checks whether the object has any writable coupled variables.
Definition: Coupleable.h:139
virtual const VectorVariableValue & coupledVectorDotDotOld(const std::string &var_name, unsigned int comp=0) const
Old second time derivative of a coupled vector variable.
Definition: Coupleable.C:1332
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.
Definition: Coupleable.C:1788
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.
Definition: Coupleable.C:2337
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.
Definition: Coupleable.C:1939
MooseArray< ADRealVectorValue > _ad_default_gradient
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:1480
std::vector< const VariableValue * > coupledValuesOld(const std::string &var_name) const
Returns the old values for all of a coupled variable&#39;s components.
Definition: Coupleable.C:2719
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.
Definition: Coupleable.C:1575
unsigned int THREAD_ID
Definition: MooseTypes.h:209
const std::unordered_map< std::string, std::string > & _new_to_deprecated_coupled_vars
map from new to deprecated variable names
Definition: Coupleable.h:1438
std::vector< const VariableValue * > coupledAllDofValues(const std::string &var_name) const
Returns DoFs in the current solution vector of all of a coupled variable&#39;s components for the local e...
Definition: Coupleable.C:2070
const MooseVariableFieldBase * getFieldVar(const std::string &var_name, unsigned int comp) const
Definition: Coupleable.C:312
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.
Definition: Coupleable.C:1821