75 {
77
78 auto t_w = getFTensor0IntegrationWeight();
80
81 auto t_x0 = getFTensor1CoordsAtGaussPts();
82 auto t_x = getFTensor1FromMat<3>(*
xPtr);
83 auto t_dot_x = getFTensor1FromMat<3>(*
xDotPtr);
84 auto t_normal = getFTensor1NormalsAtGaussPts();
85
86 for (int gg = 0; gg != nbIntegrationPts; gg++) {
87
92 t_P(
i,
j) = t_n(
i) * t_n(
j);
94
95 auto t_J_res =
res_J_dx(t_x(0), t_x(1), t_x(2));
96
97 const double alpha = t_w;
98 auto t_nf = getFTensor1FromArray<3, 3>(locF);
99 double l = std::sqrt(t_normal(
i) * t_normal(
i));
100
103 alpha *
l * ((t_P(
i,
k) * t_J_res(
k) + t_Q(
i,
k) * t_dot_x(
k)));
104
105 int rr = 0;
106 for (; rr != nbRows / 3; ++rr) {
107
108 t_nf(
j) += t_row_base * t_res(
j);
109
110 ++t_row_base;
111 ++t_nf;
112 }
113 for (; rr < nbRowBaseFunctions; ++rr) {
114 ++t_row_base;
115 }
116
117 ++t_w;
118 ++t_x;
119 ++t_dot_x;
120 ++t_x0;
121 ++t_normal;
122 }
123
125 }
FTensor::Index< 'j', 3 > j
FTensor::Index< 'i', 3 > i
FTensor::Index< 'k', 3 > k
Tensor1< T, Tensor_Dim > normalize()
#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< 'l', 3 > l
FTensor::Tensor0< FTensor::PackPtr< double *, 1 > > getFTensor0N(const FieldApproximationBase base)
Get base function as Tensor0.