https://gitlab.opengeosys.org/ogs/ogs.git
Revision 78520fd1ce29c559e83240cf4c9d6654ae811b71 authored by Thomas Fischer on 08 December 2015, 08:24:35 UTC, committed by Dmitry Yu. Naumov on 14 December 2015, 22:23:35 UTC
1 parent 2926c0a
Tip revision: 78520fd1ce29c559e83240cf4c9d6654ae811b71 authored by Thomas Fischer on 08 December 2015, 08:24:35 UTC
[FileIO] TetgenInterface: corrected comment.
[FileIO] TetgenInterface: corrected comment.
Tip revision: 78520fd
ElementCoordinatesMappingLocal.h
/**
* \copyright
* Copyright (c) 2012-2015, OpenGeoSys Community (http://www.opengeosys.org)
* Distributed under a Modified BSD License.
* See accompanying file LICENSE.txt or
* http://www.opengeosys.org/project/license
*/
#ifndef ELEMENTCOORDINATESMAPPINGLOCAL_H_
#define ELEMENTCOORDINATESMAPPINGLOCAL_H_
#include <vector>
#ifdef OGS_USE_EIGEN
#include <Eigen/Eigen>
#else
#include "MathLib/LinAlg/Dense/DenseMatrix.h"
#endif
#include "MathLib/Point3d.h"
#include "MeshLib/CoordinateSystem.h"
namespace MeshLib
{
class Element;
}
namespace MeshLib
{
#ifdef OGS_USE_EIGEN
typedef Eigen::Matrix<double, 3u, 3u, Eigen::RowMajor> RotationMatrix;
#else
typedef MathLib::DenseMatrix<double> RotationMatrix;
#endif
/**
* This class maps node coordinates on intrinsic coordinates of the given element.
*/
class ElementCoordinatesMappingLocal final
{
public:
/**
* Constructor
* \param e Mesh element whose node coordinates are mapped
* \param global_coord_system Global coordinate system
*/
ElementCoordinatesMappingLocal(const Element &e, const CoordinateSystem &global_coord_system);
/// return the global coordinate system
const CoordinateSystem getGlobalCoordinateSystem() const { return _coords; }
/// return mapped coordinates of the node
MathLib::Point3d const& getMappedCoordinates(std::size_t node_id) const
{
return _points[node_id];
}
/// return a rotation matrix converting to global coordinates
const RotationMatrix& getRotationMatrixToGlobal() const {return _matR2global;}
private:
const CoordinateSystem _coords;
std::vector<MathLib::Point3d> _points;
RotationMatrix _matR2global;
};
}
#endif // ELEMENTCOORDINATESMAPPINGLOCAL_H_
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...