Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
/**
* \copyright
* Copyright (c) 2012-2016, OpenGeoSys Community (http://www.opengeosys.org)
* Distributed under a Modified BSD License.
* See accompanying file LICENSE.txt or
* http://www.opengeosys.org/project/license
*
*/
#pragma once
#include <Eigen/Eigen>
#include "MeshLib/Elements/Element.h"
#include "MeshLib/Node.h"
#include "ProcessLib/Parameter/Parameter.h"
#include "FractureProperty.h"
#include "Utils.h"
namespace ProcessLib
{
namespace SmallDeformationWithLIE
{
struct FractureProperty
{
int mat_id = 0;
Eigen::Vector3d point_on_fracture;
Eigen::Vector3d normal_vector;
/// Rotation matrix from global to local coordinates
Eigen::MatrixXd R;
/// Initial aperture
ProcessLib::Parameter<double>* aperture0 = nullptr;
};
/// configure fracture property based on a fracture element
inline void setFractureProperty(unsigned dim, MeshLib::Element const& e,
FractureProperty &frac_prop)
{
for (int j=0; j<3; j++)
frac_prop.point_on_fracture[j] = e.getNode(0)->getCoords()[j];
computeNormalVector(e, frac_prop.normal_vector);
frac_prop.R.resize(dim, dim);
computeRotationMatrix(frac_prop.normal_vector, dim, frac_prop.R);
}
} // namespace SmallDeformationWithLIE
} // namespace ProcessLib