v0.13.1
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
FractureMechanics::GriffithForceElement::AuxFunctions< TYPE > Struct Template Reference

#include <users_modules/fracture_mechanics/src/GriffithForceElement.hpp>

Inheritance diagram for FractureMechanics::GriffithForceElement::AuxFunctions< TYPE >:
[legend]
Collaboration diagram for FractureMechanics::GriffithForceElement::AuxFunctions< TYPE >:
[legend]

Public Member Functions

 AuxFunctions ()
 
MoFEMErrorCode calculateAreaAndNormal (const MatrixDouble &diff_n)
 
MoFEMErrorCode calculateMatA (const MatrixDouble &diff_n)
 
MoFEMErrorCode calculateGriffithForce (const double gc, const double beta, const MatrixDouble &diff_n)
 

Public Attributes

ublas::vector< TYPE > referenceCoords
 
ublas::vector< TYPE > currentCoords
 
ublas::vector< TYPE > griffithForce
 
FTensor::Tensor1< TYPE, 3 > t_Normal
 
FTensor::Tensor1< TYPE, 3 > t_Tangent1_ksi
 
FTensor::Tensor1< TYPE, 3 > t_Tangent2_eta
 
TYPE currentArea
 
FTensor::Index< 'i', 3 > i
 
FTensor::Index< 'j', 3 > j
 
FTensor::Index< 'k', 3 > k
 
FTensor::Number< 0 > N0
 
FTensor::Number< 1 > N1
 
boost::function< FTensor::Tensor1< TYPE *, 3 >(ublas::vector< TYPE > &v)> get_ftensor_from_vec
 
boost::function< FTensor::Tensor1< FTensor::PackPtr< const double *, 2 >, 2 >(const MatrixDouble &m)> get_ftensor_from_mat_2d
 

Detailed Description

template<typename TYPE>
struct FractureMechanics::GriffithForceElement::AuxFunctions< TYPE >

\[ A = \| \mathbf{N} \| = \left\| \textrm{Spin}\left[ \frac{\partial\mathbf{N}\mathbf{X}}{\partial\xi} \right] \frac{\partial\mathbf{N}\mathbf{X}}{\partial\eta} \right\| \]

Definition at line 123 of file GriffithForceElement.hpp.

Constructor & Destructor Documentation

◆ AuxFunctions()

template<typename TYPE >
FractureMechanics::GriffithForceElement::AuxFunctions< TYPE >::AuxFunctions ( )
inline

Definition at line 147 of file GriffithForceElement.hpp.

147 {
148
149 get_ftensor_from_vec = [](ublas::vector<TYPE> &v) {
150 return FTensor::Tensor1<TYPE *, 3>(&v(0), &v(1), &v(2), 3);
151 };
152
155 &m(0, 0), &m(0, 1));
156 };
157 }
FTensor::Index< 'm', SPACE_DIM > m
const double v
phase velocity of light in medium (cm/ns)
UBlasMatrix< double > MatrixDouble
Definition: Types.hpp:77
boost::function< FTensor::Tensor1< TYPE *, 3 >(ublas::vector< TYPE > &v)> get_ftensor_from_vec
boost::function< FTensor::Tensor1< FTensor::PackPtr< const double *, 2 >, 2 >(const MatrixDouble &m)> get_ftensor_from_mat_2d

Member Function Documentation

◆ calculateAreaAndNormal()

template<typename TYPE >
MoFEMErrorCode FractureMechanics::GriffithForceElement::AuxFunctions< TYPE >::calculateAreaAndNormal ( const MatrixDouble &  diff_n)
inline

Definition at line 159 of file GriffithForceElement.hpp.

159 {
161
162 auto t_coords = get_ftensor_from_vec(currentCoords);
163 auto t_diff = get_ftensor_from_mat_2d(diff_n);
164 t_Tangent1_ksi(i) = (TYPE)0;
165 t_Tangent2_eta(i) = (TYPE)0;
166 for (int nn = 0; nn != 3; ++nn) {
167 t_Tangent1_ksi(i) += t_coords(i) * t_diff(N0);
168 t_Tangent2_eta(i) += t_coords(i) * t_diff(N1);
169 ++t_diff;
170 ++t_coords;
171 }
172
173 t_Normal(j) =
175 currentArea = 0.5 * sqrt(t_Normal(i) * t_Normal(i));
176
178 }
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:447
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:440
constexpr std::enable_if<(Dim0<=2 &&Dim1<=2), Tensor2_Expr< Levi_Civita< T >, T, Dim0, Dim1, i, j > >::type levi_civita(const Index< i, Dim0 > &, const Index< j, Dim1 > &)
levi_civita functions to make for easy adhoc use

◆ calculateGriffithForce()

template<typename TYPE >
MoFEMErrorCode FractureMechanics::GriffithForceElement::AuxFunctions< TYPE >::calculateGriffithForce ( const double  gc,
const double  beta,
const MatrixDouble &  diff_n 
)
inline

Definition at line 201 of file GriffithForceElement.hpp.

202 {
204
206 CHKERR calculateMatA(diff_n);
207
208 for (int dd = 0; dd != 9; dd++)
209 griffithForce[dd] *= gc * beta;
210
212 }
#define CHKERR
Inline error check.
Definition: definitions.h:535
const Tensor2_symmetric_Expr< const ddTensor0< T, Dim, i, j >, typename promote< T, double >::V, Dim, i, j > dd(const Tensor0< T * > &a, const Index< i, Dim > index1, const Index< j, Dim > index2, const Tensor1< int, Dim > &d_ijk, const Tensor1< double, Dim > &d_xyz)
Definition: ddTensor0.hpp:33
MoFEMErrorCode calculateMatA(const MatrixDouble &diff_n)
MoFEMErrorCode calculateAreaAndNormal(const MatrixDouble &diff_n)

◆ calculateMatA()

template<typename TYPE >
MoFEMErrorCode FractureMechanics::GriffithForceElement::AuxFunctions< TYPE >::calculateMatA ( const MatrixDouble &  diff_n)
inline

Definition at line 180 of file GriffithForceElement.hpp.

180 {
182
183 griffithForce.resize(9, false);
184 griffithForce.clear();
185 auto t_griffith = get_ftensor_from_vec(griffithForce);
186 auto t_diff = get_ftensor_from_mat_2d(diff_n);
187
188 for (int dd = 0; dd != 3; dd++) {
189
190 t_griffith(i) += FTensor::levi_civita(i, j, k) * t_Tangent1_ksi(k) *
191 t_diff(N1) * t_Normal(j) * 0.25 / currentArea;
192 t_griffith(i) -= FTensor::levi_civita(i, j, k) * t_Tangent2_eta(k) *
193 t_diff(N0) * t_Normal(j) * 0.25 / currentArea;
194 ++t_diff;
195 ++t_griffith;
196 }
197
199 }

Member Data Documentation

◆ currentArea

template<typename TYPE >
TYPE FractureMechanics::GriffithForceElement::AuxFunctions< TYPE >::currentArea

Definition at line 132 of file GriffithForceElement.hpp.

◆ currentCoords

template<typename TYPE >
ublas::vector<TYPE> FractureMechanics::GriffithForceElement::AuxFunctions< TYPE >::currentCoords

Definition at line 126 of file GriffithForceElement.hpp.

◆ get_ftensor_from_mat_2d

template<typename TYPE >
boost::function<FTensor::Tensor1<FTensor::PackPtr<const double *, 2>, 2>( const MatrixDouble &m)> FractureMechanics::GriffithForceElement::AuxFunctions< TYPE >::get_ftensor_from_mat_2d

Definition at line 145 of file GriffithForceElement.hpp.

◆ get_ftensor_from_vec

template<typename TYPE >
boost::function<FTensor::Tensor1<TYPE *, 3>(ublas::vector<TYPE> &v)> FractureMechanics::GriffithForceElement::AuxFunctions< TYPE >::get_ftensor_from_vec

Definition at line 141 of file GriffithForceElement.hpp.

◆ griffithForce

template<typename TYPE >
ublas::vector<TYPE> FractureMechanics::GriffithForceElement::AuxFunctions< TYPE >::griffithForce

Definition at line 127 of file GriffithForceElement.hpp.

◆ i

template<typename TYPE >
FTensor::Index<'i', 3> FractureMechanics::GriffithForceElement::AuxFunctions< TYPE >::i

Definition at line 134 of file GriffithForceElement.hpp.

◆ j

template<typename TYPE >
FTensor::Index<'j', 3> FractureMechanics::GriffithForceElement::AuxFunctions< TYPE >::j

Definition at line 135 of file GriffithForceElement.hpp.

◆ k

template<typename TYPE >
FTensor::Index<'k', 3> FractureMechanics::GriffithForceElement::AuxFunctions< TYPE >::k

Definition at line 136 of file GriffithForceElement.hpp.

◆ N0

Definition at line 137 of file GriffithForceElement.hpp.

◆ N1

Definition at line 138 of file GriffithForceElement.hpp.

◆ referenceCoords

template<typename TYPE >
ublas::vector<TYPE> FractureMechanics::GriffithForceElement::AuxFunctions< TYPE >::referenceCoords

Definition at line 125 of file GriffithForceElement.hpp.

◆ t_Normal

template<typename TYPE >
FTensor::Tensor1<TYPE, 3> FractureMechanics::GriffithForceElement::AuxFunctions< TYPE >::t_Normal

Definition at line 129 of file GriffithForceElement.hpp.

◆ t_Tangent1_ksi

template<typename TYPE >
FTensor::Tensor1<TYPE, 3> FractureMechanics::GriffithForceElement::AuxFunctions< TYPE >::t_Tangent1_ksi

Definition at line 130 of file GriffithForceElement.hpp.

◆ t_Tangent2_eta

template<typename TYPE >
FTensor::Tensor1<TYPE, 3> FractureMechanics::GriffithForceElement::AuxFunctions< TYPE >::t_Tangent2_eta

Definition at line 131 of file GriffithForceElement.hpp.


The documentation for this struct was generated from the following file: