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 @@
#pragma once
#include <memory>
#include <Eigen/Eigen>
#include "MaterialLib/FractureModels/Permeability/Permeability.h"
#include <memory>
#include "BranchProperty.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
{
template <typename T>
......@@ -87,9 +83,16 @@ inline void setFractureProperty(int const dim, MeshLib::Element const& e,
{
frac_prop.point_on_fracture[j] = getCenterOfGravity(e).getCoords()[j];
}
computeNormalVector(e, dim, n);
frac_prop.R.resize(dim, dim);
computeRotationMatrix(e, n, dim, frac_prop.R);
const MeshLib::ElementCoordinatesMappingLocal ele_local_coord(e, dim);
// 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}]",
e.getID(), n[0], n[1], n[2]);
}
......
......@@ -15,6 +15,7 @@
#include "MathLib/LinAlg/Eigen/EigenMapTools.h"
#include "NumLib/Fem/InitShapeMatrices.h"
#include "ProcessLib/LIE/Common/LevelSetFunction.h"
#include "ProcessLib/LIE/Common/Utils.h"
#include "SmallDeformationLocalAssemblerFracture.h"
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