670 {
672
673 auto &locMat = AssemblyDomainEleOp::locMat;
674
675 const auto nb_integration_pts = row_data.getN().size1();
676 const auto nb_row_base_functions = row_data.getN().size2();
677 auto t_w = this->getFTensor0IntegrationWeight();
678
680 auto t_row_diff_base = row_data.getFTensor1DiffN<DIM>();
682 auto t_grad =
684 auto t_logC_dC =
688
696
698 t_coeff_exp(
i,
j) = 0;
700 t_coeff_exp(d, d) = (*coeffExpansionPtr)[
d];
701 }
702
703 t_eigen_strain(
i,
j) = (t_D(
i,
j,
k,
l) * t_coeff_exp(
k,
l));
704
705 for (auto gg = 0; gg != nb_integration_pts; ++gg) {
706
708
709 double alpha = this->getMeasure() * t_w;
710 auto rr = 0;
711 for (; rr != AssemblyDomainEleOp::nbRows / DIM; ++rr) {
712 auto t_mat =
714 DataLayoutTraits<DataLayout::CoeffsByGauss>>(
715 locMat, rr * DIM);
716 auto t_col_base = col_data.getFTensor0N(gg, 0);
717 for (auto cc = 0; cc != AssemblyDomainEleOp::nbCols; cc++) {
718#ifdef HENCKY_SMALL_STRAIN
720 (t_row_diff_base(
j) * t_eigen_strain(
i,
j)) * (t_col_base * alpha);
721#else
722 t_mat(
i) -= (t_row_diff_base(
j) *
723 (t_F(
i, o) * ((t_D(
m,
n,
k,
l) * t_coeff_exp(
k,
l)) *
724 t_logC_dC(
m,
n, o,
j)))) *
725 (t_col_base * alpha);
726#endif
727
728 ++t_mat;
729 ++t_col_base;
730 }
731
732 ++t_row_diff_base;
733 }
734 for (; rr != nb_row_base_functions; ++rr)
735 ++t_row_diff_base;
736
737 ++t_w;
738 ++t_grad;
739 ++t_logC_dC;
740 ++t_D;
741 }
742
744}
#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