129 {
131
132 auto &nf = AssemblyDomainEleOp::locF;
133
134
135
136 const double area = getMeasure();
137
138
139 const int nb_integration_points = getGaussPts().size2();
140
141 auto t_w = getFTensor0IntegrationWeight();
142
143 auto t_coords = getFTensor1CoordsAtGaussPts();
144
146
148
149
151
153
154
155 for (int gg = 0; gg != nb_integration_points; gg++) {
156 const double a = t_w * area;
157 double body_source =
159
160
161 for (int rr = 0; rr != AssemblyDomainEleOp::nbRows; rr++) {
162 nf[rr] +=
163 (-t_base * body_source +
164 t_grad_base(
i) * t_field_grad(
i) * (1 + t_field * t_field)) *
166
167
168 ++t_base;
169
170 ++t_grad_base;
171 }
172
173
174 ++t_w;
175
176 ++t_coords;
177
178 ++t_field;
179
180 ++t_field_grad;
181
182 }
183
185 }
#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::Tensor1< FTensor::PackPtr< T *, S >, Tensor_Dim > getFTensor1FromMat(ublas::matrix< T, L, A > &data)
Get tensor rank 1 (vector) form data matrix.
static auto getFTensor0FromVec(ublas::vector< T, A > &data)
Get tensor rank 0 (scalar) form data vector.
FTensor::Index< 'i', 2 > i
FTensor::Tensor1< FTensor::PackPtr< double *, Tensor_Dim >, Tensor_Dim > getFTensor1DiffN(const FieldApproximationBase base)
Get derivatives of base functions.
FTensor::Tensor0< FTensor::PackPtr< double *, 1 > > getFTensor0N(const FieldApproximationBase base)
Get base function as Tensor0.