16#include <dune/functions/functionspacebases/basistags.hh>
17#include <dune/functions/functionspacebases/lagrangebasis.hh>
20#include <Eigen/Sparse>
26template <
typename Derived>
31template <auto stressIndexPair,
typename MaterialImpl>
32struct VanishingStress;
34template <
typename Derived>
46 template <
typename Basis>
48 std::is_same_v<typename Basis::PreBasis::IndexMergingStrategy, Dune::Functions::BasisFactory::FlatInterleaved>;
52 template <
template <
typename,
int,
typename>
class U,
typename T>
53 struct LagrangeNodeHelper : std::false_type
56 template <
template <
typename,
int,
typename>
class U,
typename GV,
int k,
typename R>
57 struct LagrangeNodeHelper<U, U<GV, k, R>> : std::true_type
61 template <
template <
typename,
int,
typename>
class U,
typename T,
int k>
62 struct LagrangeNodeHelperOfOrder : std::false_type
65 template <
template <
typename,
int,
typename>
class U,
typename GV,
int k,
typename R>
66 struct LagrangeNodeHelperOfOrder<U, U<GV, k, R>, k> : std::true_type
79 concept LagrangeNode = Impl::LagrangeNodeHelper<Dune::Functions::LagrangeNode, N>::value;
88 template <
typename N,
int order>
89 concept LagrangeNodeOfOrder = Impl::LagrangeNodeHelperOfOrder<Dune::Functions::LagrangeNode, N, order>::value;
101 std::is_same_v<typename B::PreBasis::IndexMergingStrategy, Dune::Functions::BasisFactory::FlatLexicographic>;
112 template <
typename B>
123 template <
typename Basis>
125 std::is_same_v<typename Basis::PreBasis::IndexMergingStrategy, Dune::Functions::BasisFactory::BlockedInterleaved>;
136 template <
typename B>
138 std::is_same_v<typename B::PreBasis::IndexMergingStrategy, Dune::Functions::BasisFactory::BlockedLexicographic>;
146 template <
typename DLB>
148 typename DLB::Traits::RangeType;
149 typename DLB::Traits::JacobianType;
150 DLB::Traits::dimDomain;
151 typename DLB::Traits::DomainType;
153 typename DLB::Traits::DomainFieldType;
154 typename DLB::Traits::RangeFieldType;
156 duneLocalBasis.evaluateFunction(std::declval<typename DLB::Traits::DomainType>(),
157 std::declval<std::vector<typename DLB::Traits::RangeType>&>());
158 duneLocalBasis.evaluateJacobian(std::declval<typename DLB::Traits::DomainType>(),
159 std::declval<std::vector<typename DLB::Traits::JacobianType>&>());
171 template <
typename B>
181 template <
typename PF,
typename NLO,
typename SA>
183 { pft(args) } -> std::same_as<void>;
184 { pft.initialPrediction(nop, args) } -> std::same_as<void>;
185 { pft.intermediatePrediction(nop, args) } -> std::same_as<void>;
196 template <
typename ASS,
typename NLSI,
typename SA,
typename NonLinearOperator>
198 { adaptiveStepSizing(info, args, nop) } -> std::same_as<void>;
199 { adaptiveStepSizing.targetIterations() } -> std::same_as<int>;
200 { adaptiveStepSizing.setTargetIterations(std::declval<int>()) } -> std::same_as<void>;
211 template <
typename LS,
typename M,
typename V>
213 linearSolver.analyzePattern(A);
214 linearSolver.factorize(A);
215 linearSolver.solve(vec, vec);
225 template <
typename NLS>
227 std::tuple_size<typename NLS::NonLinearOperator::ParameterValues>::value == 2;
228 not(std::is_same_v<typename NLS::NonLinearOperator::ValueType, double> and
229 ((traits::isSpecializationTypeAndNonTypes<Eigen::Matrix,
230 typename NLS::NonLinearOperator::DerivativeType>::value) or
231 (traits::isSpecializationTypeNonTypeAndType<Eigen::SparseMatrix,
232 typename NLS::NonLinearOperator::DerivativeType>::value)));
242 template <
typename L,
typename R>
252 template <
typename L,
typename R>
253 concept AddAble =
requires(L x, R y) { x + y; };
262 template <
typename L,
typename R>
273 template <
typename L,
typename R>
284 template <
typename L,
typename R>
295 template <
typename L,
typename R>
306 template <
typename L,
typename R>
316 template <
typename L,
typename R>
325 template <
typename L>
334 template <
typename L>
343 template <
typename Op,
typename... Args>
351 template <
typename V>
352 concept EigenVector =
static_cast<bool>(V::IsVectorAtCompileTime);
359 template <
typename M>
360 concept EigenMatrix = traits::isSpecializationTypeAndNonTypes<Eigen::Matrix, M>::value;
362#define MAKE_EIGEN_FIXED_VECTOR_CONCEPT(Size) \
363 template <typename V> \
364 concept EigenVector##Size = \
365 static_cast<bool>(V::IsVectorAtCompileTime) and static_cast<bool>(V::SizeAtCompileTime == Size);
374#define MAKE_EIGEN_FIXED_MATRIX_CONCEPT(Size1, Size2) \
375 template <typename M> \
376 concept EigenMatrix##Size1##Size2 = static_cast<bool>(std::remove_cvref_t<M>::RowsAtCompileTime == Size1) and \
377 static_cast<bool>(std::remove_cvref_t<M>::ColsAtCompileTime == Size2);
416#define MAKE_EIGEN_FIXED_MATRIX_OR_VOIGT_CONCEPT(Size1, Size2) \
417 template <typename M> \
418 concept EigenMatrixOrVoigtNotation##Size1 = EigenMatrix##Size1##Size1<M> or EigenVector##Size2<M>;
425 template <
template <
typename...>
class MaterialToCheck,
typename Material>
426 consteval bool isMaterial() {
427 if constexpr (traits::isSpecialization<MaterialToCheck, Material>::value)
430 if constexpr (traits::isSpecializationNonTypeAndTypes<VanishingStress, Material>::value) {
431 if constexpr (traits::isSpecialization<MaterialToCheck, typename Material::Underlying>::value) {
452 template <
template <
typename...>
class MaterialToCheck,
typename Material>
453 concept IsMaterial = Impl::isMaterial<MaterialToCheck, Material>();
456 template <
typename T>
459 typename T::Vectorizer;
460 typename T::Matricizer;
461 {
toString(t) } -> std::same_as<std::string>;
474 template <
template <
typename,
int,
int>
typename RT>
476 Impl::ResultType<RT<double, 1, 1>> or Impl::ResultType<RT<double, 1, 2>> or Impl::ResultType<RT<double, 1, 3>> or
477 Impl::ResultType<RT<double, 2, 3>> or Impl::ResultType<RT<double, 3, 3>>;
486 template <
typename T>
488 typename T::AffordanceCollectionType affordance,
DBCOption dbcOption) {
489 { t.scalar(req, affordance.scalarAffordance()) } -> std::convertible_to<const double&>;
490 { t.scalar() } -> std::convertible_to<const double&>;
492 { t.vector(req, affordance.vectorAffordance(), dbcOption) } -> std::convertible_to<const Eigen::VectorXd&>;
493 { t.vector(dbcOption) } -> std::convertible_to<const Eigen::VectorXd&>;
494 { t.vector() } -> std::convertible_to<const Eigen::VectorXd&>;
496 { t.matrix(req, affordance.matrixAffordance(), dbcOption) };
497 { t.matrix(dbcOption) };
500 { t.requirement() } -> std::convertible_to<typename T::FERequirement&>;
501 { t.affordanceCollection() } -> std::convertible_to<typename T::AffordanceCollectionType>;
502 { t.dBCOption() } -> std::convertible_to<DBCOption>;
504 { t.bind(req, affordance, dbcOption) } -> std::same_as<void>;
505 { t.bind(req) } -> std::same_as<void>;
506 { t.bind(affordance) } -> std::same_as<void>;
507 { t.bind(dbcOption) } -> std::same_as<void>;
509 { t.bound() } -> std::convertible_to<bool>;
510 { t.boundToRequirement() } -> std::convertible_to<bool>;
511 { t.boundToAffordanceCollection() } -> std::convertible_to<bool>;
512 { t.boundToDBCOption() } -> std::convertible_to<bool>;
513 { t.estimateOfConnectivity() } -> std::convertible_to<size_t>;
515 { t.createFullVector(std::declval<Eigen::Ref<const Eigen::VectorXd>>()) } -> std::convertible_to<Eigen::VectorXd>;
516 { t.constraintsBelow(std::declval<size_t>()) } -> std::convertible_to<size_t>;
517 { t.isConstrained(std::declval<size_t>()) } -> std::convertible_to<bool>;
518 { t.size() } -> std::convertible_to<size_t>;
519 { t.reducedSize() } -> std::convertible_to<size_t>;
Contains stl-like type traits.
#define MAKE_EIGEN_FIXED_MATRIX_CONCEPT(Size1, Size2)
Definition: concepts.hh:374
#define MAKE_EIGEN_FIXED_MATRIX_OR_VOIGT_CONCEPT(Size1, Size2)
Definition: concepts.hh:416
#define MAKE_EIGEN_FIXED_VECTOR_CONCEPT(Size)
Definition: concepts.hh:362
Definition: dirichletbcenforcement.hh:6
DBCOption
Definition: dirichletbcenforcement.hh:7
NonLinearOperator(const Impl::Functions< DerivativeArgs &&... > &a, const Impl::Parameter< ParameterArgs... > &b) -> NonLinearOperator< Impl::Functions< DerivativeArgs... >, Impl::Parameter< ParameterArgs... > >
auto transpose(const Eigen::EigenBase< Derived > &A)
constexpr std::string toString(DBCOption _e)
Definition: dirichletbcenforcement.hh:7
Definition: truncatedconjugategradient.hh:24
Definition: concepts.hh:27
Concept to check if a basis uses FlatInterleaved indexing strategy.
Definition: concepts.hh:47
Concept to check if a node in a basis tree is a Lagrangian node.
Definition: concepts.hh:79
Definition: concepts.hh:89
Concept to check if a basis uses FlatLexicographic indexing strategy.
Definition: concepts.hh:100
Concept to check if a basis uses FlatIndex indexing strategy.
Definition: concepts.hh:113
Concept to check if a basis uses BlockedInterleaved indexing strategy.
Definition: concepts.hh:124
Concept to check if a basis uses BlockedLexicographic indexing strategy.
Definition: concepts.hh:137
Concept to check if a local basis is a duneLocalBasis.
Definition: concepts.hh:147
Concept to check if a basis uses either BlockedLexicographic or BlockedInterleaved indexing strategy.
Definition: concepts.hh:172
Concept defining the requirements for a path-following strategy.
Definition: concepts.hh:182
Concept to check if a type implements all the needed functions to be an adaptive step sizing method.
Definition: concepts.hh:197
Concept to check if a linear solver implements all the needed functions for given vector and matrix t...
Definition: concepts.hh:212
Concept to check if a non-linear solver with its non-linear operator satisfies requirements for path ...
Definition: concepts.hh:226
Concept defining the requirements for types that support multiplication.
Definition: concepts.hh:243
Concept defining the requirements for types that support addition.
Definition: concepts.hh:253
Concept defining the requirements for types that support subtraction.
Definition: concepts.hh:263
Concept defining the requirements for types that support in-place multiplication.
Definition: concepts.hh:274
Concept defining the requirements for types that support in-place division.
Definition: concepts.hh:285
Concept defining the requirements for types that support in-place addition.
Definition: concepts.hh:296
Concept defining the requirements for types that support in-place subtraction.
Definition: concepts.hh:307
Concept defining the requirements for types that support division.
Definition: concepts.hh:317
Concept defining the requirements for types that support negation.
Definition: concepts.hh:326
Concept defining the requirements for types that support transposition.
Definition: concepts.hh:335
Concept defining the requirements for functors with arguments.
Definition: concepts.hh:344
Concept defining the requirements for Eigen vectors.
Definition: concepts.hh:352
Concept defining the requirements for Eigen matrices. This also includes Eigen vectors.
Definition: concepts.hh:360
Concept defining the requirements for a material type.
Definition: concepts.hh:453
A concept to check if a template type satisfies the ResultType requirements.
Definition: concepts.hh:475
Concept representing the requirements for a FlatAssembler.A type T satisfies FlatAssembler if it prov...
Definition: concepts.hh:487