661 {
663
664 auto &locMat = AssemblyDomainEleOp::locMat;
665
666 const auto nb_integration_pts = row_data.getN().size1();
667 const auto nb_row_base_functions = row_data.getN().size2();
668 auto t_w = this->getFTensor0IntegrationWeight();
669
671 auto t_row_diff_base = row_data.getFTensor1DiffN<DIM>();
673 auto t_grad =
675 auto t_logC_dC =
679
687
689 t_coeff_exp(
i,
j) = 0;
691 t_coeff_exp(d, d) = (*coeffExpansionPtr)[
d];
692 }
693
694 t_eigen_strain(
i,
j) = (t_D(
i,
j,
k,
l) * t_coeff_exp(
k,
l));
695
696 for (auto gg = 0; gg != nb_integration_pts; ++gg) {
697
699
700 double alpha = this->getMeasure() * t_w;
701 auto rr = 0;
702 for (; rr != AssemblyDomainEleOp::nbRows / DIM; ++rr) {
703 auto t_mat =
705 DataLayoutTraits<DataLayout::CoeffsByGauss>>(
706 locMat, rr * DIM);
707 auto t_col_base = col_data.getFTensor0N(gg, 0);
708 for (auto cc = 0; cc != AssemblyDomainEleOp::nbCols; cc++) {
709#ifdef HENCKY_SMALL_STRAIN
711 (t_row_diff_base(
j) * t_eigen_strain(
i,
j)) * (t_col_base * alpha);
712#else
713 t_mat(
i) -= (t_row_diff_base(
j) *
714 (t_F(
i, o) * ((t_D(
m,
n,
k,
l) * t_coeff_exp(
k,
l)) *
715 t_logC_dC(
m,
n, o,
j)))) *
716 (t_col_base * alpha);
717#endif
718
719 ++t_mat;
720 ++t_col_base;
721 }
722
723 ++t_row_diff_base;
724 }
725 for (; rr != nb_row_base_functions; ++rr)
726 ++t_row_diff_base;
727
728 ++t_w;
729 ++t_grad;
730 ++t_logC_dC;
731 ++t_D;
732 }
733
735}
#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