200 {
202
204
205 const double vol = getMeasure();
206 auto t_w = getFTensor0IntegrationWeight();
207 auto t_coords = getFTensor1CoordsAtGaussPts();
208 auto t_base = data.getFTensor0N();
209 auto t_diff_base = data.getFTensor1DiffN<
SPACE_DIM>();
210
211#ifndef NDEBUG
212 if (data.getDiffN().size1() != data.getN().size1())
214 if (data.getDiffN().size2() != data.getN().size2() *
SPACE_DIM) {
216 << "Side " << rowSide << " " << CN::EntityTypeName(rowType);
217 MOFEM_LOG(
"SELF", Sev::error) << data.getN();
218 MOFEM_LOG(
"SELF", Sev::error) << data.getDiffN();
220 }
221#endif
222
223 auto t_old_sol = getFTensor1FromMat<SPACE_DIM>(*
oldSolPtr);
224 auto t_new_sol = getFTensor1FromMat<SPACE_DIM>(*
newSolPtr);
225
226 for (int gg = 0; gg != nbIntegrationPts; ++gg) {
227
228 const double alpha =
229 t_w * vol *
scalarFunction(t_coords(0), t_coords(1), t_coords(2));
230
231 auto t_nf = getFTensor1FromArray<SPACE_DIM, SPACE_DIM>(locF);
232
233 int bb = 0;
235 t_nf(
i) += (t_base * alpha) * (t_old_sol(
i));
236 ++t_base;
237 ++t_diff_base;
238 ++t_nf;
239 }
240
241 for (; bb < nbRowBaseFunctions; ++bb) {
242 ++t_base;
243 ++t_diff_base;
244 }
245
246 ++t_old_sol;
247 ++t_new_sol;
248
249 ++t_coords;
250 ++t_w;
251 }
252
254 }
#define FTENSOR_INDEX(DIM, I)
constexpr int SPACE_DIM
[Define dimension]
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
@ MOFEM_DATA_INCONSISTENCY
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
#define MOFEM_LOG(channel, severity)
Log.
FTensor::Index< 'i', SPACE_DIM > i