768 {
770
779
782
783 OP::locF.resize(row_data.getIndices().size(), false);
784 OP::locF.clear();
785
787 auto t_w = this->getFTensor0IntegrationWeight();
788 auto t_t1 = getFTensor1FromMat<3>(*tangent1Ptr);
789 auto t_t2 = getFTensor1FromMat<3>(*tangent2Ptr);
790 auto t_flux = getFTensor2FromMat<3, 3>(bd.getFlux());
792
793 auto nb_base_functions = row_data.getN().size2();
794 auto sense = bd.getSense();
796
797 auto t_diff_base = row_data.getFTensor1DiffN<2>();
799 auto t_vec = getFTensor1FromPtr<3>(&*OP::locF.data().begin());
800 size_t rr = 0;
801 for (; rr != row_data.getIndices().size() / 3; ++rr) {
803 t_normal_diff(
j,
m) =
805 (
t_kd(
i,
m) * t_diff_base(N1));
806 t_normal_diff(
j,
m) +=
809
810 t_vec(
m) += (sense * 0.5 * t_w) * (t_adjoint_lambda(
i) * t_flux(
i,
J)) *
812
813 ++t_diff_base;
814 ++t_vec;
815 }
816 for (; rr < nb_base_functions; ++rr)
817 ++t_diff_base;
818 ++t_w;
819 ++t_t1;
820 ++t_t2;
821 ++t_flux;
822 ++t_adjoint_lambda;
823 }
824 }
825
828
830}
#define FTENSOR_INDEX(DIM, I)
#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< 'J', DIM1 > J
FTensor::Index< 'j', 3 > j
FTensor::Index< 'k', 3 > k
constexpr std::enable_if<(Dim0<=2 &&Dim1<=2), Tensor2_Expr< Levi_Civita< T >, T, Dim0, Dim1, i, j > >::type levi_civita(const Index< i, Dim0 > &, const Index< j, Dim1 > &)
levi_civita functions to make for easy adhoc use
FTensor::Index< 'm', 3 > m
int nbIntegrationPts
number of integration points
boost::shared_ptr< MatrixDouble > adjointLambdaPtr