285 {
287
290 constexpr auto size_symm = (DIM * (DIM + 1)) / 2;
292
293 const double vol = getMeasure();
294 auto t_w = getFTensor0IntegrationWeight();
295 auto t_coords = getFTensor1CoordsAtGaussPts();
296 auto t_base = data.getFTensor0N();
297 auto t_diff_base = data.getFTensor1DiffN<DIM>();
298
299#ifndef NDEBUG
300 if (data.getDiffN().size1() != data.getN().size1())
302 if (data.getDiffN().size2() != data.getN().size2() *
SPACE_DIM) {
304 << "Side " << rowSide << " " << CN::EntityTypeName(rowType);
305 MOFEM_LOG(
"SELF", Sev::error) << data.getN();
306 MOFEM_LOG(
"SELF", Sev::error) << data.getDiffN();
308 }
309#endif
310
312 auto &nf = AssemblyDomainEleOp::locF;
313
314 auto t_old_sol = getFTensor2SymmetricFromMat<DIM>(*
oldSolPtr);
315 auto t_new_sol = getFTensor2SymmetricFromMat<DIM>(*
newSolPtr);
316
317 for (int gg = 0; gg != nbIntegrationPts; ++gg) {
318
319 const double alpha =
320 t_w * vol *
scalarFunction(t_coords(0), t_coords(1), t_coords(2));
321
323 t_old_sol_L(L) = alpha * t_old_sol(
i,
j) * t_L(
i,
j, L);
324
325 auto t_nf = getFTensor1FromArray<size_symm, size_symm>(nf);
326 int bb = 0;
327 for (; bb != AssemblyDomainEleOp::nbRows /
size_symm; ++bb) {
328 t_nf(L) += t_base * (t_old_sol_L(L));
329 ++t_base;
330 ++t_diff_base;
331 ++t_nf;
332 }
333
334 for (; bb < nbRowBaseFunctions; ++bb) {
335 ++t_base;
336 ++t_diff_base;
337 }
338
339 ++t_old_sol;
340 ++t_new_sol;
341
342 ++t_coords;
343 ++t_w;
344 }
345
347 }
#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
FTensor::Index< 'j', 3 > j
auto symm_L_tensor(FTensor::Number< DIM >)