Skip to content
Snippets Groups Projects
Commit b0f7bd43 authored by Tom Fischer's avatar Tom Fischer
Browse files

[MeL] clang format ElementCoordinatesMappingLocal.

parent f1fea438
No related branches found
No related tags found
No related merge requests found
......@@ -21,26 +21,26 @@
namespace detail
{
/// rotate points to local coordinates
void rotateToLocal(
const MeshLib::RotationMatrix &matR2local,
std::vector<MathLib::Point3d> &points)
void rotateToLocal(const MeshLib::RotationMatrix& matR2local,
std::vector<MathLib::Point3d>& points)
{
for (auto& p : points)
p = matR2local*p;
p = matR2local * p;
}
/// get a rotation matrix to the global coordinates
/// it computes R in x=R*x' where x is original coordinates and x' is local coordinates
void getRotationMatrixToGlobal(
const unsigned element_dimension,
const unsigned global_dim,
const std::vector<MathLib::Point3d> &points,
MeshLib::RotationMatrix &matR)
/// it computes R in x=R*x' where x is original coordinates and x' is local
/// coordinates
void getRotationMatrixToGlobal(const unsigned element_dimension,
const unsigned global_dim,
const std::vector<MathLib::Point3d>& points,
MeshLib::RotationMatrix& matR)
{
// compute R in x=R*x' where x are original coordinates and x' are local coordinates
if (element_dimension == 1) {
// compute R in x=R*x' where x are original coordinates and x' are local
// coordinates
if (element_dimension == 1)
{
MathLib::Vector3 xx(points[0], points[1]);
xx.normalize();
if (global_dim == 2)
......@@ -48,7 +48,9 @@ void getRotationMatrixToGlobal(
else
GeoLib::compute3DRotationMatrixToX(xx, matR);
matR.transposeInPlace();
} else if (global_dim == 3 && element_dimension == 2) {
}
else if (global_dim == 3 && element_dimension == 2)
{
// get plane normal
MathLib::Vector3 plane_normal;
double d;
......@@ -59,17 +61,14 @@ void getRotationMatrixToGlobal(
// set a transposed matrix
matR.transposeInPlace();
}
}
} // namespace detail
} // namespace detail
namespace MeshLib
{
ElementCoordinatesMappingLocal::ElementCoordinatesMappingLocal(
const Element& e,
const unsigned global_dim)
: _global_dim(global_dim), _matR2global(3,3)
const Element& e, const unsigned global_dim)
: _global_dim(global_dim), _matR2global(3, 3)
{
assert(e.getDimension() <= global_dim);
_points.reserve(e.getNumberOfNodes());
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment