610 {
612
613 const double vol = getMeasure();
614 auto t_w = getFTensor0IntegrationWeight();
615 auto t_coords = getFTensor1CoordsAtGaussPts();
616 auto t_base = data.getFTensor0N();
617 auto t_diff_base = data.getFTensor1DiffN<
SPACE_DIM>();
618
619#ifndef NDEBUG
620 if(data.getDiffN().size1() != data.getN().size1())
622 if (data.getDiffN().size2() != data.getN().size2() *
SPACE_DIM) {
624 << "Side " << rowSide << " " << CN::EntityTypeName(rowType);
625 MOFEM_LOG(
"SELF", Sev::error) << data.getN();
626 MOFEM_LOG(
"SELF", Sev::error) << data.getDiffN();
628 }
629#endif
630
632
633 auto t_h = getFTensor0FromVec(*
hPtr);
634 auto t_grad_g = getFTensor1FromMat<SPACE_DIM>(*
gradGPtr);
635
636 for (int gg = 0; gg != nbIntegrationPts; ++gg) {
637
638 const double r = t_coords(0);
640
641 const double set_h =
init_h(t_coords(0), t_coords(1), t_coords(2));
643
644 int bb = 0;
645 for (; bb != nbRows; ++bb) {
646 locF[bb] += (t_base *
alpha) * (t_h - set_h);
647 locF[bb] += (t_diff_base(
i) *
m) * t_grad_g(
i);
648 ++t_base;
649 ++t_diff_base;
650 }
651
652 for (; bb < nbRowBaseFunctions; ++bb) {
653 ++t_base;
654 ++t_diff_base;
655 }
656
657 ++t_h;
658 ++t_grad_g;
659
660 ++t_coords;
661 ++t_w;
662 }
663
664 } else {
665
666 auto t_dot_h = getFTensor0FromVec(*
dotHPtr);
667 auto t_h = getFTensor0FromVec(*
hPtr);
668 auto t_u = getFTensor1FromMat<U_FIELD_DIM>(*
uPtr);
669 auto t_grad_h = getFTensor1FromMat<SPACE_DIM>(*
gradHPtr);
670 auto t_grad_g = getFTensor1FromMat<SPACE_DIM>(*
gradGPtr);
671
672 for (int gg = 0; gg != nbIntegrationPts; ++gg) {
673
674 const double r = t_coords(0);
676
678
679 int bb = 0;
680 for (; bb != nbRows; ++bb) {
681 locF[bb] += (t_base *
alpha) * (t_dot_h);
682 locF[bb] += (t_base *
alpha) * (t_grad_h(
i) * t_u(
i));
683 locF[bb] += (t_diff_base(
i) * t_grad_g(
i)) *
m;
684 ++t_base;
685 ++t_diff_base;
686 }
687
688 for (; bb < nbRowBaseFunctions; ++bb) {
689 ++t_base;
690 ++t_diff_base;
691 }
692
693 ++t_dot_h;
694 ++t_h;
695 ++t_grad_g;
696 ++t_u;
697 ++t_grad_h;
698
699 ++t_coords;
700 ++t_w;
701 }
702 }
703
705 }
#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()
FTensor::Index< 'm', SPACE_DIM > m
#define MOFEM_LOG(channel, severity)
Log.
FTensor::Index< 'i', SPACE_DIM > i
constexpr IntegrationType I