618 {
620
621 auto &locMat = AssemblyDomainEleOp::locMat;
622
623 const auto nb_integration_pts = row_data.getN().size1();
624 const auto nb_row_base_functions = row_data.getN().size2();
625 auto t_w = this->getFTensor0IntegrationWeight();
626
628 auto t_row_diff_base = row_data.getFTensor1DiffN<DIM>();
630 auto t_grad =
632 auto t_logC_dC =
636
644
646 t_coeff_exp(
i,
j) = 0;
648 t_coeff_exp(d, d) = (*coeffExpansionPtr)[
d];
649 }
650
651 t_eigen_strain(
i,
j) = (t_D(
i,
j,
k,
l) * t_coeff_exp(
k,
l));
652
653 for (auto gg = 0; gg != nb_integration_pts; ++gg) {
654
656
657 double alpha = this->getMeasure() * t_w;
658 auto rr = 0;
659 for (; rr != AssemblyDomainEleOp::nbRows / DIM; ++rr) {
660 auto t_mat =
662 DataLayoutTraits<DataLayout::CoeffsByGauss>>(
663 locMat, rr * DIM);
664 auto t_col_base = col_data.getFTensor0N(gg, 0);
665 for (auto cc = 0; cc != AssemblyDomainEleOp::nbCols; cc++) {
666#ifdef HENCKY_SMALL_STRAIN
668 (t_row_diff_base(
j) * t_eigen_strain(
i,
j)) * (t_col_base * alpha);
669#else
670 t_mat(
i) -= (t_row_diff_base(
j) *
671 (t_F(
i, o) * ((t_D(
m,
n,
k,
l) * t_coeff_exp(
k,
l)) *
672 t_logC_dC(
m,
n, o,
j)))) *
673 (t_col_base * alpha);
674#endif
675
676 ++t_mat;
677 ++t_col_base;
678 }
679
680 ++t_row_diff_base;
681 }
682 for (; rr != nb_row_base_functions; ++rr)
683 ++t_row_diff_base;
684
685 ++t_w;
686 ++t_grad;
687 ++t_logC_dC;
688 ++t_D;
689 }
690
692}
#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
const double n
refractive index of diffusive medium
FTensor::Index< 'l', 3 > l
FTensor::Index< 'j', 3 > j
FTensor::Index< 'k', 3 > k
auto getFTensor1FromMat(M &data, int rr=0, int cc=0)
Get tensor rank 1 (vector) form data matrix.
FTensor::Index< 'm', 3 > m