1059 {
1061
1062 if (OP::entsPtr) {
1063 if (OP::entsPtr->find(this->getFEEntityHandle()) == OP::entsPtr->end())
1065 }
1066
1067#ifndef NDEBUG
1068 if (!BASE::brokenBaseSideData) {
1070 }
1071#endif
1072
1073 auto do_work_rhs = [
this](
int, EntityType,
1074 EntitiesFieldData::EntData &row_data) {
1076
1077 OP::nbRows = row_data.getIndices().size();
1078 if (!OP::nbRows)
1080
1081 OP::nbIntegrationPts = OP::getGaussPts().size2();
1082
1083 OP::nbRowBaseFunctions = OP::getNbOfBaseFunctions(row_data);
1084
1085 OP::locF.resize(OP::nbRows, false);
1086 OP::locF.clear();
1087
1088 CHKERR this->iNtegrate(row_data);
1089
1090 CHKERR this->aSsemble(row_data);
1092 };
1093
1094 auto do_work_lhs = [this](int row_side, int col_side, EntityType row_type,
1095 EntityType col_type,
1096 EntitiesFieldData::EntData &row_data,
1097 EntitiesFieldData::EntData &col_data) {
1099
1100 auto check_if_assemble_transpose = [&] {
1101 if (this->sYmm) {
1102 if (OP::rowSide != OP::colSide || OP::rowType != OP::colType)
1103 return true;
1104 else
1105 return false;
1106 } else if (OP::assembleTranspose) {
1107 return true;
1108 }
1109 return false;
1110 };
1111
1112 OP::rowSide = row_side;
1113 OP::rowType = row_type;
1114 OP::colSide = col_side;
1115 OP::colType = col_type;
1116 OP::nbCols = col_data.getIndices().size();
1117 OP::locMat.resize(OP::nbRows, OP::nbCols, false);
1118 OP::locMat.clear();
1119 CHKERR this->iNtegrate(row_data, col_data);
1120 CHKERR this->aSsemble(row_data, col_data, check_if_assemble_transpose());
1122 };
1123
1124 switch (OP::opType) {
1125 case OP::OPROW:
1126
1127 OP::nbRows = row_data.getIndices().size();
1128 if (!OP::nbRows)
1130 OP::nbIntegrationPts = OP::getGaussPts().size2();
1131 OP::nbRowBaseFunctions = OP::getNbOfBaseFunctions(row_data);
1132
1133 if (!OP::nbRows)
1135
1136 for (
auto &bd : *
BASE::brokenBaseSideData) {
1137
1138#ifndef NDEBUG
1139 if (!bd.getData().getNSharedPtr(bd.getData().getBase())) {
1141 "base functions not set");
1142 }
1143#endif
1144
1146
1147
1148 row_side, bd.getSide(),
1149
1150
1151 row_type, bd.getType(),
1152
1153
1154 row_data, bd.getData()
1155
1156 );
1157 }
1158
1159 break;
1160 case OP::OPSPACE:
1161 for (
auto &bd : *
BASE::brokenBaseSideData) {
1162 fluxMatPtr = boost::shared_ptr<MatrixDouble>(BASE::brokenBaseSideData,
1163 &bd.getFlux());
1164 CHKERR do_work_rhs(bd.getSide(), bd.getType(), bd.getData());
1165 }
1166 break;
1167 default:
1170 (std::string("wrong op type ") +
1171 OpBaseDerivativesBase::OpTypeNames[static_cast<unsigned char>(
1172 OP::opType)])
1173 .c_str());
1174 }
1175
1177 }
#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.
boost::weak_ptr< MatrixDouble > fluxMatPtr
OpBrokenBaseImpl< OP > BASE