994 {
996
997 if (OP::entsPtr) {
998 if (OP::entsPtr->find(this->getFEEntityHandle()) == OP::entsPtr->end())
1000 }
1001
1002#ifndef NDEBUG
1003 if (!BASE::brokenBaseSideData) {
1005 }
1006#endif
1007
1008 auto do_work_rhs = [this](int row_side, EntityType row_type,
1009 EntitiesFieldData::EntData &row_data) {
1011
1012 OP::nbRows = row_data.getIndices().size();
1013 if (!OP::nbRows)
1015
1016 OP::nbIntegrationPts = OP::getGaussPts().size2();
1017
1018 OP::nbRowBaseFunctions = OP::getNbOfBaseFunctions(row_data);
1019
1020 OP::locF.resize(OP::nbRows, false);
1021 OP::locF.clear();
1022
1023 CHKERR this->iNtegrate(row_data);
1024
1025 CHKERR this->aSsemble(row_data);
1027 };
1028
1029 auto do_work_lhs = [this](int row_side, int col_side, EntityType row_type,
1030 EntityType col_type,
1031 EntitiesFieldData::EntData &row_data,
1032 EntitiesFieldData::EntData &col_data) {
1034
1035 auto check_if_assemble_transpose = [&] {
1036 if (this->sYmm) {
1037 if (OP::rowSide != OP::colSide || OP::rowType != OP::colType)
1038 return true;
1039 else
1040 return false;
1041 } else if (OP::assembleTranspose) {
1042 return true;
1043 }
1044 return false;
1045 };
1046
1047 OP::rowSide = row_side;
1048 OP::rowType = row_type;
1049 OP::colSide = col_side;
1050 OP::colType = col_type;
1051 OP::nbCols = col_data.getIndices().size();
1052 OP::locMat.resize(OP::nbRows, OP::nbCols, false);
1053 OP::locMat.clear();
1054 CHKERR this->iNtegrate(row_data, col_data);
1055 CHKERR this->aSsemble(row_data, col_data, check_if_assemble_transpose());
1057 };
1058
1059 switch (OP::opType) {
1060 case OP::OPROW:
1061
1062 OP::nbRows = row_data.getIndices().size();
1063 if (!OP::nbRows)
1065 OP::nbIntegrationPts = OP::getGaussPts().size2();
1066 OP::nbRowBaseFunctions = OP::getNbOfBaseFunctions(row_data);
1067
1068 if (!OP::nbRows)
1070
1071 for (
auto &bd : *
BASE::brokenBaseSideData) {
1072
1073#ifndef NDEBUG
1074 if (!bd.getData().getNSharedPtr(bd.getData().getBase())) {
1076 "base functions not set");
1077 }
1078#endif
1079
1081
1082
1083 row_side, bd.getSide(),
1084
1085
1086 row_type, bd.getType(),
1087
1088
1089 row_data, bd.getData()
1090
1091 );
1092 }
1093
1094 break;
1095 case OP::OPSPACE:
1096 for (
auto &bd : *
BASE::brokenBaseSideData) {
1097 CHKERR do_work_rhs(bd.getSide(), bd.getType(), bd.getData());
1098 }
1099 break;
1100 default:
1102 (std::string("wrong op type ") +
1103 OpBaseDerivativesBase::OpTypeNames[OP::opType])
1104 .c_str());
1105 }
1106
1108 }
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
#define CHK_MOAB_THROW(err, msg)
Check error code of MoAB function and throw MoFEM exception.
@ MOFEM_DATA_INCONSISTENCY
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
#define CHKERR
Inline error check.
OpBrokenBaseImpl< OP > BASE