DNDSR 0.1.0.dev1+gcd065ad
Distributed Numeric Data Structure for CFV
Loading...
Searching...
No Matches
Elements.cpp
Go to the documentation of this file.
1#include "Elements.hpp"
2
4{
5
6 Eigen::Matrix<t_real, 3, Eigen::Dynamic> GetStandardCoord(ElemType t)
7 {
8 auto ret = Eigen::Matrix<t_real, 3, Eigen::Dynamic>{};
9
10 DispatchElementType(t, [&](auto tr)
11 {
12 using T = decltype(tr);
13 ret.resize(3, T::numNodes);
14 for (int j = 0; j < T::numNodes; j++)
15 for (int d = 0; d < 3; d++)
16 ret(d, j) = T::standardCoords[j * 3 + d];
17 });
18
19 return ret;
20 }
21}
DNDS_DEVICE_CALLABLE constexpr decltype(auto) DispatchElementType(ElemType t, Func &&func)
Static dispatch over element types at compile time.
Eigen::Matrix< t_real, 3, Eigen::Dynamic > GetStandardCoord(ElemType t)
Definition Elements.cpp:6