16#include <dune/functions/functionspacebases/basistags.hh>
17#include <dune/functions/functionspacebases/lagrangebasis.hh>
19#include <Eigen/Sparse>
24template <
typename Derived>
29template <auto stressIndexPair,
typename MaterialImpl>
30struct VanishingStress;
32template <
typename Derived>
44 template <
typename Basis>
46 std::is_same_v<typename Basis::PreBasis::IndexMergingStrategy, Dune::Functions::BasisFactory::FlatInterleaved>;
50 template <
template <
typename,
int,
typename>
class U,
typename T>
51 struct LagrangeNodeHelper : std::false_type
54 template <
template <
typename,
int,
typename>
class U,
typename GV,
int k,
typename R>
55 struct LagrangeNodeHelper<U, U<GV, k, R>> : std::true_type
59 template <
template <
typename,
int,
typename>
class U,
typename T,
int k>
60 struct LagrangeNodeHelperOfOrder : std::false_type
63 template <
template <
typename,
int,
typename>
class U,
typename GV,
int k,
typename R>
64 struct LagrangeNodeHelperOfOrder<U, U<GV, k, R>, k> : std::true_type
77 concept LagrangeNode = Impl::LagrangeNodeHelper<Dune::Functions::LagrangeNode, N>::value;
86 template <
typename N,
int order>
87 concept LagrangeNodeOfOrder = Impl::LagrangeNodeHelperOfOrder<Dune::Functions::LagrangeNode, N, order>::value;
99 std::is_same_v<typename B::PreBasis::IndexMergingStrategy, Dune::Functions::BasisFactory::FlatLexicographic>;
110 template <
typename B>
121 template <
typename Basis>
123 std::is_same_v<typename Basis::PreBasis::IndexMergingStrategy, Dune::Functions::BasisFactory::BlockedInterleaved>;
134 template <
typename B>
136 std::is_same_v<typename B::PreBasis::IndexMergingStrategy, Dune::Functions::BasisFactory::BlockedLexicographic>;
144 template <
typename DLB>
146 typename DLB::Traits::RangeType;
147 typename DLB::Traits::JacobianType;
148 DLB::Traits::dimDomain;
149 typename DLB::Traits::DomainType;
151 typename DLB::Traits::DomainFieldType;
152 typename DLB::Traits::RangeFieldType;
154 duneLocalBasis.evaluateFunction(std::declval<typename DLB::Traits::DomainType>(),
155 std::declval<std::vector<typename DLB::Traits::RangeType>&>());
156 duneLocalBasis.evaluateJacobian(std::declval<typename DLB::Traits::DomainType>(),
157 std::declval<std::vector<typename DLB::Traits::JacobianType>&>());
169 template <
typename B>
179 template <
typename PF,
typename NLO,
typename SA>
181 { pft(args) } -> std::same_as<void>;
182 { pft.initialPrediction(nop, args) } -> std::same_as<void>;
183 { pft.intermediatePrediction(nop, args) } -> std::same_as<void>;
194 template <
typename ASS,
typename NLSI,
typename SA,
typename NonLinearOperator>
196 { adaptiveStepSizing(info, args, nop) } -> std::same_as<void>;
197 { adaptiveStepSizing.targetIterations() } -> std::same_as<int>;
198 { adaptiveStepSizing.setTargetIterations(std::declval<int>()) } -> std::same_as<void>;
209 template <
typename LS,
typename M,
typename V>
211 linearSolver.analyzePattern(A);
212 linearSolver.factorize(A);
213 linearSolver.solve(vec, vec);
223 template <
typename NLS>
225 std::tuple_size<typename NLS::NonLinearOperator::ParameterValues>::value == 2;
226 not(std::is_same_v<typename NLS::NonLinearOperator::ValueType, double> and
227 ((traits::isSpecializationTypeAndNonTypes<Eigen::Matrix,
228 typename NLS::NonLinearOperator::DerivativeType>::value) or
229 (traits::isSpecializationTypeNonTypeAndType<Eigen::SparseMatrix,
230 typename NLS::NonLinearOperator::DerivativeType>::value)));
240 template <
typename L,
typename R>
250 template <
typename L,
typename R>
251 concept AddAble =
requires(L x, R y) { x + y; };
260 template <
typename L,
typename R>
271 template <
typename L,
typename R>
282 template <
typename L,
typename R>
293 template <
typename L,
typename R>
304 template <
typename L,
typename R>
314 template <
typename L,
typename R>
323 template <
typename L>
332 template <
typename L>
342 template <
typename Op,
typename... Args>
352 template <
typename V>
353 concept EigenVector =
static_cast<bool>(V::IsVectorAtCompileTime);
355#define MAKE_EIGEN_FIXED_VECTOR_CONCEPT(Size) \
356 template <typename V> \
357 concept EigenVector##Size = \
358 static_cast<bool>(V::IsVectorAtCompileTime) and static_cast<bool>(V::SizeAtCompileTime == Size);
367#define MAKE_EIGEN_FIXED_MATRIX_CONCEPT(Size1, Size2) \
368 template <typename M> \
369 concept EigenMatrix##Size1##Size2 = static_cast<bool>(std::remove_cvref_t<M>::RowsAtCompileTime == Size1) and \
370 static_cast<bool>(std::remove_cvref_t<M>::ColsAtCompileTime == Size2);
409#define MAKE_EIGEN_FIXED_MATRIX_OR_VOIGT_CONCEPT(Size1, Size2) \
410 template <typename M> \
411 concept EigenMatrixOrVoigtNotation##Size1 = EigenMatrix##Size1##Size1<M> or EigenVector##Size2<M>;
418 template <
template <
typename...>
class MaterialToCheck,
typename Material>
419 consteval bool isMaterial() {
420 if constexpr (traits::isSpecialization<MaterialToCheck, Material>::value)
423 if constexpr (traits::isSpecializationNonTypeAndTypes<VanishingStress, Material>::value) {
424 if constexpr (traits::isSpecialization<MaterialToCheck, typename Material::Underlying>::value) {
445 template <
template <
typename...>
class MaterialToCheck,
typename Material>
446 concept IsMaterial = Impl::isMaterial<MaterialToCheck, Material>();
449 template <
typename T>
452 typename T::Vectorizer;
453 typename T::Matricizer;
454 {
toString(t) } -> std::same_as<std::string>;
467 template <
template <
typename,
int,
int>
typename RT>
469 Impl::ResultType<RT<double, 1, 1>> or Impl::ResultType<RT<double, 1, 2>> or Impl::ResultType<RT<double, 1, 3>> or
470 Impl::ResultType<RT<double, 2, 3>> or Impl::ResultType<RT<double, 3, 3>>;
#define MAKE_EIGEN_FIXED_MATRIX_CONCEPT(Size1, Size2)
Definition: concepts.hh:367
#define MAKE_EIGEN_FIXED_MATRIX_OR_VOIGT_CONCEPT(Size1, Size2)
Definition: concepts.hh:409
#define MAKE_EIGEN_FIXED_VECTOR_CONCEPT(Size)
Definition: concepts.hh:355
Contains stl-like type traits.
Definition: simpleassemblers.hh:22
constexpr std::string toString(ScalarAffordances _e)
Definition: ferequirements.hh:37
auto transpose(const Eigen::EigenBase< Derived > &A)
Definition: truncatedconjugategradient.hh:24
Definition: concepts.hh:25
Concept to check if a basis uses FlatInterleaved indexing strategy.
Definition: concepts.hh:45
Concept to check if a node in a basis tree is a Lagrangian node.
Definition: concepts.hh:77
Definition: concepts.hh:87
Concept to check if a basis uses FlatLexicographic indexing strategy.
Definition: concepts.hh:98
Concept to check if a basis uses FlatIndex indexing strategy.
Definition: concepts.hh:111
Concept to check if a basis uses BlockedInterleaved indexing strategy.
Definition: concepts.hh:122
Concept to check if a basis uses BlockedLexicographic indexing strategy.
Definition: concepts.hh:135
Concept to check if a local basis is a duneLocalBasis.
Definition: concepts.hh:145
Concept to check if a basis uses either BlockedLexicographic or BlockedInterleaved indexing strategy.
Definition: concepts.hh:170
Concept defining the requirements for a path-following strategy.
Definition: concepts.hh:180
Concept to check if a type implements all the needed functions to be an adaptive step sizing method.
Definition: concepts.hh:195
Concept to check if a linear solver implements all the needed functions for given vector and matrix t...
Definition: concepts.hh:210
Concept to check if a non-linear solver with its non-linear operator satisfies requirements for path ...
Definition: concepts.hh:224
Concept defining the requirements for types that support multiplication.
Definition: concepts.hh:241
Concept defining the requirements for types that support addition.
Definition: concepts.hh:251
Concept defining the requirements for types that support subtraction.
Definition: concepts.hh:261
Concept defining the requirements for types that support in-place multiplication.
Definition: concepts.hh:272
Concept defining the requirements for types that support in-place division.
Definition: concepts.hh:283
Concept defining the requirements for types that support in-place addition.
Definition: concepts.hh:294
Concept defining the requirements for types that support in-place subtraction.
Definition: concepts.hh:305
Concept defining the requirements for types that support division.
Definition: concepts.hh:315
Concept defining the requirements for types that support negation.
Definition: concepts.hh:324
Concept defining the requirements for types that support transposition.
Definition: concepts.hh:333
Concept defining the requirements for functors with arguments.
Definition: concepts.hh:343
Concept defining the requirements for Eigen vectors.
Definition: concepts.hh:353
Concept defining the requirements for a material type.
Definition: concepts.hh:446
A concept to check if a template type satisfies the ResultType requirements.
Definition: concepts.hh:468