533 {
535
538 constexpr auto size_symm = (DIM * (DIM + 1)) / 2;
540
541 const double vol = getMeasure();
542 auto t_w = getFTensor0IntegrationWeight();
543 auto t_coords = getFTensor1CoordsAtGaussPts();
544 auto t_base = data.getFTensor0N();
545 auto t_diff_base = data.getFTensor1DiffN<
SPACE_DIM>();
546
547#ifndef NDEBUG
548 if (data.getDiffN().size1() != data.getN().size1())
550 if (data.getDiffN().size2() != data.getN().size2() *
SPACE_DIM) {
552 << "Side " << rowSide << " " << CN::EntityTypeName(rowType);
553 MOFEM_LOG(
"SELF", Sev::error) << data.getN();
554 MOFEM_LOG(
"SELF", Sev::error) << data.getDiffN();
556 }
557#endif
558
559 auto t_EP = getFTensor2SymmetricFromMat<SPACE_DIM>(*
EPPtr);
560
561
563
565 auto &nf = AssemblyDomainEleOp::locF;
566
567 for (int gg = 0; gg != nbIntegrationPts; ++gg) {
568
570 t_coords(1), t_coords(2));
571 t_set_EP(1, 1) = t_set_EP(0, 0) - 0.01;
572 t_set_EP(0, 1) = t_set_EP(0, 0) - 0.02;
573
574
575
576
577
578
579
580 const double alpha = t_w * vol;
581
583 t_set_EP_L(L) = alpha * t_set_EP(
i,
j) * t_L(
i,
j, L);
584
585 auto t_nf = getFTensor1FromArray<size_symm, size_symm>(nf);
586 int bb = 0;
587 for (; bb != AssemblyDomainEleOp::nbRows /
size_symm; ++bb) {
588 t_nf(L) -= t_base * (t_set_EP_L(L));
589 ++t_base;
590 ++t_diff_base;
591 ++t_nf;
592 }
593
594 for (; bb < nbRowBaseFunctions; ++bb) {
595 ++t_base;
596 ++t_diff_base;
597 }
598
599 ++t_EP;
600
601
602 ++t_coords;
603 ++t_w;
604 }
605
607 }
#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 >)
auto init_T
Initialisation function for temperature field.