v0.14.0
Public Member Functions | Public Attributes | List of all members
FractureMechanics::ConstantArea::OpAreaJacobian::AuxFunctions< TYPE > Struct Template Reference

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

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

Public Member Functions

PetscErrorCode sPin (ublas::matrix< TYPE > &spin, ublas::vector< TYPE > &vec)
 
PetscErrorCode matrixB (int gg, DataForcesAndSourcesCore::EntData &data)
 
PetscErrorCode dIffX ()
 
PetscErrorCode nOrmal ()
 
PetscErrorCode matrixA ()
 
PetscErrorCode calculateAreaIncrementDirection (double beta)
 
PetscErrorCode calculateFrontTangent (double beta)
 

Public Attributes

MatrixDouble N
 
MatrixDouble NTN
 
MatrixDouble Bksi
 
MatrixDouble Beta
 
ublas::vector< TYPE > referenceCoords
 
ublas::vector< TYPE > referenceXdKsi
 
ublas::vector< TYPE > referenceXdEta
 
ublas::matrix< TYPE > referenceSpinKsi
 
ublas::matrix< TYPE > referenceSpinEta
 
ublas::vector< TYPE > referenceNormal
 
TYPE referenceArea
 
ublas::vector< TYPE > currentCoords
 
ublas::vector< TYPE > currentXdKsi
 
ublas::vector< TYPE > currentXdEta
 
ublas::matrix< TYPE > currentSpinKsi
 
ublas::matrix< TYPE > currentSpinEta
 
ublas::vector< TYPE > currentNormal
 
TYPE currentArea
 
ublas::matrix< TYPE > A
 
ublas::vector< TYPE > crackAreaIncrement
 
ublas::vector< TYPE > crackFrontTangent
 
FTensor::Tensor2< TYPE, 3, 3 > tSpin
 

Detailed Description

template<typename TYPE>
struct FractureMechanics::ConstantArea::OpAreaJacobian::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 267 of file ConstantArea.hpp.

Member Function Documentation

◆ calculateAreaIncrementDirection()

template<typename TYPE >
PetscErrorCode FractureMechanics::ConstantArea::OpAreaJacobian::AuxFunctions< TYPE >::calculateAreaIncrementDirection ( double  beta)
inline

Definition at line 377 of file ConstantArea.hpp.

377  {
379  for (int dd = 0; dd != 9; dd++) {
380  for (int ii = 0; ii != 3; ii++) {
382  beta * A(ii, dd) * currentNormal[ii] / currentArea;
383  }
384  }
386  }

◆ calculateFrontTangent()

template<typename TYPE >
PetscErrorCode FractureMechanics::ConstantArea::OpAreaJacobian::AuxFunctions< TYPE >::calculateFrontTangent ( double  beta)
inline

Definition at line 393 of file ConstantArea.hpp.

393  {
397  tSpin(i, j) = 0;
398  tSpin(0, 1) = -currentNormal[2];
399  tSpin(0, 2) = +currentNormal[1];
400  tSpin(1, 0) = +currentNormal[2];
401  tSpin(1, 2) = -currentNormal[0];
402  tSpin(2, 0) = -currentNormal[1];
403  tSpin(2, 1) = +currentNormal[0];
404  tSpin(i, j) /= beta * currentArea;
405  crackFrontTangent.resize(9, false);
406  FTensor::Tensor1<TYPE *, 3> t_crack_front_tangent(
408  3);
409  FTensor::Tensor1<TYPE *, 3> t_area_increment(&crackAreaIncrement[0],
410  &crackAreaIncrement[1],
411  &crackAreaIncrement[2], 3);
412  for (int ii = 0; ii != 3; ++ii) {
413  t_crack_front_tangent(i) = tSpin(i, j) * t_area_increment(j);
414  ++t_area_increment;
415  ++t_crack_front_tangent;
416  }
418  }

◆ dIffX()

template<typename TYPE >
PetscErrorCode FractureMechanics::ConstantArea::OpAreaJacobian::AuxFunctions< TYPE >::dIffX ( )
inline

Definition at line 326 of file ConstantArea.hpp.

326  {
328  currentXdKsi.resize(3, false);
329  currentXdEta.resize(3, false);
330  std::fill(currentXdKsi.begin(), currentXdKsi.end(), 0);
331  std::fill(currentXdEta.begin(), currentXdEta.end(), 0);
332  for (auto ii = 0; ii != Bksi.size1(); ++ii)
333  for (auto jj = 0; jj != Bksi.size2(); ++jj)
334  currentXdKsi(ii) += Bksi(ii, jj) * currentCoords(jj);
335  for (auto ii = 0; ii != Beta.size1(); ++ii)
336  for (auto jj = 0; jj != Beta.size2(); ++jj)
337  currentXdEta(ii) += Beta(ii, jj) * currentCoords(jj);
338  // noalias(currentXdKsi) = prod(Bksi, currentCoords);
339  // noalias(currentXdEta) = prod(Beta, currentCoords);
341  }

◆ matrixA()

template<typename TYPE >
PetscErrorCode FractureMechanics::ConstantArea::OpAreaJacobian::AuxFunctions< TYPE >::matrixA ( )
inline

Definition at line 363 of file ConstantArea.hpp.

363  {
365  A.resize(3, 9, false);
366  A.clear();
367  for (auto ii = 0; ii != A.size1(); ++ii)
368  for (auto jj = 0; jj != A.size2(); ++jj)
369  for (auto kk = 0; kk != currentSpinKsi.size2(); ++kk)
370  A(ii, jj) += 0.5 * (currentSpinKsi(ii, kk) * Beta(kk, jj) -
371  currentSpinEta(ii, kk) * Bksi(kk, jj));
372  // noalias(A) =
373  // 0.5 * (prod(currentSpinKsi, Beta) - prod(currentSpinEta, Bksi));
375  }

◆ matrixB()

template<typename TYPE >
PetscErrorCode FractureMechanics::ConstantArea::OpAreaJacobian::AuxFunctions< TYPE >::matrixB ( int  gg,
DataForcesAndSourcesCore::EntData data 
)
inline

Definition at line 307 of file ConstantArea.hpp.

307  {
309  Bksi.resize(3, 9, false);
310  Bksi.clear();
311  for (int ii = 0; ii < 3; ++ii) {
312  for (int jj = 0; jj < 3; ++jj) {
313  Bksi(jj, ii * 3 + jj) = data.getDiffN(gg)(ii, 0);
314  }
315  }
316  Beta.resize(3, 9, false);
317  Beta.clear();
318  for (int ii = 0; ii < 3; ++ii) {
319  for (int jj = 0; jj < 3; ++jj) {
320  Beta(jj, ii * 3 + jj) = data.getDiffN(gg)(ii, 1);
321  }
322  }
324  }

◆ nOrmal()

template<typename TYPE >
PetscErrorCode FractureMechanics::ConstantArea::OpAreaJacobian::AuxFunctions< TYPE >::nOrmal ( )
inline

Definition at line 343 of file ConstantArea.hpp.

343  {
345 
348  currentNormal.resize(3, false);
349  std::fill(currentNormal.begin(), currentNormal.end(), 0);
350  for (auto ii = 0; ii != currentSpinKsi.size1(); ++ii)
351  for (auto jj = 0; jj != currentSpinKsi.size2(); ++jj)
352  currentNormal(ii) +=
353  0.5 * currentSpinKsi(ii, jj) * currentXdEta(jj);
354  // noalias(currentNormal) = 0.5 * prod(currentSpinKsi, currentXdEta);
355  currentArea = 0;
356  for (int dd = 0; dd != 3; ++dd) {
358  }
359  currentArea = sqrt(currentArea);
361  }

◆ sPin()

template<typename TYPE >
PetscErrorCode FractureMechanics::ConstantArea::OpAreaJacobian::AuxFunctions< TYPE >::sPin ( ublas::matrix< TYPE > &  spin,
ublas::vector< TYPE > &  vec 
)
inline

Definition at line 294 of file ConstantArea.hpp.

294  {
296  spin.resize(3, 3, false);
297  std::fill(spin.data().begin(), spin.data().end(), 0);
298  spin(0, 1) = -vec[2];
299  spin(0, 2) = +vec[1];
300  spin(1, 0) = +vec[2];
301  spin(1, 2) = -vec[0];
302  spin(2, 0) = -vec[1];
303  spin(2, 1) = +vec[0];
305  }

Member Data Documentation

◆ A

template<typename TYPE >
ublas::matrix<TYPE> FractureMechanics::ConstantArea::OpAreaJacobian::AuxFunctions< TYPE >::A

Definition at line 290 of file ConstantArea.hpp.

◆ Beta

template<typename TYPE >
MatrixDouble FractureMechanics::ConstantArea::OpAreaJacobian::AuxFunctions< TYPE >::Beta

Definition at line 271 of file ConstantArea.hpp.

◆ Bksi

template<typename TYPE >
MatrixDouble FractureMechanics::ConstantArea::OpAreaJacobian::AuxFunctions< TYPE >::Bksi

Definition at line 270 of file ConstantArea.hpp.

◆ crackAreaIncrement

template<typename TYPE >
ublas::vector<TYPE> FractureMechanics::ConstantArea::OpAreaJacobian::AuxFunctions< TYPE >::crackAreaIncrement

Definition at line 291 of file ConstantArea.hpp.

◆ crackFrontTangent

template<typename TYPE >
ublas::vector<TYPE> FractureMechanics::ConstantArea::OpAreaJacobian::AuxFunctions< TYPE >::crackFrontTangent

Definition at line 292 of file ConstantArea.hpp.

◆ currentArea

template<typename TYPE >
TYPE FractureMechanics::ConstantArea::OpAreaJacobian::AuxFunctions< TYPE >::currentArea

Definition at line 288 of file ConstantArea.hpp.

◆ currentCoords

template<typename TYPE >
ublas::vector<TYPE> FractureMechanics::ConstantArea::OpAreaJacobian::AuxFunctions< TYPE >::currentCoords

Definition at line 282 of file ConstantArea.hpp.

◆ currentNormal

template<typename TYPE >
ublas::vector<TYPE> FractureMechanics::ConstantArea::OpAreaJacobian::AuxFunctions< TYPE >::currentNormal

Definition at line 287 of file ConstantArea.hpp.

◆ currentSpinEta

template<typename TYPE >
ublas::matrix<TYPE> FractureMechanics::ConstantArea::OpAreaJacobian::AuxFunctions< TYPE >::currentSpinEta

Definition at line 286 of file ConstantArea.hpp.

◆ currentSpinKsi

template<typename TYPE >
ublas::matrix<TYPE> FractureMechanics::ConstantArea::OpAreaJacobian::AuxFunctions< TYPE >::currentSpinKsi

Definition at line 285 of file ConstantArea.hpp.

◆ currentXdEta

template<typename TYPE >
ublas::vector<TYPE> FractureMechanics::ConstantArea::OpAreaJacobian::AuxFunctions< TYPE >::currentXdEta

Definition at line 284 of file ConstantArea.hpp.

◆ currentXdKsi

template<typename TYPE >
ublas::vector<TYPE> FractureMechanics::ConstantArea::OpAreaJacobian::AuxFunctions< TYPE >::currentXdKsi

Definition at line 283 of file ConstantArea.hpp.

◆ N

template<typename TYPE >
MatrixDouble FractureMechanics::ConstantArea::OpAreaJacobian::AuxFunctions< TYPE >::N

Definition at line 269 of file ConstantArea.hpp.

◆ NTN

template<typename TYPE >
MatrixDouble FractureMechanics::ConstantArea::OpAreaJacobian::AuxFunctions< TYPE >::NTN

Definition at line 269 of file ConstantArea.hpp.

◆ referenceArea

template<typename TYPE >
TYPE FractureMechanics::ConstantArea::OpAreaJacobian::AuxFunctions< TYPE >::referenceArea

Definition at line 280 of file ConstantArea.hpp.

◆ referenceCoords

template<typename TYPE >
ublas::vector<TYPE> FractureMechanics::ConstantArea::OpAreaJacobian::AuxFunctions< TYPE >::referenceCoords

Definition at line 273 of file ConstantArea.hpp.

◆ referenceNormal

template<typename TYPE >
ublas::vector<TYPE> FractureMechanics::ConstantArea::OpAreaJacobian::AuxFunctions< TYPE >::referenceNormal

Definition at line 279 of file ConstantArea.hpp.

◆ referenceSpinEta

template<typename TYPE >
ublas::matrix<TYPE> FractureMechanics::ConstantArea::OpAreaJacobian::AuxFunctions< TYPE >::referenceSpinEta

Definition at line 278 of file ConstantArea.hpp.

◆ referenceSpinKsi

template<typename TYPE >
ublas::matrix<TYPE> FractureMechanics::ConstantArea::OpAreaJacobian::AuxFunctions< TYPE >::referenceSpinKsi

Definition at line 277 of file ConstantArea.hpp.

◆ referenceXdEta

template<typename TYPE >
ublas::vector<TYPE> FractureMechanics::ConstantArea::OpAreaJacobian::AuxFunctions< TYPE >::referenceXdEta

Definition at line 276 of file ConstantArea.hpp.

◆ referenceXdKsi

template<typename TYPE >
ublas::vector<TYPE> FractureMechanics::ConstantArea::OpAreaJacobian::AuxFunctions< TYPE >::referenceXdKsi

Definition at line 275 of file ConstantArea.hpp.

◆ tSpin

template<typename TYPE >
FTensor::Tensor2<TYPE, 3, 3> FractureMechanics::ConstantArea::OpAreaJacobian::AuxFunctions< TYPE >::tSpin

Definition at line 391 of file ConstantArea.hpp.


The documentation for this struct was generated from the following file:
MoFEMFunctionReturnHot
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:460
FTensor::Tensor1
Definition: Tensor1_value.hpp:8
FractureMechanics::ConstantArea::OpAreaJacobian::AuxFunctions::Beta
MatrixDouble Beta
Definition: ConstantArea.hpp:271
FractureMechanics::ConstantArea::OpAreaJacobian::AuxFunctions::currentSpinKsi
ublas::matrix< TYPE > currentSpinKsi
Definition: ConstantArea.hpp:285
FractureMechanics::ConstantArea::OpAreaJacobian::AuxFunctions::currentXdEta
ublas::vector< TYPE > currentXdEta
Definition: ConstantArea.hpp:284
FractureMechanics::ConstantArea::OpAreaJacobian::AuxFunctions::crackFrontTangent
ublas::vector< TYPE > crackFrontTangent
Definition: ConstantArea.hpp:292
FractureMechanics::ConstantArea::OpAreaJacobian::AuxFunctions::currentArea
TYPE currentArea
Definition: ConstantArea.hpp:288
FractureMechanics::ConstantArea::OpAreaJacobian::AuxFunctions::crackAreaIncrement
ublas::vector< TYPE > crackAreaIncrement
Definition: ConstantArea.hpp:291
CHKERR
#define CHKERR
Inline error check.
Definition: definitions.h:548
FractureMechanics::ConstantArea::OpAreaJacobian::AuxFunctions::A
ublas::matrix< TYPE > A
Definition: ConstantArea.hpp:290
FractureMechanics::ConstantArea::OpAreaJacobian::AuxFunctions::currentCoords
ublas::vector< TYPE > currentCoords
Definition: ConstantArea.hpp:282
i
FTensor::Index< 'i', SPACE_DIM > i
Definition: hcurl_divergence_operator_2d.cpp:27
FractureMechanics::ConstantArea::OpAreaJacobian::AuxFunctions::tSpin
FTensor::Tensor2< TYPE, 3, 3 > tSpin
Definition: ConstantArea.hpp:391
FractureMechanics::ConstantArea::OpAreaJacobian::AuxFunctions::sPin
PetscErrorCode sPin(ublas::matrix< TYPE > &spin, ublas::vector< TYPE > &vec)
Definition: ConstantArea.hpp:294
FTensor::Index< 'i', 3 >
FractureMechanics::ConstantArea::OpAreaJacobian::AuxFunctions::currentXdKsi
ublas::vector< TYPE > currentXdKsi
Definition: ConstantArea.hpp:283
FTensor::dd
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
FractureMechanics::ConstantArea::OpAreaJacobian::AuxFunctions::currentSpinEta
ublas::matrix< TYPE > currentSpinEta
Definition: ConstantArea.hpp:286
j
FTensor::Index< 'j', 3 > j
Definition: matrix_function.cpp:19
MoFEMFunctionBeginHot
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:453
FractureMechanics::ConstantArea::OpAreaJacobian::AuxFunctions::currentNormal
ublas::vector< TYPE > currentNormal
Definition: ConstantArea.hpp:287
FractureMechanics::ConstantArea::OpAreaJacobian::AuxFunctions::Bksi
MatrixDouble Bksi
Definition: ConstantArea.hpp:270