22 #include "libmesh/libmesh.h" 23 #include "libmesh/id_types.h" 24 #include "libmesh/stored_range.h" 25 #include "libmesh/petsc_macro.h" 26 #include "libmesh/boundary_info.h" 27 #include "libmesh/parameters.h" 28 #include "libmesh/dense_vector.h" 29 #include "libmesh/int_range.h" 32 #include "boost/bitmask_operators.h" 34 #include "libmesh/ignore_warnings.h" 36 #include "libmesh/restore_warnings.h" 37 #include "libmesh/tensor_tools.h" 39 #include "metaphysicl/ct_types.h" 44 #include <type_traits> 47 #include "nlohmann/json_fwd.h" 50 #define MooseSharedPointer std::shared_ptr 51 #define MooseSharedNamespace std 62 #pragma clang diagnostic push 63 #pragma clang diagnostic ignored "-Wgnu-zero-variadic-macro-arguments" 66 #define beginIndex_0() ERROR-- > "beginIndex() requires one or two arguments" 67 #define beginIndex_1(A) decltype(A.size())(0) 68 #define beginIndex_2(A, B) decltype(A.size())(B) 69 #define beginIndex_3(A, B, C) ERROR-- > "beginIndex() requires one or two arguments" 70 #define beginIndex_4(A, B, C, D) ERROR-- > "beginIndex() requires one or two arguments" 73 #define beginIndex_X(x, A, B, C, D, FUNC, ...) FUNC 76 #define beginIndex(...) \ 79 beginIndex_4(__VA_ARGS__), \ 80 beginIndex_3(__VA_ARGS__), \ 81 beginIndex_2(__VA_ARGS__), \ 82 beginIndex_1(__VA_ARGS__), \ 83 beginIndex_0(__VA_ARGS__)) 98 #define MooseIndex(type) decltype(_MooseIndex(type, 0)) 101 template <typename T, typename std::enable_if<std::is_integral<T>::value>::type * =
nullptr>
102 typename std::remove_const<T>::type
107 template <
typename T>
108 decltype(std::declval<T>().size())
113 template <
typename T>
114 decltype(
"NOTE: MooseIndex only works with integers and objects with size()!")
118 #pragma clang diagnostic pop 149 template <
unsigned int,
typename>
157 namespace TensorTools
162 typedef Eigen::Matrix<Real, Eigen::Dynamic, Moose::dim>
type;
168 typedef Eigen::Matrix<Real, Eigen::Dynamic, Moose::dim * Moose::dim>
type;
174 typedef Eigen::Matrix<Real, Eigen::Dynamic, 1>
type;
181 template <
typename U>
242 template <
typename OutputType>
253 template <
typename OutputType>
265 template <
typename OutputType>
269 typedef typename TensorTools::IncrementRank<OutputGradient>::type
OutputSecond;
373 template <
typename T>
412 template <
template <
typename>
class W>
475 template <
template <
typename>
class W>
514 template <
typename T>
517 template <
typename T>
520 template <
typename T>
533 template <
typename T>
535 template <
typename T>
540 template <
typename T>
543 template <
typename T>
546 template <
typename T>
554 template <
typename T,
bool is_ad>
555 using GenericType =
typename std::conditional<is_ad, typename ADType<T>::type, T>::type;
558 template <
bool is_ad>
560 template <
bool is_ad>
562 template <
bool is_ad>
564 template <
bool is_ad>
566 template <
bool is_ad>
568 template <
bool is_ad>
570 template <
bool is_ad>
572 template <
bool is_ad>
574 template <
bool is_ad>
576 template <
bool is_ad>
578 template <
bool is_ad>
580 typename std::conditional<is_ad, DenseVector<ADReal>, DenseVector<Real>>::type;
581 template <
bool is_ad>
901 typedef std::function<void(const InputParameters &, InputParameters &)>
924 static const bool enable =
true;
935 #define DerivativeStringClass(TheName) \ 936 class TheName : public std::string \ 939 TheName() : std::string() {} \ 940 TheName(const std::string & str) : std::string(str) {} \ 941 TheName(const std::string & str, size_t pos, size_t n = npos) : std::string(str, pos, n) {} \ 942 TheName(const char * s, size_t n) : std::string(s, n) {} \ 943 TheName(const char * s) : std::string(s) {} \ 944 TheName(size_t n, char c) : std::string(n, c) {} \ 949 struct adl_serializer<TheName> \ 951 static void to_json(json & j, const TheName & v); \ 954 static_assert(true, "") 1076 #define usingTensorIndices(...) \ ADRealVectorValue ADRealGradient
ConstraintFormulationType
Type of constraint formulation.
typename OutputTools< typename Moose::ADType< T >::type >::VariableSecond ADTemplateVariableSecond
OutputTools< Real >::VariableGradient VariableGradient
typename std::conditional< is_ad, DenseMatrix< ADReal >, DenseMatrix< Real > >::type GenericDenseMatrix
RankFourTensorTempl is designed to handle any N-dimensional fourth order tensor, C.
Generalized Non-Hermitian.
OutputTools< RealVectorValue >::VariableDivergence VectorVariableDivergence
libMesh::VectorValue< ADReal > ADRealVectorValue
AD typedefs.
typename Moose::GenericType< RankFourTensor, is_ad > GenericRankFourTensor
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.
typename Moose::GenericType< VariableValue, is_ad > GenericVariableValue
void print_helper(std::ostream &os, const P *param)
typename Moose::GenericType< VariableSecond, is_ad > GenericVariableSecond
OutputTools< Real >::VariableTestDivergence VariableTestDivergence
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
StoredRange< std::vector< dof_id_type >::iterator, dof_id_type > NodeIdRange
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...
TestClass subdomain_id_type
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
const SubdomainID BOUNDARY_SIDE_LOWERD_ID
typename OutputTools< T >::VariablePhiValue ADTemplateVariablePhiValue
OutputTools< RealVectorValue >::VariableTestValue VectorVariableTestValue
typename OutputTools< typename Moose::ADType< T >::type >::VariableValue ADTemplateVariableValue
MooseArray< libMesh::TypeNTensor< 3, DualReal > > ADVectorVariableSecond
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
The following methods are specializations for using the libMesh::Parallel::packed_range_* routines fo...
std::basic_ostream< charT, traits > * os
Generalized Non-Hermitian with positive (semi-)definite B.
MffdType
Type of the matrix-free finite-differencing parameter.
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
StoredRange< std::vector< const Elem * >::iterator, const Elem * > ConstElemPointerRange
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
OutputTools< Real >::VariableCurl VariableCurl
LineSearchType
Type of the line search.
RESTARTABLE_FILTER
The filter type applied to a particular piece of "restartable" data.
const TagName OLD_SOLUTION_TAG
Use whatever we have in PETSc.
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
SymmetricRankTwoTensorTempl is designed to handle the Stress or Strain Tensor for an anisotropic mate...
Real PostprocessorValue
various MOOSE typedefs
typename OutputTools< typename Moose::ADType< T >::type >::VariableTestGradient ADTemplateVariableTestGradient
ADSymmetricRankFourTensor type
OutputTools< Real >::VariableDivergence VariableDivergence
typename OutputTools< typename Moose::ADType< T >::type >::VariableGradient ADTemplateVariableGradient
OutputTools< Real >::VariablePhiCurl VariablePhiCurl
Use finite differences to compute Jacobian.
subdomain_id_type SubdomainID
typename Moose::GenericType< ChainedReal, is_ad > GenericChainedReal
Eigen::Matrix< Real, Eigen::Dynamic, Eigen::Dynamic > RealEigenMatrix
ADRealGradient DualRealGradient
std::string stringify(const T &t)
conversion to string
libMesh::TensorValue< ADReal > ADRealTensorValue
OutputTools< Real >::VariablePhiDivergence VariablePhiDivergence
typename Moose::GenericType< RealTensorValue, is_ad > GenericRealTensorValue
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
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
const SubdomainID INTERNAL_SIDE_LOWERD_ID
typename std::conditional< is_ad, DenseVector< ADReal >, DenseVector< Real > >::type GenericDenseVector
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.
ADRealTensorValue DualRealTensorValue
VectorVariableTestGradient ADVectorVariableTestGradient
typename Moose::GenericType< RankTwoTensor, is_ad > GenericRankTwoTensor
VariableTestValue ADVariableTestValue
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
typename Moose::GenericType< Real, is_ad > GenericReal
Eigen::Matrix< Real, Eigen::Dynamic, Moose::dim *Moose::dim > RealTensorArrayValue
OutputTools< Real >::VariableTestCurl VariableTestCurl
OutputTools< RealEigenVector >::VariableTestValue ArrayVariableTestValue
SolveType
Type of the solve.
OutputTools< Real >::VariableTestGradient VariableTestGradient
OutputTools< RealEigenVector >::VariableGradient ArrayVariableGradient
const TagName PREVIOUS_NL_SOLUTION_TAG
typename Moose::GenericType< VariableGradient, is_ad > GenericVariableGradient
unsigned int MooseObjectID
MooseArray< ADRealVectorValue > ADVectorVariableValue
typename Moose::GenericType< RealVectorValue, is_ad > GenericRealVectorValue
OutputTools< RealEigenVector >::VariableTestGradient ArrayVariableTestGradient
ADRealVectorValue DualRealVectorValue
some AD typedefs for backwards compatability
EigenProblemType
Type of the eigen problem.
ADSymmetricRankTwoTensor type
void ErrorVector unsigned int
OutputTools< RealEigenVector >::VariableTestCurl ArrayVariableTestCurl
typename Moose::GenericType< RankThreeTensor, is_ad > GenericRankThreeTensor
const BoundaryID ANY_BOUNDARY_ID
boundary_id_type BoundaryID
DualNumber< ADReal, ADReal > ChainedADReal