746 {
748
749 const double vol = getMeasure();
750 auto t_w = getFTensor0IntegrationWeight();
751 auto t_coords = getFTensor1CoordsAtGaussPts();
752 auto t_row_base = row_data.getFTensor0N();
753 auto t_row_diff_base = row_data.getFTensor1DiffN<
SPACE_DIM>();
754
755#ifndef NDEBUG
756 if (row_data.getDiffN().size1() != row_data.getN().size1())
758 if (row_data.getDiffN().size2() != row_data.getN().size2() *
SPACE_DIM) {
760 << "Side " << rowSide << " " << CN::EntityTypeName(rowType);
761 MOFEM_LOG(
"SELF", Sev::error) << row_data.getN();
762 MOFEM_LOG(
"SELF", Sev::error) << row_data.getDiffN();
764 }
765
766 if (col_data.getDiffN().size1() != col_data.getN().size1())
768 if (col_data.getDiffN().size2() != col_data.getN().size2() *
SPACE_DIM) {
770 << "Side " << rowSide << " " << CN::EntityTypeName(rowType);
771 MOFEM_LOG(
"SELF", Sev::error) << col_data.getN();
772 MOFEM_LOG(
"SELF", Sev::error) << col_data.getDiffN();
774 }
775#endif
776
777 auto t_T = getFTensor0FromVec(*
TPtr);
778
779
780 for (int gg = 0; gg != nbIntegrationPts; gg++) {
781
782 const double alpha = t_w * vol;
783
784 int rr = 0;
785 for (; rr != nbRows; ++rr) {
786
787 auto t_col_base = col_data.getFTensor0N(gg, 0);
788 auto t_col_diff_base = col_data.getFTensor1DiffN<
SPACE_DIM>(gg, 0);
789
790 for (int cc = 0; cc != nbCols; ++cc) {
791
792 locMat(rr, cc) += (t_row_base * t_col_base * alpha);
793
794 ++t_col_base;
795 ++t_col_diff_base;
796 }
797
798 ++t_row_base;
799 ++t_row_diff_base;
800 }
801
802 for (; rr < nbRowBaseFunctions; ++rr) {
803 ++t_row_base;
804 ++t_row_diff_base;
805 }
806
807 ++t_T;
808
809 ++t_w;
810 ++t_coords;
811 }
812
814 }
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.