Skip to content
Snippets Groups Projects
Commit be5899a9 authored by wenqing's avatar wenqing Committed by Dmitri Naumov
Browse files

[LIE] Use ElementCoordinatesMappingLocal to compute the rotation matrix

parent ed9ddc0f
No related branches found
No related tags found
No related merge requests found
...@@ -10,19 +10,15 @@ ...@@ -10,19 +10,15 @@
#pragma once #pragma once
#include <memory>
#include <Eigen/Eigen> #include <Eigen/Eigen>
#include <memory>
#include "MaterialLib/FractureModels/Permeability/Permeability.h"
#include "BranchProperty.h" #include "BranchProperty.h"
#include "JunctionProperty.h" #include "JunctionProperty.h"
#include "Utils.h" #include "MaterialLib/FractureModels/Permeability/Permeability.h"
#include "MeshLib/ElementCoordinatesMappingLocal.h"
#include "MeshLib/Elements/Element.h"
namespace MeshLib
{
class Element;
}
namespace ParameterLib namespace ParameterLib
{ {
template <typename T> template <typename T>
...@@ -87,9 +83,16 @@ inline void setFractureProperty(int const dim, MeshLib::Element const& e, ...@@ -87,9 +83,16 @@ inline void setFractureProperty(int const dim, MeshLib::Element const& e,
{ {
frac_prop.point_on_fracture[j] = getCenterOfGravity(e).getCoords()[j]; frac_prop.point_on_fracture[j] = getCenterOfGravity(e).getCoords()[j];
} }
computeNormalVector(e, dim, n);
frac_prop.R.resize(dim, dim); const MeshLib::ElementCoordinatesMappingLocal ele_local_coord(e, dim);
computeRotationMatrix(e, n, dim, frac_prop.R);
// Global to local rotation matrix:
Eigen::MatrixXd const global2local_rotation =
ele_local_coord.getRotationMatrixToGlobal().transpose();
n = global2local_rotation.row(dim - 1);
frac_prop.R = global2local_rotation.topLeftCorner(dim, dim);
DBUG("Normal vector of the fracture element {:d}: [{:g}, {:g}, {:g}]", DBUG("Normal vector of the fracture element {:d}: [{:g}, {:g}, {:g}]",
e.getID(), n[0], n[1], n[2]); e.getID(), n[0], n[1], n[2]);
} }
......
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
#include "MathLib/LinAlg/Eigen/EigenMapTools.h" #include "MathLib/LinAlg/Eigen/EigenMapTools.h"
#include "NumLib/Fem/InitShapeMatrices.h" #include "NumLib/Fem/InitShapeMatrices.h"
#include "ProcessLib/LIE/Common/LevelSetFunction.h" #include "ProcessLib/LIE/Common/LevelSetFunction.h"
#include "ProcessLib/LIE/Common/Utils.h"
#include "SmallDeformationLocalAssemblerFracture.h" #include "SmallDeformationLocalAssemblerFracture.h"
namespace ProcessLib namespace ProcessLib
......
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