version 0.4
fetraits.hh
Go to the documentation of this file.
1// SPDX-FileCopyrightText: 2021-2024 The Ikarus Developers mueller@ibb.uni-stuttgart.de
2// SPDX-License-Identifier: LGPL-3.0-or-later
3
9#pragma once
10
12
13namespace Ikarus {
14
21 template <typename GridElement, bool useRef = false>
22 struct FETraits {
24 using ctype = double;
25
27 static constexpr int worlddim = GridElement::Geometry::coorddimension;
28
30 static constexpr int mydim = GridElement::mydimension;
31
33 static constexpr int dimension = GridElement::dimension;
34
36 using GlobalCoordinates = Eigen::Matrix<ctype, worlddim, 1>;
37
39 using ParameterSpaceType = Eigen::Matrix<ctype, mydim, 1>;
40
42 using VectorType = std::conditional_t<useRef, Eigen::Ref<Eigen::VectorXd>, Eigen::VectorXd>;
43
46
48 using MatrixType = std::conditional_t<useRef, Eigen::Ref<Eigen::MatrixXd>, Eigen::MatrixXd>;
49 };
50
51} // namespace Ikarus
Several concepts.
Definition: simpleassemblers.hh:21
Template structure defining traits for a given grid element entity type.
Definition: fetraits.hh:22
static constexpr int mydim
Dimension of the geometry.
Definition: fetraits.hh:30
Eigen::Matrix< ctype, mydim, 1 > ParameterSpaceType
Type of the ParameterSpace coordinate.
Definition: fetraits.hh:39
std::conditional_t< useRef, Eigen::Ref< Eigen::MatrixXd >, Eigen::MatrixXd > MatrixType
Type of the stiffness matrix.
Definition: fetraits.hh:48
static constexpr int worlddim
Dimension of the world space.
Definition: fetraits.hh:27
static constexpr int dimension
Dimension of the grid.
Definition: fetraits.hh:33
std::conditional_t< useRef, Eigen::Ref< Eigen::VectorXd >, Eigen::VectorXd > VectorType
Type of the internal forces.
Definition: fetraits.hh:42
ctype ScalarType
Type of the internal forces.
Definition: fetraits.hh:45
Eigen::Matrix< ctype, worlddim, 1 > GlobalCoordinates
Type of the coordinate.
Definition: fetraits.hh:36
double ctype
Type used for coordinates.
Definition: fetraits.hh:24