627 {
629
631
632 const auto nb_integration_pts = row_data.getN().size1();
633 const auto nb_row_base_functions = row_data.getN().size2();
634 auto t_w = this->getFTensor0IntegrationWeight();
635
637 auto t_row_diff_base = row_data.getFTensor1DiffN<DIM>();
639 auto t_grad =
641 auto t_logC_dC =
645
653
655 t_coeff_exp(
i,
j) = 0;
657 t_coeff_exp(d, d) = (*coeffExpansionPtr)[
d];
658 }
659
660 t_eigen_strain(
i,
j) = (t_D(
i,
j,
k,
l) * t_coeff_exp(
k,
l));
661
662 for (auto gg = 0; gg != nb_integration_pts; ++gg) {
663
665
666 double alpha = this->getMeasure() * t_w;
667 auto rr = 0;
669 auto t_mat =
671 DataLayoutTraits<DataLayout::CoeffsByGauss>>(
672 locMat, rr * DIM);
673 auto t_col_base = col_data.getFTensor0N(gg, 0);
675#ifdef HENCKY_SMALL_STRAIN
677 (t_row_diff_base(
j) * t_eigen_strain(
i,
j)) * (t_col_base * alpha);
678#else
679 t_mat(
i) -= (t_row_diff_base(
j) *
680 (t_F(
i, o) * ((t_D(
m,
n,
k,
l) * t_coeff_exp(
k,
l)) *
681 t_logC_dC(
m,
n, o,
j)))) *
682 (t_col_base * alpha);
683#endif
684
685 ++t_mat;
686 ++t_col_base;
687 }
688
689 ++t_row_diff_base;
690 }
691 for (; rr != nb_row_base_functions; ++rr)
692 ++t_row_diff_base;
693
694 ++t_w;
695 ++t_grad;
696 ++t_logC_dC;
697 ++t_D;
698 }
699
701}
#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
int nbRows
number of dofs on rows
MatrixDouble locMat
local entity block matrix
int nbCols
number if dof on column