mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#2680. First reasonable Fracture Gradient and Shear Failure Gradient estimation.
Caveats: * Hard coded poissonRatio = 0.25 * Hard coded UCS to 100 bar (fairly close to average value for shale in literature).
This commit is contained in:
@@ -32,6 +32,8 @@ public:
|
||||
Tensor3() {}
|
||||
Tensor3(S sxx, S syy, S szz, S sxy, S syz, S szx);
|
||||
Tensor3(const Tensor3& other);
|
||||
template<typename T>
|
||||
explicit Tensor3(const Tensor3<T>& other);
|
||||
|
||||
inline Tensor3& operator=(const Tensor3& rhs);
|
||||
inline Tensor3 operator+(const Tensor3& rhs) const;
|
||||
@@ -55,6 +57,7 @@ public:
|
||||
};
|
||||
|
||||
typedef Tensor3<float> Ten3f;
|
||||
typedef Tensor3<double> Ten3d;
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -37,6 +37,21 @@ inline Tensor3<S>::Tensor3(const Tensor3& other)
|
||||
cvf::System::memcpy(m_tensor, sizeof(m_tensor), other.m_tensor, sizeof(other.m_tensor));
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
/// Explicit Cast constructor
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
template <typename S>
|
||||
template <typename T>
|
||||
Tensor3<S>::Tensor3(const Tensor3<T>& other)
|
||||
{
|
||||
m_tensor[SXX] = other[Tensor3<T>::SXX];
|
||||
m_tensor[SYY] = other[Tensor3<T>::SYY];
|
||||
m_tensor[SZZ] = other[Tensor3<T>::SZZ];
|
||||
m_tensor[SXY] = other[Tensor3<T>::SXY];
|
||||
m_tensor[SYZ] = other[Tensor3<T>::SYZ];
|
||||
m_tensor[SZX] = other[Tensor3<T>::SZX];
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
/// Constructor with explicit initialization of all tensor elements.
|
||||
///
|
||||
|
||||
Reference in New Issue
Block a user