492 {
494
499
501
502
503 const size_t nb_gauss_pts = DomainEleOp::getGaussPts().size2();
504 auto t_D = getFTensor4DdgFromMat<DIM, DIM, S>(*
commonDataPtr->matDPtr);
505 auto t_logC = getFTensor2SymmetricFromMat<DIM>(
commonDataPtr->matLogC);
506 auto t_logC_dC = getFTensor4DdgFromMat<DIM, DIM>(
commonDataPtr->matLogCdC);
507 auto t_logCPlastic = getFTensor2SymmetricFromMat<DIM>(*
matLogCPlastic);
508 constexpr auto size_symm = (DIM * (DIM + 1)) / 2;
510 commonDataPtr->matFirstPiolaStress.resize(DIM * DIM, nb_gauss_pts,
false);
512 auto t_T = getFTensor2SymmetricFromMat<DIM>(
commonDataPtr->matHenckyStress);
513 auto t_P = getFTensor2FromMat<DIM, DIM>(
commonDataPtr->matFirstPiolaStress);
514 auto t_S =
515 getFTensor2SymmetricFromMat<DIM>(
commonDataPtr->matSecondPiolaStress);
516 auto t_grad = getFTensor2FromMat<DIM, DIM>(*(
commonDataPtr->matGradPtr));
517 auto t_temp = getFTensor0FromVec(*
tempPtr);
518
520 t_coeff_exp(
i,
j) = 0;
522 t_coeff_exp(d, d) = (*coeffExpansionPtr)[
d];
523 }
524
525 for (size_t gg = 0; gg != nb_gauss_pts; ++gg) {
526#ifdef HENCKY_SMALL_STRAIN
528 t_D(
i,
j,
k,
l) * (t_grad(
k,
l) - t_logCPlastic(
k,
l) -
529 t_coeff_exp(
k,
l) * (t_temp - (*refTempPtr)));
530#else
532 t_D(
i,
j,
k,
l) * (t_logC(
k,
l) - t_logCPlastic(
k,
l) -
533 t_coeff_exp(
k,
l) * (t_temp - (*refTempPtr)));
536 t_S(
k,
l) = t_T(
i,
j) * t_logC_dC(
i,
j,
k,
l);
537 t_P(
i,
l) = t_F(
i,
k) * t_S(
k,
l);
538#endif
539 ++t_grad;
540 ++t_logC;
541 ++t_P;
542 ++t_T;
543 ++t_S;
544 ++t_D;
545 ++t_temp;
546 ++t_logCPlastic;
547 }
548
550 }
constexpr int SPACE_DIM
[Define dimension]
#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