OGS
CoordinateSystem.h
Go to the documentation of this file.
1
11#pragma once
12
13#include <Eigen/Dense>
14#include <array>
15#include <vector>
16
17namespace ParameterLib
18{
19template <typename T>
20struct Parameter;
21class SpatialPosition;
22} // namespace ParameterLib
23
24namespace ParameterLib
25{
26struct CoordinateSystem final
27{
29
31 Parameter<double> const& e1,
32 Parameter<double> const& e2);
33
34 template <int Dimension>
35 Eigen::Matrix<double, Dimension, Dimension> transformation(
36 SpatialPosition const& pos) const;
37
38 Eigen::Matrix<double, 3, 3> transformation_3d(
39 SpatialPosition const& pos) const;
40
41 template <int Dimension>
42 Eigen::Matrix<double, Dimension, Dimension> rotateTensor(
43 std::vector<double> const& values, SpatialPosition const& pos) const;
44
45 template <int Dimension>
46 Eigen::Matrix<double, Dimension, Dimension> rotateDiagonalTensor(
47 std::vector<double> const& values, SpatialPosition const& pos) const;
48
49private:
50 std::array<Parameter<double> const*, 3> _base;
51};
52
53extern template Eigen::Matrix<double, 2, 2> CoordinateSystem::rotateTensor<2>(
54 std::vector<double> const& values, SpatialPosition const& pos) const;
55extern template Eigen::Matrix<double, 3, 3> CoordinateSystem::rotateTensor<3>(
56 std::vector<double> const& values, SpatialPosition const& pos) const;
57extern template Eigen::Matrix<double, 2, 2>
58CoordinateSystem::rotateDiagonalTensor<2>(std::vector<double> const& values,
59 SpatialPosition const& pos) const;
60extern template Eigen::Matrix<double, 3, 3>
61CoordinateSystem::rotateDiagonalTensor<3>(std::vector<double> const& values,
62 SpatialPosition const& pos) const;
63} // namespace ParameterLib
std::array< Parameter< double > const *, 3 > _base
Eigen::Matrix< double, Dimension, Dimension > transformation(SpatialPosition const &pos) const
Eigen::Matrix< double, 3, 3 > transformation_3d(SpatialPosition const &pos) const
Eigen::Matrix< double, Dimension, Dimension > rotateTensor(std::vector< double > const &values, SpatialPosition const &pos) const
CoordinateSystem(Parameter< double > const &e0, Parameter< double > const &e1)
Eigen::Matrix< double, Dimension, Dimension > rotateDiagonalTensor(std::vector< double > const &values, SpatialPosition const &pos) const