500 {
502
507
509
510
511 const size_t nb_gauss_pts = DomainEleOp::getGaussPts().size2();
512 auto t_D = getFTensor4DdgFromMat<DIM, DIM, S, HenckyTensorLayout<S>>(
514 auto t_logC = getFTensor2SymmetricFromMat<DIM>(
commonDataPtr->matLogC);
515 auto t_logC_dC = getFTensor4DdgFromMat<DIM, DIM>(
commonDataPtr->matLogCdC);
516 auto t_logCPlastic = getFTensor2SymmetricFromMat<DIM>(*
matLogCPlastic);
517 constexpr auto size_symm = (DIM * (DIM + 1)) / 2;
519 commonDataPtr->matFirstPiolaStress.resize(DIM * DIM, nb_gauss_pts,
false);
521 auto t_T = getFTensor2SymmetricFromMat<DIM>(
commonDataPtr->matHenckyStress);
522 auto t_P = getFTensor2FromMat<DIM, DIM>(
commonDataPtr->matFirstPiolaStress);
523 auto t_S =
524 getFTensor2SymmetricFromMat<DIM>(
commonDataPtr->matSecondPiolaStress);
525 auto t_grad = getFTensor2FromMat<DIM, DIM>(*(
commonDataPtr->matGradPtr));
526 auto t_temp = getFTensor0FromVec(*
tempPtr);
527
529 t_coeff_exp(
i,
j) = 0;
531 t_coeff_exp(d, d) = (*coeffExpansionPtr)[
d];
532 }
533
534 for (size_t gg = 0; gg != nb_gauss_pts; ++gg) {
535#ifdef HENCKY_SMALL_STRAIN
537 t_D(
i,
j,
k,
l) * (t_grad(
k,
l) - t_logCPlastic(
k,
l) -
538 t_coeff_exp(
k,
l) * (t_temp - (*refTempPtr)));
539#else
541 t_D(
i,
j,
k,
l) * (t_logC(
k,
l) - t_logCPlastic(
k,
l) -
542 t_coeff_exp(
k,
l) * (t_temp - (*refTempPtr)));
545 t_S(
k,
l) = t_T(
i,
j) * t_logC_dC(
i,
j,
k,
l);
546 t_P(
i,
l) = t_F(
i,
k) * t_S(
k,
l);
547#endif
548 ++t_grad;
549 ++t_logC;
550 ++t_P;
551 ++t_T;
552 ++t_S;
553 ++t_D;
554 ++t_temp;
555 ++t_logCPlastic;
556 }
557
559 }
#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