483 {
485
490
492
493
494 const size_t nb_gauss_pts = DomainEleOp::getGaussPts().size2();
495#ifdef HENCKY_SMALL_STRAIN
496 auto t_D = getFTensor4DdgFromMat<DIM, DIM, S>(*
commonDataPtr->matDPtr);
497#endif
498 auto t_logC = getFTensor2SymmetricFromMat<DIM>(
commonDataPtr->matLogC);
499 auto t_logC_dC = getFTensor4DdgFromMat<DIM, DIM>(
commonDataPtr->matLogCdC);
500 constexpr auto size_symm = (DIM * (DIM + 1)) / 2;
501 commonDataPtr->matFirstPiolaStress.resize(nb_gauss_pts, DIM * DIM,
false);
503 auto t_P = getFTensor2FromMat<DIM, DIM>(
commonDataPtr->matFirstPiolaStress);
504 auto t_T = getFTensor2SymmetricFromMat<DIM>(
commonDataPtr->matHenckyStress);
505 auto t_S =
506 getFTensor2SymmetricFromMat<DIM>(
commonDataPtr->matSecondPiolaStress);
507 auto t_grad = getFTensor2FromMat<DIM, DIM>(*(
commonDataPtr->matGradPtr));
508
509 for (size_t gg = 0; gg != nb_gauss_pts; ++gg) {
510
511#ifdef HENCKY_SMALL_STRAIN
512 t_P(
i,
j) = t_D(
i,
j,
k,
l) * t_grad(
k,
l);
513#else
516 t_S(
k,
l) = t_T(
i,
j) * t_logC_dC(
i,
j,
k,
l);
517 t_P(
i,
l) = t_F(
i,
k) * t_S(
k,
l);
518#endif
519
520 ++t_grad;
521 ++t_logC;
522 ++t_logC_dC;
523 ++t_P;
524 ++t_T;
525 ++t_S;
526#ifdef HENCKY_SMALL_STRAIN
527 ++t_D;
528#endif
529 }
530
532 }
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
FTensor::Index< 'i', SPACE_DIM > i
FTensor::Index< 'l', 3 > l
FTensor::Index< 'j', 3 > j
FTensor::Index< 'k', 3 > k