version 0.4.1
finiteelements/mechanics/materials/hyperelastic/concepts.hh
Go to the documentation of this file.
1// SPDX-FileCopyrightText: 2021-2025 The Ikarus Developers mueller@ibb.uni-stuttgart.de
2// SPDX-License-Identifier: LGPL-3.0-or-later
3
10#pragma once
11
12#include <concepts>
13#include <string>
14
16
18
25template <typename DF>
26concept DeviatoricFunction = requires(DF dm, const typename DF::template PrincipalStretches<>& lambda) {
27 typename DF::ScalarType;
28
29 typename DF::template PrincipalStretches<>;
30 typename DF::template FirstDerivative<>;
31 typename DF::template SecondDerivative<>;
32
33 typename DF::MaterialParameters;
34
37 requires std::is_same_v<typename DF::template PrincipalStretches<>, typename DF::template FirstDerivative<>>;
38
39 { dm.storedEnergyImpl(lambda) } -> std::same_as<typename DF::ScalarType>;
40 { dm.firstDerivativeImpl(lambda) } -> std::same_as<typename DF::template FirstDerivative<>>;
41 { dm.secondDerivativeImpl(lambda) } -> std::same_as<typename DF::template SecondDerivative<>>;
42 { dm.materialParametersImpl() } -> std::same_as<typename DF::MaterialParameters>;
43 { dm.name() } -> std::convertible_to<std::string>;
44};
45
52template <typename VF>
53concept VolumetricFunction = requires(VF vf, const double& j) {
54 { vf.storedEnergyImpl(j) } -> std::same_as<double>;
55 { vf.firstDerivativeImpl(j) } -> std::same_as<double>;
56 { vf.secondDerivativeImpl(j) } -> std::same_as<double>;
57 { vf.name() } -> std::convertible_to<std::string>;
58};
59
60} // namespace Ikarus::Concepts
Definition: finiteelements/mechanics/materials/hyperelastic/concepts.hh:17
Concept to check if the underlying function is a deviatoric function.
Definition: finiteelements/mechanics/materials/hyperelastic/concepts.hh:26
Concept to check if the underlying function is a volumetric function.
Definition: finiteelements/mechanics/materials/hyperelastic/concepts.hh:53
Concept defining the requirements for Eigen vectors.
Definition: utils/concepts.hh:353
Concept defining the requirements for Eigen matrices. This also includes Eigen vectors.
Definition: utils/concepts.hh:361
Several concepts.