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" 38 #include "boost/bitmask_operators.h" 40 #include "libmesh/ignore_warnings.h" 42 #include "libmesh/restore_warnings.h" 43 #include "libmesh/tensor_tools.h" 45 #include "metaphysicl/ct_types.h" 50 #include <type_traits> 53 #if !defined(INCLUDE_NLOHMANN_JSON_HPP_) && !defined(MOOSE_NLOHMANN_INCLUDED) 54 #undef INCLUDE_NLOHMANN_JSON_FWD_HPP_ 55 #include "nlohmann/json_fwd.h" 56 #define MOOSE_NLOHMANN_INCLUDED 60 #define MooseSharedPointer std::shared_ptr 61 #define MooseSharedNamespace std 72 #pragma clang diagnostic push 73 #pragma clang diagnostic ignored "-Wgnu-zero-variadic-macro-arguments" 76 #define beginIndex_0() ERROR-- > "beginIndex() requires one or two arguments" 77 #define beginIndex_1(A) decltype(A.size())(0) 78 #define beginIndex_2(A, B) decltype(A.size())(B) 79 #define beginIndex_3(A, B, C) ERROR-- > "beginIndex() requires one or two arguments" 80 #define beginIndex_4(A, B, C, D) ERROR-- > "beginIndex() requires one or two arguments" 83 #define beginIndex_X(x, A, B, C, D, FUNC, ...) FUNC 86 #define beginIndex(...) \ 89 beginIndex_4(__VA_ARGS__), \ 90 beginIndex_3(__VA_ARGS__), \ 91 beginIndex_2(__VA_ARGS__), \ 92 beginIndex_1(__VA_ARGS__), \ 93 beginIndex_0(__VA_ARGS__)) 108 #define MooseIndex(type) decltype(_MooseIndex(type, 0)) 111 template <typename T, typename std::enable_if<std::is_integral<T>::value>::type * =
nullptr>
112 typename std::remove_const<T>::type
117 template <
typename T>
118 decltype(std::declval<T>().size())
123 template <
typename T>
124 decltype(
"NOTE: MooseIndex only works with integers and objects with size()!")
128 #pragma clang diagnostic pop 157 typedef Eigen::Matrix<Real, Eigen::Dynamic, Moose::dim>
type;
163 typedef Eigen::Matrix<Real, Eigen::Dynamic, Moose::dim * Moose::dim>
type;
169 typedef Eigen::Matrix<Real, Eigen::Dynamic, 1>
type;
192 template <
typename U>
254 template <
typename OutputType>
265 template <
typename OutputType>
277 template <
typename OutputType>
386 template <
typename T>
441 template <
template <
typename T>
class W,
typename T>
444 typedef W<typename ADType<T>::type>
type;
447 template <
typename T>
451 typedef std::vector<adT, std::allocator<adT>>
type;
454 template <
typename T>
458 typedef std::list<adT, std::allocator<adT>>
type;
461 template <
typename T>
462 struct ADType<
std::set<T, std::less<T>, std::allocator<T>>>
465 typedef std::set<adT, std::less<adT>, std::allocator<adT>>
type;
468 template <
typename T>
474 template <
typename T>
554 template <
typename T>
557 static constexpr
bool value =
false;
572 template <
template <
typename T,
typename... Args>
class W, typename T, typename... Args>
578 template <
typename T,
typename... Args>
589 template <
class... Ts>
601 template <
typename T>
604 template <
typename T>
607 template <
typename T>
610 template <
typename T>
622 template <
typename T>
624 template <
typename T>
629 template <
typename T>
632 template <
typename T>
635 template <
typename T>
643 template <
typename T,
bool is_ad>
644 using GenericType =
typename std::conditional<is_ad, typename ADType<T>::type, T>::type;
647 template <
bool is_ad>
649 template <
bool is_ad>
651 template <
bool is_ad>
653 template <
bool is_ad>
655 template <
bool is_ad>
657 template <
bool is_ad>
659 template <
bool is_ad>
661 template <
bool is_ad>
663 template <
bool is_ad>
665 template <
bool is_ad>
667 template <
bool is_ad>
669 template <
bool is_ad>
671 template <
bool is_ad>
988 typedef std::function<void(const InputParameters &, InputParameters &)>
1011 static const bool enable =
true;
1022 #define DerivativeStringClass(TheName) \ 1023 class TheName : public std::string \ 1026 TheName() : std::string() {} \ 1027 TheName(const std::string & str) : std::string(str) {} \ 1028 TheName(const std::string & str, size_t pos, size_t n = npos) : std::string(str, pos, n) {} \ 1029 TheName(const char * s, size_t n) : std::string(s, n) {} \ 1030 TheName(const char * s) : std::string(s) {} \ 1031 TheName(size_t n, char c) : std::string(n, c) {} \ 1033 namespace nlohmann \ 1036 struct adl_serializer<TheName> \ 1038 static void to_json(json & j, const TheName & v); \ 1041 static_assert(true, "") 1178 #ifdef MOOSE_MFEM_ENABLED 1202 #ifdef MOOSE_MFEM_ENABLED 1210 #define usingTensorIndices(...) \
ConstraintFormulationType
Type of constraint formulation.
typename OutputTools< typename Moose::ADType< T >::type >::VariableSecond ADTemplateVariableSecond
OutputTools< Real >::VariableGradient VariableGradient
RankFourTensorTempl is designed to handle any N-dimensional fourth order tensor, C.
Generalized Non-Hermitian.
OutputTools< RealVectorValue >::VariableDivergence VectorVariableDivergence
RealVectorValue RealGradient
Moose::GenericType< Real, is_ad > GenericReal
typename OutputTools< typename Moose::ADType< T >::type >::VariableCurl ADTemplateVariableCurl
Moose::GenericType< VectorVariableValue, is_ad > GenericVectorVariableValue
Generalized Hermitian indefinite.
OutputTools< RealVectorValue >::VariableSecond VectorVariableSecond
Newton-based eigensolver with an assembled Jacobian matrix (fully coupled by default) ...
OutputTools< RealEigenVector >::VariableDivergence ArrayVariableDivergence
typename OutputTools< typename Moose::ADType< T >::type >::VariablePhiGradient ADTemplateVariablePhiGradient
libMesh::DenseMatrix< ADReal > ADDenseMatrix
const TagTypeID INVALID_TAG_TYPE_ID
EigenSolveType
Type of the eigen solve.
RelationshipManagerType
Main types of Relationship Managers.
void print_helper(std::ostream &os, const P *param)
OutputTools< Real >::VariableTestDivergence VariableTestDivergence
std::set< adT, std::less< adT >, std::allocator< adT > > type
unsigned int InvalidSolutionID
VectorValue< Real > RealVectorValue
subdomain_id_type SubdomainID
typename OutputTools< typename Moose::ADType< T >::type >::VariableTestSecond ADTemplateVariableTestSecond
OutputTools< RealVectorValue >::VariableTestCurl VectorVariableTestCurl
const BoundaryID INVALID_BOUNDARY_ID
const TagName OLDER_SOLUTION_TAG
DenseVector< typename ADType< T >::type > type
OutputTools< RealEigenVector >::VariablePhiValue ArrayVariablePhiValue
constexpr std::size_t constMaxQpsPerElem
This is used for places where we initialize some qp-sized data structures that would end up being siz...
DualNumber< Real, Real > ChainedReal
typename OutputTools< T >::VariableTestValue ADTemplateVariableTestValue
The same as PJFNK except that matrix-vector multiplication is employed to replace residual evaluation...
VariableTestGradient ADVariableTestGradient
OutputTools< RealVectorValue >::VariableValue VectorVariableValue
libMesh::DenseVector< ADReal > ADDenseVector
MaterialDataType
MaterialData types.
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...
MooseArray< ADRealVectorValue > ADVariableGradient
typename OutputTools< T >::VariablePhiValue ADTemplateVariablePhiValue
DenseMatrix< typename ADType< T >::type > type
OutputTools< RealVectorValue >::VariableTestValue VectorVariableTestValue
libMesh::StoredRange< std::vector< dof_id_type >::iterator, dof_id_type > NodeIdRange
MooseArray< ADRealVectorValue > ADVectorVariableCurl
typename OutputTools< typename Moose::ADType< T >::type >::VariableValue ADTemplateVariableValue
OutputTools< RealEigenVector >::VariableCurl ArrayVariableCurl
ADTemplateVariablePhiGradient< Real > ADVariablePhiGradient
Solving a linear problem.
OutputTools< RealEigenVector >::VariableSecond ArrayVariableSecond
OutputTools< Real >::VariablePhiValue VariablePhiValue
OutputTools< RealVectorValue >::VariableCurl VectorVariableCurl
use whatever SLPEC has by default
OutputTools< RealVectorValue >::VariablePhiGradient VectorVariablePhiGradient
ADSymmetricRankTwoTensor type
OutputTools< RealEigenVector >::VariablePhiSecond ArrayVariablePhiSecond
Moose::GenericType< RealTensorValue, is_ad > GenericRealTensorValue
The following methods are specializations for using the libMesh::Parallel::packed_range_* routines fo...
std::basic_ostream< charT, traits > * os
libMesh::TensorValue< ADReal > ADRealTensorValue
DualNumber< Real, DNDerivativeType, true > ADReal
Moose::GenericType< DenseVector< Real >, is_ad > GenericDenseVector
Generalized Non-Hermitian with positive (semi-)definite B.
MooseArray< libMesh::TypeNTensor< 3, ADReal > > ADVectorVariableSecond
MffdType
Type of the matrix-free finite-differencing parameter.
Moose::GenericType< RankFourTensor, is_ad > GenericRankFourTensor
VectorVariableTestSecond ADVectorVariableTestSecond
OutputTools< Real >::VariablePhiSecond VariablePhiSecond
typename std::conditional< is_ad, typename ADType< T >::type, T >::type GenericType
AuxGroup
Flag for AuxKernel related execution type.
RankThreeTensor is designed to handle any N-dimensional third order tensor, r.
MooseArray< ADReal > ADVariableValue
VariableTestSecond ADVariableTestSecond
MooseKSPNormType
Norm type for converge test.
const SubdomainID INVALID_BLOCK_ID
OutputTools< RealVectorValue >::VariablePhiDivergence VectorVariablePhiDivergence
ADSymmetricRankFourTensor type
TensorValue< Real > RealTensorValue
uint8_t processor_id_type
std::remove_const< T >::type _MooseIndex(T, int)
Use whatever we have in PETSc.
Preconditioned Jacobian-free Newton Krylov.
WhichEigenPairs
Which eigen pairs.
OutputTools< RealEigenVector >::VariableTestDivergence ArrayVariableTestDivergence
OutputTools< RealEigenVector >::VariableValue ArrayVariableValue
OutputTools< RealVectorValue >::VariableTestDivergence VectorVariableTestDivergence
MooseArray< ADRealTensorValue > ADVectorVariableGradient
Real value(unsigned n, unsigned alpha, unsigned beta, Real x)
OutputTools< Real >::VariableCurl VariableCurl
LineSearchType
Type of the line search.
RESTARTABLE_FILTER
The filter type applied to a particular piece of "restartable" data.
Moose::GenericType< VariableValue, is_ad > GenericVariableValue
const TagName OLD_SOLUTION_TAG
Use whatever we have in PETSc.
Moose::GenericType< VariableGradient, is_ad > GenericVariableGradient
std::function< void(const InputParameters &, InputParameters &)> RelationshipManagerInputParameterCallback
The type for the callback to set RelationshipManager parameters.
libMesh::VectorValue< ADReal > ADPoint
OutputTools< RealVectorValue >::VariablePhiSecond VectorVariablePhiSecond
OutputTools< Real >::VariableTestValue VariableTestValue
boundary_id_type BoundaryID
VarKindType
Framework-wide stuff.
Jacobian-Free Newton Krylov.
std::vector< std::vector< Eigen::Map< RealDIMValue > > > MappedArrayVariablePhiGradient
Real PostprocessorValue
various MOOSE typedefs
typename OutputTools< typename Moose::ADType< T >::type >::VariableTestGradient ADTemplateVariableTestGradient
ADSymmetricRankFourTensor type
OutputTools< Real >::VariableDivergence VariableDivergence
NumberVectorValue Gradient
typename OutputTools< typename Moose::ADType< T >::type >::VariableGradient ADTemplateVariableGradient
OutputTools< Real >::VariablePhiCurl VariablePhiCurl
Use finite differences to compute Jacobian.
Moose::GenericType< RealVectorValue, is_ad > GenericRealVectorValue
Moose::GenericType< ChainedReal, is_ad > GenericChainedReal
Eigen::Matrix< Real, Eigen::Dynamic, Eigen::Dynamic > RealEigenMatrix
std::string stringify(const T &t)
conversion to string
OutputTools< Real >::VariablePhiDivergence VariablePhiDivergence
ComputeType
The type of nonlinear computation being performed.
const processor_id_type INVALID_PROCESSOR_ID
Eigen::Matrix< Real, Eigen::Dynamic, Moose::dim > RealVectorArrayValue
OutputTools< Real >::VariableValue VariableValue
std::vector< Real > VectorPostprocessorValue
Real ScatterVectorPostprocessorValue
OutputTools< Real >::VariablePhiGradient VariablePhiGradient
std::list< adT, std::allocator< adT > > type
const SubdomainID ANY_BLOCK_ID
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const std::set< SubdomainID > EMPTY_BLOCK_IDS
OutputTools< Real >::VariableTestSecond VariableTestSecond
OutputTools< RealVectorValue >::VariableTestGradient VectorVariableTestGradient
OutputTools< RealVectorValue >::VariablePhiValue VectorVariablePhiValue
OutputTools< RealEigenVector >::VariableTestSecond ArrayVariableTestSecond
std::string RestartableDataMapName
VectorVariableTestValue ADVectorVariableTestValue
const std::set< BoundaryID > EMPTY_BOUNDARY_IDS
const TagID INVALID_TAG_ID
std::vector< VariableName > CoupledName
additional MOOSE typedefs
OutputTools< RealVectorValue >::VariableTestSecond VectorVariableTestSecond
Jacobian-free Newton Krylov.
PatchUpdateType
Type of patch update strategy for modeling node-face constraints or contact.
OutputTools< RealEigenVector >::VariablePhiDivergence ArrayVariablePhiDivergence
SymmetricRankFourTensorTempl is designed to handle an N-dimensional fourth order tensor with minor sy...
OutputTools< RealEigenVector >::VariablePhiCurl ArrayVariablePhiCurl
OutputTools< RealEigenVector >::VariablePhiGradient ArrayVariablePhiGradient
TimeIntegratorType
Time integrators.
MooseArray< ADRealTensorValue > ADVariableSecond
DerivativeStringClass(FileName)
This type is for expected (i.e.
PCSideType
Preconditioning side.
ADRealVectorValue ADRealGradient
VectorVariableTestGradient ADVectorVariableTestGradient
VariableTestValue ADVariableTestValue
Moose::GenericType< RankThreeTensor, is_ad > GenericRankThreeTensor
Moose::GenericType< VariableSecond, is_ad > GenericVariableSecond
const TagName SOLUTION_TAG
OutputTools< Real >::VariableSecond VariableSecond
Eigen::Matrix< Real, Eigen::Dynamic, 1 > RealEigenVector
Preconditioned Jacobian-Free Newton Krylov.
Eigen::Matrix< Real, Moose::dim, 1 > RealDIMValue
MOOSE now contains C++17 code, so give a reasonable error message stating what the user can do to add...
OutputTools< RealVectorValue >::VariablePhiCurl VectorVariablePhiCurl
use whatever we have in SLEPC
OutputTools< RealVectorValue >::VariableGradient VectorVariableGradient
libMesh::StoredRange< std::vector< const Elem * >::iterator, const Elem * > ConstElemPointerRange
Eigen::Matrix< Real, Eigen::Dynamic, Moose::dim *Moose::dim > RealTensorArrayValue
std::vector< adT, std::allocator< adT > > type
OutputTools< Real >::VariableTestCurl VariableTestCurl
OutputTools< RealEigenVector >::VariableTestValue ArrayVariableTestValue
SolveType
Type of the solve.
OutputTools< Real >::VariableTestGradient VariableTestGradient
W< typename ADType< T >::type > type
OutputTools< RealEigenVector >::VariableGradient ArrayVariableGradient
const TagName PREVIOUS_NL_SOLUTION_TAG
static constexpr bool value
unsigned int MooseObjectID
libMesh::VectorValue< ADReal > ADRealVectorValue
AD typedefs.
MooseArray< ADRealVectorValue > ADVectorVariableValue
OutputTools< RealEigenVector >::VariableTestGradient ArrayVariableTestGradient
EigenProblemType
Type of the eigen problem.
ADSymmetricRankTwoTensor type
Moose::GenericType< DenseMatrix< Real >, is_ad > GenericDenseMatrix
void ErrorVector unsigned int
OutputTools< RealEigenVector >::VariableTestCurl ArrayVariableTestCurl
const BoundaryID ANY_BOUNDARY_ID
boundary_id_type BoundaryID
Moose::GenericType< RankTwoTensor, is_ad > GenericRankTwoTensor
DualNumber< ADReal, ADReal > ChainedADReal