OGS
ElementCoordinatesMappingLocal.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) OpenGeoSys Community (opengeosys.org)
2// SPDX-License-Identifier: BSD-3-Clause
3
4#pragma once
5
6#include <Eigen/Core>
7#include <vector>
8
9#include "MathLib/Point3d.h"
10
11namespace MeshLib
12{
13 class Element;
14}
15
16namespace MeshLib
17{
18using RotationMatrix = Eigen::Matrix<double, 3u, 3u, Eigen::RowMajor>;
19
24{
25public:
31 ElementCoordinatesMappingLocal(const Element &e, const unsigned global_dim);
32
34 unsigned getGlobalDimension() const { return _global_dim; }
35
37 MathLib::Point3d const& getMappedCoordinates(std::size_t node_id) const
38 {
39 return _points[node_id];
40 }
41
44
45private:
46 const unsigned _global_dim;
47 std::vector<MathLib::Point3d> _points;
49};
50
51} // namespace MeshLib
const RotationMatrix & getRotationMatrixToGlobal() const
return a rotation matrix converting to global coordinates
MathLib::Point3d const & getMappedCoordinates(std::size_t node_id) const
return mapped coordinates of the node
unsigned getGlobalDimension() const
return the global dimension
ElementCoordinatesMappingLocal(const Element &e, const unsigned global_dim)
Eigen::Matrix< double, 3u, 3u, Eigen::RowMajor > RotationMatrix