https://mooseframework.inl.gov
MooseTypes.h
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://mooseframework.inl.gov
3 //*
4 //* All rights reserved, see COPYRIGHT for full restrictions
5 //* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6 //*
7 //* Licensed under LGPL 2.1, please see LICENSE for details
8 //* https://www.gnu.org/licenses/lgpl-2.1.html
9 
10 #pragma once
11 
12 #include "Moose.h"
13 #include "ADReal.h"
14 #include "EigenADReal.h"
15 #include "ChainedReal.h"
16 #include "ChainedADReal.h"
17 #include "ADRankTwoTensorForward.h"
22 
23 // This is not strictly needed here, but it used to be included by ADReal.h
24 // so developers relied heavily on it being already available
25 #include "MooseError.h"
26 
27 #include "libmesh/libmesh.h"
28 #include "libmesh/id_types.h"
29 #include "libmesh/stored_range.h"
30 #include "libmesh/petsc_macro.h"
31 #include "libmesh/boundary_info.h"
32 #include "libmesh/parameters.h"
33 #include "libmesh/dense_vector.h"
34 #include "libmesh/dense_matrix.h"
35 #include "libmesh/int_range.h"
36 
37 // BOOST include
38 #include "boost/bitmask_operators.h"
39 
40 #include "libmesh/ignore_warnings.h"
41 #include "Eigen/Core"
42 #include "libmesh/restore_warnings.h"
43 #include "libmesh/tensor_tools.h"
44 
45 #include "metaphysicl/ct_types.h"
46 
47 #include <string>
48 #include <vector>
49 #include <memory>
50 #include <type_traits>
51 #include <functional>
52 #include <iterator> // std::data
53 
54 #if !defined(INCLUDE_NLOHMANN_JSON_HPP_) && !defined(MOOSE_NLOHMANN_INCLUDED)
55 #undef INCLUDE_NLOHMANN_JSON_FWD_HPP_
56 #include "nlohmann/json_fwd.h"
57 #define MOOSE_NLOHMANN_INCLUDED
58 #endif
59 
60 // DO NOT USE (Deprecated)
61 #define MooseSharedPointer std::shared_ptr
62 #define MooseSharedNamespace std
63 
71 // The multiple macros that you would need anyway [as per: Crazy Eddie (stack overflow)]
72 #ifdef __clang__
73 #pragma clang diagnostic push
74 #pragma clang diagnostic ignored "-Wgnu-zero-variadic-macro-arguments"
75 #endif
76 
77 #define beginIndex_0() ERROR-- > "beginIndex() requires one or two arguments"
78 #define beginIndex_1(A) decltype(A.size())(0)
79 #define beginIndex_2(A, B) decltype(A.size())(B)
80 #define beginIndex_3(A, B, C) ERROR-- > "beginIndex() requires one or two arguments"
81 #define beginIndex_4(A, B, C, D) ERROR-- > "beginIndex() requires one or two arguments"
82 
83 // The interim macro that simply strips the excess and ends up with the required macro
84 #define beginIndex_X(x, A, B, C, D, FUNC, ...) FUNC
85 
86 // The macro that the programmer uses
87 #define beginIndex(...) \
88  beginIndex_X(, \
89  ##__VA_ARGS__, \
90  beginIndex_4(__VA_ARGS__), \
91  beginIndex_3(__VA_ARGS__), \
92  beginIndex_2(__VA_ARGS__), \
93  beginIndex_1(__VA_ARGS__), \
94  beginIndex_0(__VA_ARGS__))
95 
109 #define MooseIndex(type) decltype(_MooseIndex(type, 0))
110 
111 // SFINAE templates for type MooseIndex type selection
112 template <typename T, typename std::enable_if<std::is_integral<T>::value>::type * = nullptr>
113 typename std::remove_const<T>::type
114 _MooseIndex(T, int)
115 {
116 }
117 
118 template <typename T>
119 decltype(std::declval<T>().size())
120 _MooseIndex(T &&, int)
121 {
122 }
123 
124 template <typename T>
125 decltype("NOTE: MooseIndex only works with integers and objects with size()!")
126 _MooseIndex(T, double) = delete;
127 
128 #ifdef __clang__
129 #pragma clang diagnostic pop
130 #endif
131 
135 template <typename>
136 class MooseArray;
137 template <typename>
138 class MaterialProperty;
139 template <typename>
140 class ADMaterialProperty;
141 class InputParameters;
142 
143 namespace libMesh
144 {
146 typedef Eigen::Matrix<Real, Moose::dim, 1> RealDIMValue;
147 typedef Eigen::Matrix<Real, Eigen::Dynamic, 1> RealEigenVector;
148 typedef Eigen::Matrix<ADReal, Eigen::Dynamic, 1> ADRealEigenVector;
149 typedef Eigen::Matrix<Real, Eigen::Dynamic, Moose::dim> RealVectorArrayValue;
150 typedef Eigen::Matrix<Real, Eigen::Dynamic, Moose::dim * Moose::dim> RealTensorArrayValue;
151 typedef Eigen::Matrix<Real, Eigen::Dynamic, Eigen::Dynamic> RealEigenMatrix;
152 typedef Eigen::Matrix<ADReal, Eigen::Dynamic, Eigen::Dynamic> ADRealEigenMatrix;
154 
155 namespace TensorTools
156 {
157 template <>
158 struct IncrementRank<Eigen::Matrix<Real, Eigen::Dynamic, 1>>
159 {
160  typedef Eigen::Matrix<Real, Eigen::Dynamic, Moose::dim> type;
161 };
162 
163 template <>
164 struct IncrementRank<Eigen::Matrix<Real, Eigen::Dynamic, Moose::dim>>
165 {
166  typedef Eigen::Matrix<Real, Eigen::Dynamic, Moose::dim * Moose::dim> type;
167 };
168 
169 template <>
170 struct DecrementRank<Eigen::Matrix<Real, Eigen::Dynamic, Moose::dim>>
171 {
172  typedef Eigen::Matrix<Real, Eigen::Dynamic, 1> type;
173 };
174 
175 template <>
176 struct IncrementRank<Eigen::Matrix<ADReal, Eigen::Dynamic, 1>>
177 {
178  typedef Eigen::Matrix<ADReal, Eigen::Dynamic, Moose::dim> type;
179 };
180 
181 template <>
182 struct IncrementRank<Eigen::Matrix<ADReal, Eigen::Dynamic, Moose::dim>>
183 {
184  typedef Eigen::Matrix<ADReal, Eigen::Dynamic, Moose::dim * Moose::dim> type;
185 };
186 
187 template <>
188 struct DecrementRank<Eigen::Matrix<ADReal, Eigen::Dynamic, Moose::dim>>
189 {
190  typedef Eigen::Matrix<ADReal, Eigen::Dynamic, 1> type;
191 };
192 }
193 }
194 
195 // Common types defined in libMesh
196 using libMesh::Gradient;
198 
199 // Bring these common types added to the libMesh namespace in this header
200 // to global namespace
212 
213 namespace MetaPhysicL
214 {
215 template <typename U>
216 struct ReplaceAlgebraicType<libMesh::RealEigenVector, U>
217 {
218  typedef U type;
219 };
220 template <typename U>
221 struct ReplaceAlgebraicType<libMesh::ADRealEigenVector, U>
222 {
223  typedef U type;
224 };
225 }
226 
231 typedef std::vector<Real> VectorPostprocessorValue;
234 typedef unsigned int InterfaceID;
236 typedef unsigned int MooseObjectID;
237 typedef unsigned int THREAD_ID;
238 typedef unsigned int TagID;
239 typedef unsigned int TagTypeID;
240 typedef unsigned int PerfID;
241 typedef unsigned int InvalidSolutionID;
242 using RestartableDataMapName = std::string; // see MooseApp.h
243 
247 
248 namespace Moose
249 {
250 
258 constexpr std::size_t constMaxQpsPerElem = 1000;
259 
260 // These are used by MooseVariableData and MooseVariableDataFV
261 enum SolutionState : int
262 {
263  Current = 0,
264  Old = 1,
265  Older = 2,
267 };
268 
269 enum class SolutionIterationType : unsigned short
270 {
271  Time = 0,
272  Nonlinear = 1,
273  FixedPoint = 2
274 };
275 
276 // These are used by MooseVariableData and MooseVariableDataFV
278 {
281 };
282 
283 template <typename OutputType>
284 struct ShapeType
285 {
286  typedef OutputType type;
287 };
288 template <>
289 struct ShapeType<Eigen::Matrix<Real, Eigen::Dynamic, 1>>
290 {
291  typedef Real type;
292 };
293 
294 template <typename OutputType>
295 struct DOFType
296 {
297  typedef OutputType type;
298 };
299 template <>
301 {
302  typedef Real type;
303 };
304 } // namespace Moose
305 
306 template <typename OutputType>
308 {
312 
318 
323 
329 
335 
336  // DoF value type for the template class OutputType
339  typedef OutputType OutputValue;
340 };
341 
342 // types for standard variable
358 
359 // types for vector variable
375 
376 // types for array variable
386 typedef std::vector<std::vector<Eigen::Map<RealDIMValue>>> MappedArrayVariablePhiGradient;
395 
399 /*
400 typedef typename OutputTools<ADRealEigenVector>::VariableTestValue ADArrayVariableTestValue;
401 typedef typename OutputTools<ADRealEigenVector>::VariableTestGradient ADArrayVariableTestGradient;
402 */
419 
420 namespace Moose
421 {
422 
423 // type conversion from regular to AD
424 template <typename T>
425 struct ADType
426 {
427  // unless a specialization exists we assume there is no specific AD type
428  typedef T type;
429 };
430 
431 template <>
432 struct ADType<Real>
433 {
434  typedef ADReal type;
435 };
436 template <>
438 {
440 };
441 template <>
442 struct ADType<Point>
443 {
444  typedef ADPoint type;
445 };
446 
447 template <>
449 {
451 };
452 template <>
454 {
456 };
457 template <>
459 {
461 };
462 template <>
464 {
466 };
467 
468 template <>
470 {
472 };
473 template <>
475 {
477 };
478 
479 template <template <typename T> class W, typename T>
480 struct ADType<W<T>>
481 {
482  typedef W<typename ADType<T>::type> type;
483 };
484 
485 template <typename T>
486 struct ADType<std::vector<T, std::allocator<T>>>
487 {
488  typedef typename ADType<T>::type adT;
489  typedef std::vector<adT, std::allocator<adT>> type;
490 };
491 
492 template <typename T>
493 struct ADType<std::list<T, std::allocator<T>>>
494 {
495  typedef typename ADType<T>::type adT;
496  typedef std::list<adT, std::allocator<adT>> type;
497 };
498 
499 template <typename T>
500 struct ADType<std::set<T, std::less<T>, std::allocator<T>>>
501 {
502  typedef typename ADType<T>::type adT;
503  typedef std::set<adT, std::less<adT>, std::allocator<adT>> type;
504 };
505 
506 template <typename T>
507 struct ADType<DenseVector<T>>
508 {
510 };
511 
512 template <typename T>
513 struct ADType<DenseMatrix<T>>
514 {
516 };
517 
518 template <>
520 {
522 };
523 
524 template <>
526 {
528 };
529 
530 template <>
532 {
534 };
535 template <>
537 {
539 };
540 template <>
542 {
544 };
545 
546 template <>
547 struct ADType<ADReal>
548 {
549  typedef ADReal type;
550 };
551 template <>
553 {
555 };
556 template <>
558 {
560 };
561 template <>
563 {
565 };
566 template <>
568 {
570 };
571 
572 template <>
574 {
576 };
577 template <>
579 {
581 };
582 
583 template <>
585 {
587 };
588 template <>
590 {
592 };
593 template <>
595 {
597 };
598 
599 template <typename T>
600 struct IsADType
601 {
602  static constexpr bool value = false;
603 };
604 
605 template <>
607 {
608  static constexpr bool value = true;
609 };
610 
611 template <>
613 {
614  static constexpr bool value = true;
615 };
616 
617 template <template <typename T, typename... Args> class W, typename T, typename... Args>
618 struct IsADType<W<T, Args...>>
619 {
620  static constexpr bool value = IsADType<T>::value;
621 };
622 
623 template <typename T, typename... Args>
624 struct IsADType<MetaPhysicL::DualNumber<T, Args...>>
625 {
626  static constexpr bool value = true;
627 };
628 
634 template <class... Ts>
635 constexpr std::false_type always_false{};
636 
637 } // namespace Moose
638 
645 
646 template <typename T>
649 template <typename T>
652 template <typename T>
655 template <typename T>
657 
664 
665 // We can use the non-ad version for test values because these don't depend on the mesh
666 // displacements (unless the location of the quadrature points depend on the mesh displacements...)
667 template <typename T>
669 template <typename T>
671 
672 // We need to use the AD version for test gradients and seconds because these *do* depend on the
673 // mesh displacements
674 template <typename T>
677 template <typename T>
680 template <typename T>
684 
685 // Templated typed to support is_ad templated classes
686 namespace Moose
687 {
688 template <typename T, bool is_ad>
689 using GenericType = typename std::conditional<is_ad, typename ADType<T>::type, T>::type;
690 }
691 
692 template <bool is_ad>
694 template <bool is_ad>
696 template <bool is_ad>
698 template <bool is_ad>
700 template <bool is_ad>
702 template <bool is_ad>
704 template <bool is_ad>
706 template <bool is_ad>
708 template <bool is_ad>
710 template <bool is_ad>
712 template <bool is_ad>
714 template <bool is_ad>
716 template <bool is_ad>
718 template <bool is_ad>
720 template <bool is_ad>
722 
723 namespace Moose
724 {
726 extern const SubdomainID ANY_BLOCK_ID;
727 extern const SubdomainID INVALID_BLOCK_ID;
728 extern const BoundaryID ANY_BOUNDARY_ID;
729 extern const BoundaryID INVALID_BOUNDARY_ID;
730 extern const TagID INVALID_TAG_ID;
731 extern const TagTypeID INVALID_TAG_TYPE_ID;
732 const std::set<SubdomainID> EMPTY_BLOCK_IDS = {};
733 const std::set<BoundaryID> EMPTY_BOUNDARY_IDS = {};
734 
741 {
747 };
748 
753 {
754  PRE_IC = 0,
755  PRE_AUX = 1,
756  POST_AUX = 2,
757  ALL = 3
758 };
759 
764 {
768 };
769 
771 {
777 };
778 
780 {
784 };
785 
787 {
790 };
791 
793 {
796 };
797 
799 {
804 };
805 
807 {
810 };
811 
812 enum class ElementType : unsigned int
813 {
817 };
818 
819 enum class MortarType : unsigned int
820 {
821  Secondary = static_cast<unsigned int>(Moose::ElementType::Element),
822  Primary = static_cast<unsigned int>(Moose::ElementType::Neighbor),
823  Lower = static_cast<unsigned int>(Moose::ElementType::Lower)
824 };
825 
829 enum class ComputeType
830 {
831  Residual,
832  Jacobian,
834 };
835 
840 enum class RESTARTABLE_FILTER : unsigned char
841 {
843 };
844 
846 {
856 };
857 
859 {
863 };
864 
869 {
874 };
875 
880 {
886 };
887 
892 {
898 };
899 
904 {
914 };
915 
920 {
928 };
929 
934 {
946 };
947 
952 {
961 };
962 
967 {
970 };
975 {
986 };
987 
992 {
996 };
997 
1002 {
1007 };
1008 
1012 enum class RelationshipManagerType : unsigned char
1013 {
1014  DEFAULT = 0,
1015  GEOMETRIC = 1 << 0,
1016  ALGEBRAIC = 1 << 1,
1017  COUPLING = 1 << 2
1018 };
1019 
1021 {
1025 };
1026 
1028 {
1032 };
1033 
1037 typedef std::function<void(const InputParameters &, InputParameters &)>
1039 
1040 std::string stringify(const Moose::RelationshipManagerType & t);
1041 std::string stringify(const Moose::TimeIntegratorType & t);
1042 
1047 {
1048 };
1049 
1059 template <typename T>
1060 class Span
1061 {
1062 public:
1063  using element_type = T;
1064  using size_type = std::size_t;
1065  using pointer = T *;
1066  using reference = T &;
1067 
1068  constexpr Span(T * ptr, size_type n) noexcept : _ptr(ptr), _n(n) {}
1069 
1070  // observers (enough for std::data / std::size)
1071  constexpr pointer data() const noexcept { return _ptr; }
1072  constexpr size_type size() const noexcept { return _n; }
1073  constexpr bool empty() const noexcept { return _n == 0; }
1074 
1075  // optional element/iterator access
1076  constexpr reference operator[](size_type i) const noexcept { return _ptr[i]; }
1077  constexpr pointer begin() const noexcept { return _ptr; }
1078  constexpr pointer end() const noexcept { return _ptr + _n; }
1079 
1080 private:
1081  T * _ptr;
1083 };
1084 
1088 template <class C>
1089 auto
1090 makeSpan(C & container, std::size_t offset, std::size_t n)
1091 {
1092  using PointerType = decltype(std::data(container));
1093  using ElementType = std::remove_pointer_t<PointerType>;
1094  return Moose::Span<ElementType>{std::data(container) + offset, n};
1095 }
1096 } // namespace Moose
1097 
1098 namespace libMesh
1099 {
1100 template <>
1101 inline void
1102 print_helper(std::ostream & os, const Moose::RelationshipManagerType * param)
1103 {
1104  // Specialization so that we don't print out unprintable characters
1105  os << Moose::stringify(*param);
1106 }
1107 } // namespace libMesh
1108 
1109 template <>
1110 struct enable_bitmask_operators<Moose::RelationshipManagerType>
1111 {
1112  static const bool enable = true;
1113 };
1114 
1123 #define MooseDerivativeStringClass(TheName) \
1124  class TheName : public std::string, public Moose::DerivativeStringClass \
1125  { \
1126  public: \
1127  TheName() : std::string() {} \
1128  TheName(const std::string & str) : std::string(str) {} \
1129  TheName(const std::string & str, size_t pos, size_t n = npos) : std::string(str, pos, n) {} \
1130  TheName(const char * s, size_t n) : std::string(s, n) {} \
1131  TheName(const char * s) : std::string(s) {} \
1132  TheName(size_t n, char c) : std::string(n, c) {} \
1133  }; \
1134  namespace nlohmann \
1135  { \
1136  template <> \
1137  struct adl_serializer<TheName> \
1138  { \
1139  static void to_json(json & j, const TheName & v); \
1140  }; \
1141  } \
1142  static_assert(true, "")
1143 
1144 // Instantiate new Types
1145 
1149 MooseDerivativeStringClass(FileName);
1150 
1152 MooseDerivativeStringClass(FileNameNoExtension);
1153 
1156 MooseDerivativeStringClass(RelativeFileName);
1157 
1160 MooseDerivativeStringClass(DataFileName);
1161 
1163 MooseDerivativeStringClass(MeshFileName);
1164 
1166 MooseDerivativeStringClass(MatrixFileName);
1167 
1169 MooseDerivativeStringClass(OutFileBase);
1170 
1172 MooseDerivativeStringClass(NonlinearVariableName);
1173 
1175 MooseDerivativeStringClass(LinearVariableName);
1176 
1178 MooseDerivativeStringClass(SolverVariableName);
1179 
1181 MooseDerivativeStringClass(AuxVariableName);
1182 
1184 MooseDerivativeStringClass(VariableName);
1185 
1187 MooseDerivativeStringClass(BoundaryName);
1188 
1190 MooseDerivativeStringClass(SubdomainName);
1191 
1193 MooseDerivativeStringClass(PostprocessorName);
1194 
1196 MooseDerivativeStringClass(VectorPostprocessorName);
1197 
1199 MooseDerivativeStringClass(MeshDivisionName);
1200 
1202 MooseDerivativeStringClass(FunctionName);
1203 
1205 MooseDerivativeStringClass(DistributionName);
1206 
1208 MooseDerivativeStringClass(SamplerName);
1209 
1211 MooseDerivativeStringClass(UserObjectName);
1212 
1214 MooseDerivativeStringClass(IndicatorName);
1215 
1217 MooseDerivativeStringClass(MarkerName);
1218 
1220 MooseDerivativeStringClass(MultiAppName);
1221 
1223 MooseDerivativeStringClass(OutputName);
1224 
1226 MooseDerivativeStringClass(MaterialPropertyName);
1227 
1229 MooseDerivativeStringClass(MooseFunctorName);
1230 
1232 MooseDerivativeStringClass(MaterialName);
1233 
1236 
1238 MooseDerivativeStringClass(MeshGeneratorName);
1239 
1241 MooseDerivativeStringClass(ExtraElementIDName);
1242 
1244 MooseDerivativeStringClass(ReporterValueName);
1245 
1247 MooseDerivativeStringClass(ComponentName);
1248 
1250 MooseDerivativeStringClass(PhysicsName);
1251 
1253 MooseDerivativeStringClass(PositionsName);
1254 
1256 MooseDerivativeStringClass(TimesName);
1257 
1259 MooseDerivativeStringClass(ExecutorName);
1260 
1262 MooseDerivativeStringClass(ParsedFunctionExpression);
1263 
1265 MooseDerivativeStringClass(NonlinearSystemName);
1266 
1268 MooseDerivativeStringClass(ConvergenceName);
1269 
1271 MooseDerivativeStringClass(LinearSystemName);
1272 
1274 MooseDerivativeStringClass(SolverSystemName);
1275 
1277 MooseDerivativeStringClass(CLIArgString);
1278 
1279 #ifdef MOOSE_MFEM_ENABLED
1280 
1283 MooseDerivativeStringClass(MFEMScalarCoefficientName);
1285 MooseDerivativeStringClass(MFEMVectorCoefficientName);
1286 MooseDerivativeStringClass(MFEMMatrixCoefficientName);
1288 #endif
1289 
1292 typedef std::vector<VariableName> CoupledName;
1293 
1294 namespace Moose
1295 {
1296 extern const TagName SOLUTION_TAG;
1297 extern const TagName OLD_SOLUTION_TAG;
1298 extern const TagName OLDER_SOLUTION_TAG;
1299 extern const TagName PREVIOUS_NL_SOLUTION_TAG;
1300 extern const TagName PREVIOUS_FP_SOLUTION_TAG;
1301 extern const TagName SOLUTION_DOT_TAG;
1302 extern const TagName SOLUTION_DOTDOT_TAG;
1303 
1304 enum class FEBackend
1305 {
1306  LibMesh
1307 #ifdef MOOSE_MFEM_ENABLED
1308  ,
1309  MFEM
1310 #endif
1311 };
1312 
1313 #ifdef MOOSE_KOKKOS_ENABLED
1314 namespace Kokkos
1315 {
1316 // Passkey for calling special constructors for functor copy
1318 {
1319  friend class ResidualObject;
1320  friend class KernelBase;
1321  friend class NodalKernelBase;
1322  friend class BoundaryCondition;
1323  friend class IntegratedBCBase;
1324  friend class NodalBCBase;
1325  friend class MaterialBase;
1326  friend class Material;
1327  friend class AuxKernel;
1328  friend class FunctionBase;
1329 
1330  FunctorCopy() = default;
1331  FunctorCopy(const FunctorCopy &) = delete;
1332  FunctorCopy(FunctorCopy &&) = delete;
1333 };
1334 }
1335 #endif
1336 }
1337 
1339 #define usingTensorIndices(...) \
1340  enum \
1341  { \
1342  __VA_ARGS__ \
1343  }
ConstraintFormulationType
Type of constraint formulation.
Definition: MooseTypes.h:966
typename OutputTools< typename Moose::ADType< T >::type >::VariableSecond ADTemplateVariableSecond
Definition: MooseTypes.h:654
OutputTools< Real >::VariableGradient VariableGradient
Definition: MooseTypes.h:344
VarFieldType
Definition: MooseTypes.h:770
RankFourTensorTempl is designed to handle any N-dimensional fourth order tensor, C.
Generalized Non-Hermitian.
Definition: MooseTypes.h:925
OutputTools< RealVectorValue >::VariableDivergence VectorVariableDivergence
Definition: MooseTypes.h:364
RealVectorValue RealGradient
Moose::GenericType< Real, is_ad > GenericReal
Definition: MooseTypes.h:693
typename OutputTools< typename Moose::ADType< T >::type >::VariableCurl ADTemplateVariableCurl
Definition: MooseTypes.h:656
Moose::GenericType< VectorVariableValue, is_ad > GenericVectorVariableValue
Definition: MooseTypes.h:709
unsigned int TagTypeID
Definition: MooseTypes.h:239
Eigen::Matrix< ADReal, Eigen::Dynamic, 1 > ADRealEigenVector
Definition: MooseTypes.h:148
Generalized Hermitian indefinite.
Definition: MooseTypes.h:924
OutputTools< RealVectorValue >::VariableSecond VectorVariableSecond
Definition: MooseTypes.h:362
Newton-based eigensolver with an assembled Jacobian matrix (fully coupled by default) ...
Definition: MooseTypes.h:910
constexpr size_type size() const noexcept
Definition: MooseTypes.h:1072
Full Newton Solve.
Definition: MooseTypes.h:895
OutputTools< RealEigenVector >::VariableDivergence ArrayVariableDivergence
Definition: MooseTypes.h:383
typename OutputTools< typename Moose::ADType< T >::type >::VariablePhiGradient ADTemplateVariablePhiGradient
Definition: MooseTypes.h:682
ConstraintType
Definition: MooseTypes.h:806
smallest magnitude
Definition: MooseTypes.h:936
libMesh::DenseMatrix< ADReal > ADDenseMatrix
Definition: MooseTypes.h:410
const TagTypeID INVALID_TAG_TYPE_ID
Definition: MooseTypes.C:24
libMesh::TensorTools::IncrementRank< OutputGradient >::type OutputSecond
Definition: MooseTypes.h:310
EigenSolveType
Type of the eigen solve.
Definition: MooseTypes.h:903
OutputTools< ADRealEigenVector >::VariableGradient ADArrayVariableGradient
Definition: MooseTypes.h:380
RelationshipManagerType
Main types of Relationship Managers.
Definition: MooseTypes.h:1012
void print_helper(std::ostream &os, const P *param)
OutputTools< Real >::VariableTestDivergence VariableTestDivergence
Definition: MooseTypes.h:357
std::set< adT, std::less< adT >, std::allocator< adT > > type
Definition: MooseTypes.h:503
constexpr pointer end() const noexcept
Definition: MooseTypes.h:1078
unsigned int TagID
Definition: MooseTypes.h:238
The base class for a user to derive their own Kokkos auxiliary kernels.
unsigned int InvalidSolutionID
Definition: MooseTypes.h:241
MooseArray< std::vector< OutputShapeGradient > > VariablePhiGradient
Definition: MooseTypes.h:325
VectorValue< Real > RealVectorValue
Definition: SubProblem.h:33
subdomain_id_type SubdomainID
Definition: MooseTypes.h:235
typename OutputTools< typename Moose::ADType< T >::type >::VariableTestSecond ADTemplateVariableTestSecond
Definition: MooseTypes.h:679
OutputTools< RealVectorValue >::VariableTestCurl VectorVariableTestCurl
Definition: MooseTypes.h:373
const BoundaryID INVALID_BOUNDARY_ID
Definition: MooseTypes.C:22
const TagName OLDER_SOLUTION_TAG
Definition: MooseTypes.C:27
DenseVector< typename ADType< T >::type > type
Definition: MooseTypes.h:509
MooseArray< std::vector< OutputShapeDivergence > > VariablePhiDivergence
Definition: MooseTypes.h:328
MooseArray< std::vector< OutputShapeDivergence > > VariableTestDivergence
Definition: MooseTypes.h:334
OutputType type
Definition: MooseTypes.h:297
OutputType type
Definition: MooseTypes.h:286
OutputTools< RealEigenVector >::VariablePhiValue ArrayVariablePhiValue
Definition: MooseTypes.h:384
constexpr std::size_t constMaxQpsPerElem
This is used for places where we initialize some qp-sized data structures that would end up being siz...
Definition: MooseTypes.h:258
DualNumber< Real, Real > ChainedReal
Definition: ChainedReal.h:30
typename OutputTools< T >::VariableTestValue ADTemplateVariableTestValue
Definition: MooseTypes.h:668
The same as PJFNK except that matrix-vector multiplication is employed to replace residual evaluation...
Definition: MooseTypes.h:912
MortarType
Definition: MooseTypes.h:819
MooseArray< std::vector< OutputShape > > VariableTestValue
Definition: MooseTypes.h:330
VariableTestGradient ADVariableTestGradient
Definition: MooseTypes.h:659
OutputTools< RealVectorValue >::VariableValue VectorVariableValue
Definition: MooseTypes.h:360
libMesh::DenseVector< ADReal > ADDenseVector
Definition: MooseTypes.h:411
MaterialDataType
MaterialData types.
Definition: MooseTypes.h:740
MooseArray< std::vector< OutputShapeGradient > > VariableTestGradient
Definition: MooseTypes.h:331
OutputType OutputValue
Definition: MooseTypes.h:339
Definition: JsonIO.h:48
constexpr std::false_type always_false
This is a helper variable template for cases when we want to use a default compile-time error with co...
Definition: MooseTypes.h:635
MooseArray< ADRealVectorValue > ADVariableGradient
Definition: MooseTypes.h:413
typename OutputTools< T >::VariablePhiValue ADTemplateVariablePhiValue
Definition: MooseTypes.h:670
DenseMatrix< typename ADType< T >::type > type
Definition: MooseTypes.h:515
OutputTools< RealVectorValue >::VariableTestValue VectorVariableTestValue
Definition: MooseTypes.h:370
libMesh::StoredRange< std::vector< dof_id_type >::iterator, dof_id_type > NodeIdRange
Definition: MooseTypes.h:244
MooseArray< ADRealVectorValue > ADVectorVariableCurl
Definition: MooseTypes.h:418
typename OutputTools< typename Moose::ADType< T >::type >::VariableValue ADTemplateVariableValue
Definition: MooseTypes.h:648
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
OutputTools< RealEigenVector >::VariableCurl ArrayVariableCurl
Definition: MooseTypes.h:382
The base class for Kokkos residual objects.
Eigen::Matrix< ADReal, Eigen::Dynamic, Eigen::Dynamic > ADRealEigenMatrix
Definition: MooseTypes.h:152
ADTemplateVariablePhiGradient< Real > ADVariablePhiGradient
Definition: MooseTypes.h:683
The base class for Kokkos integrated boundary conditions.
Solving a linear problem.
Definition: MooseTypes.h:897
OutputTools< RealEigenVector >::VariableSecond ArrayVariableSecond
Definition: MooseTypes.h:381
OutputTools< Real >::VariablePhiValue VariablePhiValue
Definition: MooseTypes.h:348
OutputTools< RealVectorValue >::VariableCurl VectorVariableCurl
Definition: MooseTypes.h:363
use whatever SLPEC has by default
Definition: MooseTypes.h:927
OutputTools< RealVectorValue >::VariablePhiGradient VectorVariablePhiGradient
Definition: MooseTypes.h:366
MooseDerivativeStringClass(FileName)
This type is for expected (i.e.
target magnitude
Definition: MooseTypes.h:941
OutputTools< RealEigenVector >::VariablePhiSecond ArrayVariablePhiSecond
Definition: MooseTypes.h:387
The base class for a user to derive their own Kokkos functions.
We need to instantiate the following CompareTypes to tell the compiler that ADReal is a subtype of Ch...
Moose::GenericType< RealTensorValue, is_ad > GenericRealTensorValue
Definition: MooseTypes.h:699
The following methods are specializations for using the libMesh::Parallel::packed_range_* routines fo...
ElementType
Definition: MooseTypes.h:812
std::basic_ostream< charT, traits > * os
Definition: InfixIterator.h:33
DGResidualType
Definition: MooseTypes.h:792
libMesh::TensorValue< ADReal > ADRealTensorValue
Definition: MooseTypes.h:409
DualNumber< Real, DNDerivativeType, true > ADReal
Definition: ADRealForward.h:42
Moose::GenericType< DenseVector< Real >, is_ad > GenericDenseVector
Definition: MooseTypes.h:715
const TagName PREVIOUS_FP_SOLUTION_TAG
Definition: MooseTypes.C:29
Generalized Non-Hermitian with positive (semi-)definite B.
Definition: MooseTypes.h:926
MooseArray< OutputType > VariableValue
Definition: MooseTypes.h:313
MooseArray< libMesh::TypeNTensor< 3, ADReal > > ADVectorVariableSecond
Definition: MooseTypes.h:417
size_type _n
Definition: MooseTypes.h:1082
MffdType
Type of the matrix-free finite-differencing parameter.
Definition: MooseTypes.h:991
Moose::GenericType< RankFourTensor, is_ad > GenericRankFourTensor
Definition: MooseTypes.h:705
VectorVariableTestSecond ADVectorVariableTestSecond
Definition: MooseTypes.h:663
OutputTools< Real >::VariablePhiSecond VariablePhiSecond
Definition: MooseTypes.h:350
Power / Inverse / RQI.
Definition: MooseTypes.h:905
std::size_t size_type
Definition: MooseTypes.h:1064
typename std::conditional< is_ad, typename ADType< T >::type, T >::type GenericType
Definition: MooseTypes.h:689
Krylov-Schur.
Definition: MooseTypes.h:907
unsigned int PerfID
Definition: MooseTypes.h:240
AuxGroup
Flag for AuxKernel related execution type.
Definition: MooseTypes.h:752
RankThreeTensor is designed to handle any N-dimensional third order tensor, r.
Eigen::Matrix< Real, Eigen::Dynamic, Moose::dim *Moose::dim > type
Definition: MooseTypes.h:166
MooseArray< ADReal > ADVariableValue
Definition: MooseTypes.h:412
VariableTestSecond ADVariableTestSecond
Definition: MooseTypes.h:660
Eigen::Matrix< ADReal, Eigen::Dynamic, Moose::dim *Moose::dim > type
Definition: MooseTypes.h:184
MooseKSPNormType
Norm type for converge test.
Definition: MooseTypes.h:879
const SubdomainID INVALID_BLOCK_ID
Definition: MooseTypes.C:20
The base class for Kokkos nodal kernels.
libMesh::TensorTools::IncrementRank< OutputShapeGradient >::type OutputShapeSecond
Definition: MooseTypes.h:321
MooseArray< std::vector< OutputShape > > VariablePhiValue
Definition: MooseTypes.h:324
OutputTools< RealVectorValue >::VariablePhiDivergence VectorVariablePhiDivergence
Definition: MooseTypes.h:369
TensorValue< Real > RealTensorValue
uint8_t processor_id_type
The base class for Kokkos boundary conditions.
libMesh::TensorTools::IncrementRank< OutputType >::type OutputGradient
Definition: MooseTypes.h:309
libMesh::TensorTools::DecrementRank< OutputType >::type OutputDivergence
Definition: MooseTypes.h:311
std::remove_const< T >::type _MooseIndex(T, int)
Definition: MooseTypes.h:114
Use whatever we have in PETSc.
Definition: MooseTypes.h:873
Preconditioned Jacobian-free Newton Krylov.
Definition: MooseTypes.h:911
WhichEigenPairs
Which eigen pairs.
Definition: MooseTypes.h:933
int8_t boundary_id_type
OutputTools< RealEigenVector >::VariableTestDivergence ArrayVariableTestDivergence
Definition: MooseTypes.h:394
Replacement for std::span which we only get in c++20.
Definition: MooseTypes.h:1060
OutputTools< RealEigenVector >::VariableValue ArrayVariableValue
Definition: MooseTypes.h:377
OutputTools< RealVectorValue >::VariableTestDivergence VectorVariableTestDivergence
Definition: MooseTypes.h:374
MooseArray< ADRealTensorValue > ADVectorVariableGradient
Definition: MooseTypes.h:416
Real value(unsigned n, unsigned alpha, unsigned beta, Real x)
OutputTools< Real >::VariableCurl VariableCurl
Definition: MooseTypes.h:346
LineSearchType
Type of the line search.
Definition: MooseTypes.h:974
RESTARTABLE_FILTER
The filter type applied to a particular piece of "restartable" data.
Definition: MooseTypes.h:840
Moose::GenericType< VariableValue, is_ad > GenericVariableValue
Definition: MooseTypes.h:707
const TagName OLD_SOLUTION_TAG
Definition: MooseTypes.C:26
Use whatever we have in PETSc.
Definition: MooseTypes.h:885
Moose::GenericType< VariableGradient, is_ad > GenericVariableGradient
Definition: MooseTypes.h:711
std::function< void(const InputParameters &, InputParameters &)> RelationshipManagerInputParameterCallback
The type for the callback to set RelationshipManager parameters.
Definition: MooseTypes.h:1038
libMesh::VectorValue< ADReal > ADPoint
Definition: MooseTypes.h:408
const TagName SOLUTION_DOTDOT_TAG
Definition: MooseTypes.C:31
OutputTools< RealVectorValue >::VariablePhiSecond VectorVariablePhiSecond
Definition: MooseTypes.h:367
OutputTools< Real >::VariableTestValue VariableTestValue
Definition: MooseTypes.h:353
boundary_id_type BoundaryID
VarKindType
Framework-wide stuff.
Definition: MooseTypes.h:763
Jacobian-Free Newton Krylov.
Definition: MooseTypes.h:894
std::vector< std::vector< Eigen::Map< RealDIMValue > > > MappedArrayVariablePhiGradient
Definition: MooseTypes.h:386
Real PostprocessorValue
various MOOSE typedefs
Definition: MooseTypes.h:230
typename OutputTools< typename Moose::ADType< T >::type >::VariableTestGradient ADTemplateVariableTestGradient
Definition: MooseTypes.h:676
ADSymmetricRankFourTensor type
Definition: MooseTypes.h:476
OutputTools< Real >::VariableDivergence VariableDivergence
Definition: MooseTypes.h:347
NumberVectorValue Gradient
MooseArray< std::vector< OutputShape > > VariableTestCurl
Definition: MooseTypes.h:333
MooseArray< OutputSecond > VariableSecond
Definition: MooseTypes.h:315
unsigned int InterfaceID
Definition: MooseTypes.h:234
Moose::ShapeType< OutputType >::type OutputShape
Definition: MooseTypes.h:319
typename OutputTools< typename Moose::ADType< T >::type >::VariableGradient ADTemplateVariableGradient
Definition: MooseTypes.h:651
target imaginary
Definition: MooseTypes.h:943
The base class for Kokkos kernels.
OutputTools< Real >::VariablePhiCurl VariablePhiCurl
Definition: MooseTypes.h:351
constexpr reference operator[](size_type i) const noexcept
Definition: MooseTypes.h:1076
MooseArray< OutputGradient > VariableGradient
Definition: MooseTypes.h:314
Use finite differences to compute Jacobian.
Definition: MooseTypes.h:896
MooseArray< OutputType > VariableCurl
Definition: MooseTypes.h:316
Moose::GenericType< RealVectorValue, is_ad > GenericRealVectorValue
Definition: MooseTypes.h:697
Moose::GenericType< ChainedReal, is_ad > GenericChainedReal
Definition: MooseTypes.h:695
Eigen::Matrix< Real, Eigen::Dynamic, Eigen::Dynamic > RealEigenMatrix
Definition: MooseTypes.h:151
OutputTools< ADRealEigenVector >::VariableValue ADArrayVariableValue
Definition: MooseTypes.h:378
constexpr pointer data() const noexcept
Definition: MooseTypes.h:1071
Moose::GenericType< RealEigenMatrix, is_ad > GenericRealEigenMatrix
Definition: MooseTypes.h:721
std::string stringify(const T &t)
conversion to string
Definition: Conversion.h:64
Nonlinear inverse power.
Definition: MooseTypes.h:909
The base class for Kokkos nodal boundary conditions.
OutputTools< Real >::VariablePhiDivergence VariablePhiDivergence
Definition: MooseTypes.h:352
VectorTagType
Definition: MooseTypes.h:1027
constexpr bool empty() const noexcept
Definition: MooseTypes.h:1073
ComputeType
The type of nonlinear computation being performed.
Definition: MooseTypes.h:829
Jacobi-Davidson.
Definition: MooseTypes.h:908
const processor_id_type INVALID_PROCESSOR_ID
Definition: MooseTypes.C:18
Eigen::Matrix< Real, Eigen::Dynamic, Moose::dim > RealVectorArrayValue
Definition: MooseTypes.h:149
OutputTools< Real >::VariableValue VariableValue
Definition: MooseTypes.h:343
DGJacobianType
Definition: MooseTypes.h:798
ConstraintSideType
Definition: MooseTypes.h:786
std::vector< Real > VectorPostprocessorValue
Definition: MooseTypes.h:231
Real ScatterVectorPostprocessorValue
Definition: MooseTypes.h:232
OutputTools< Real >::VariablePhiGradient VariablePhiGradient
Definition: MooseTypes.h:349
std::list< adT, std::allocator< adT > > type
Definition: MooseTypes.h:496
constexpr Span(T *ptr, size_type n) noexcept
Definition: MooseTypes.h:1068
MooseArray< std::vector< OutputShapeSecond > > VariablePhiSecond
Definition: MooseTypes.h:326
Struct that all MOOSE derivative strings derive from.
Definition: MooseTypes.h:1046
MooseArray< std::vector< OutputShape > > VariablePhiCurl
Definition: MooseTypes.h:327
const SubdomainID ANY_BLOCK_ID
Definition: MooseTypes.C:19
forward declarations
The base class for a user to derive their own Kokkos materials.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const std::set< SubdomainID > EMPTY_BLOCK_IDS
Definition: MooseTypes.h:732
OutputTools< Real >::VariableTestSecond VariableTestSecond
Definition: MooseTypes.h:355
OutputTools< RealVectorValue >::VariableTestGradient VectorVariableTestGradient
Definition: MooseTypes.h:371
OutputTools< RealVectorValue >::VariablePhiValue VectorVariablePhiValue
Definition: MooseTypes.h:365
GeometryType
Definition: MooseTypes.h:277
OutputTools< RealEigenVector >::VariableTestSecond ArrayVariableTestSecond
Definition: MooseTypes.h:392
CoordinateSystemType
Definition: MooseTypes.h:858
smallest imaginary
Definition: MooseTypes.h:940
std::string RestartableDataMapName
Definition: MooseTypes.h:242
VectorVariableTestValue ADVectorVariableTestValue
Definition: MooseTypes.h:661
const std::set< BoundaryID > EMPTY_BOUNDARY_IDS
Definition: MooseTypes.h:733
const TagID INVALID_TAG_ID
Definition: MooseTypes.C:23
std::vector< VariableName > CoupledName
additional MOOSE typedefs
Definition: MooseTypes.h:1292
RMSystemType
Definition: MooseTypes.h:1020
OutputTools< RealVectorValue >::VariableTestSecond VectorVariableTestSecond
Definition: MooseTypes.h:372
SolutionState
Definition: MooseTypes.h:261
Jacobian-free Newton Krylov.
Definition: MooseTypes.h:913
means not set
Definition: MooseTypes.h:993
PatchUpdateType
Type of patch update strategy for modeling node-face constraints or contact.
Definition: MooseTypes.h:1001
MooseArray< std::vector< OutputShapeSecond > > VariableTestSecond
Definition: MooseTypes.h:332
ConstraintJacobianType
Definition: MooseTypes.h:845
OutputTools< RealEigenVector >::VariablePhiDivergence ArrayVariablePhiDivergence
Definition: MooseTypes.h:389
SymmetricRankFourTensorTempl is designed to handle an N-dimensional fourth order tensor with minor sy...
largest imaginary
Definition: MooseTypes.h:939
libMesh::TensorTools::DecrementRank< OutputShape >::type OutputShapeDivergence
Definition: MooseTypes.h:322
OutputTools< RealEigenVector >::VariablePhiCurl ArrayVariablePhiCurl
Definition: MooseTypes.h:388
Non-Hermitian.
Definition: MooseTypes.h:922
CouplingType
Definition: MooseTypes.h:779
OutputTools< RealEigenVector >::VariablePhiGradient ArrayVariablePhiGradient
Definition: MooseTypes.h:385
TimeIntegratorType
Time integrators.
Definition: MooseTypes.h:951
MooseArray< ADRealTensorValue > ADVariableSecond
Definition: MooseTypes.h:414
PCSideType
Preconditioning side.
Definition: MooseTypes.h:868
ADRealVectorValue ADRealGradient
Definition: MooseTypes.h:407
VectorVariableTestGradient ADVectorVariableTestGradient
Definition: MooseTypes.h:662
Moose::DOFType< OutputType >::type OutputData
Definition: MooseTypes.h:337
VariableTestValue ADVariableTestValue
Definition: MooseTypes.h:658
all eigenvalues
Definition: MooseTypes.h:944
Moose::GenericType< RankThreeTensor, is_ad > GenericRankThreeTensor
Definition: MooseTypes.h:703
Moose::GenericType< VariableSecond, is_ad > GenericVariableSecond
Definition: MooseTypes.h:713
const TagName SOLUTION_TAG
Definition: MooseTypes.C:25
OutputTools< Real >::VariableSecond VariableSecond
Definition: MooseTypes.h:345
Eigen::Matrix< Real, Eigen::Dynamic, 1 > RealEigenVector
Definition: MooseTypes.h:147
Preconditioned Jacobian-Free Newton Krylov.
Definition: MooseTypes.h:893
Eigen::Matrix< Real, Moose::dim, 1 > RealDIMValue
Definition: MooseTypes.h:146
MOOSE now contains C++17 code, so give a reasonable error message stating what the user can do to add...
OutputTools< RealVectorValue >::VariablePhiCurl VectorVariablePhiCurl
Definition: MooseTypes.h:368
MooseArray< OutputDivergence > VariableDivergence
Definition: MooseTypes.h:317
use whatever we have in SLEPC
Definition: MooseTypes.h:945
OutputTools< RealVectorValue >::VariableGradient VectorVariableGradient
Definition: MooseTypes.h:361
means not set
Definition: MooseTypes.h:976
libMesh::StoredRange< std::vector< const Elem * >::iterator, const Elem * > ConstElemPointerRange
Definition: MooseTypes.h:246
largest magnitude
Definition: MooseTypes.h:935
Eigen::Matrix< Real, Eigen::Dynamic, Moose::dim *Moose::dim > RealTensorArrayValue
Definition: MooseTypes.h:150
std::vector< adT, std::allocator< adT > > type
Definition: MooseTypes.h:489
OutputTools< Real >::VariableTestCurl VariableTestCurl
Definition: MooseTypes.h:356
OutputTools< RealEigenVector >::VariableTestValue ArrayVariableTestValue
Definition: MooseTypes.h:390
SolveType
Type of the solve.
Definition: MooseTypes.h:891
constexpr pointer begin() const noexcept
Definition: MooseTypes.h:1077
OutputTools< Real >::VariableTestGradient VariableTestGradient
Definition: MooseTypes.h:354
W< typename ADType< T >::type > type
Definition: MooseTypes.h:482
OutputTools< RealEigenVector >::VariableGradient ArrayVariableGradient
Definition: MooseTypes.h:379
const TagName PREVIOUS_NL_SOLUTION_TAG
Definition: MooseTypes.C:28
auto makeSpan(C &container, std::size_t offset, std::size_t n)
Helper function for creating a span from a given container.
Definition: MooseTypes.h:1090
static constexpr bool value
Definition: MooseTypes.h:602
unsigned int MooseObjectID
Definition: MooseTypes.h:236
libMesh::VectorValue< ADReal > ADRealVectorValue
AD Array typedefs.
Definition: MooseTypes.h:406
MooseArray< ADRealVectorValue > ADVectorVariableValue
Definition: MooseTypes.h:415
The base class for Kokkos materials.
OutputTools< RealEigenVector >::VariableTestGradient ArrayVariableTestGradient
Definition: MooseTypes.h:391
libMesh::TensorTools::IncrementRank< OutputShape >::type OutputShapeGradient
Definition: MooseTypes.h:320
EigenProblemType
Type of the eigen problem.
Definition: MooseTypes.h:919
ADSymmetricRankTwoTensor type
Definition: MooseTypes.h:471
Moose::GenericType< DenseMatrix< Real >, is_ad > GenericDenseMatrix
Definition: MooseTypes.h:717
void ErrorVector unsigned int
Generalized Hermitian.
Definition: MooseTypes.h:923
OutputTools< RealEigenVector >::VariableTestCurl ArrayVariableTestCurl
Definition: MooseTypes.h:393
SolutionIterationType
Definition: MooseTypes.h:269
MooseArray< OutputData > DofValue
Definition: MooseTypes.h:338
const BoundaryID ANY_BOUNDARY_ID
Definition: MooseTypes.C:21
unsigned int THREAD_ID
Definition: MooseTypes.h:237
boundary_id_type BoundaryID
Definition: MooseTypes.h:233
Moose::GenericType< RankTwoTensor, is_ad > GenericRankTwoTensor
Definition: MooseTypes.h:701
uint8_t dof_id_type
DualNumber< ADReal, ADReal > ChainedADReal
Definition: ChainedADReal.h:15
Moose::GenericType< RealEigenVector, is_ad > GenericRealEigenVector
Definition: MooseTypes.h:719
const TagName SOLUTION_DOT_TAG
Definition: MooseTypes.C:30