1077 {
1079
1080 if (OP::entsPtr) {
1081 if (OP::entsPtr->find(this->getFEEntityHandle()) == OP::entsPtr->end())
1083 }
1084
1085#ifndef NDEBUG
1086 if (!BASE::brokenBaseSideData) {
1088 }
1089#endif
1090
1091 auto do_work_rhs = [
this](
int, EntityType,
1092 EntitiesFieldData::EntData &row_data) {
1094
1095 OP::nbRows = row_data.getIndices().size();
1096 if (!OP::nbRows)
1098
1099 OP::nbIntegrationPts = OP::getGaussPts().size2();
1100
1101 OP::nbRowBaseFunctions = OP::getNbOfBaseFunctions(row_data);
1102
1103 OP::locF.resize(OP::nbRows, false);
1104 OP::locF.clear();
1105
1106 CHKERR this->iNtegrate(row_data);
1107
1108 CHKERR this->aSsemble(row_data);
1110 };
1111
1112 auto do_work_lhs = [this](int row_side, int col_side, EntityType row_type,
1113 EntityType col_type,
1114 EntitiesFieldData::EntData &row_data,
1115 EntitiesFieldData::EntData &col_data) {
1117
1118 auto check_if_assemble_transpose = [&] {
1119 if (this->sYmm) {
1120 if (OP::rowSide != OP::colSide || OP::rowType != OP::colType)
1121 return true;
1122 else
1123 return false;
1124 } else if (OP::assembleTranspose) {
1125 return true;
1126 }
1127 return false;
1128 };
1129
1130 OP::rowSide = row_side;
1131 OP::rowType = row_type;
1132 OP::colSide = col_side;
1133 OP::colType = col_type;
1134 OP::nbCols = col_data.getIndices().size();
1135 OP::locMat.resize(OP::nbRows, OP::nbCols, false);
1136 OP::locMat.clear();
1137 CHKERR this->iNtegrate(row_data, col_data);
1138 CHKERR this->aSsemble(row_data, col_data, check_if_assemble_transpose());
1140 };
1141
1142 switch (OP::opType) {
1143 case OP::OPROW:
1144
1145 OP::nbRows = row_data.getIndices().size();
1146 if (!OP::nbRows)
1148 OP::nbIntegrationPts = OP::getGaussPts().size2();
1149 OP::nbRowBaseFunctions = OP::getNbOfBaseFunctions(row_data);
1150
1151 if (!OP::nbRows)
1153
1154 for (
auto &bd : *
BASE::brokenBaseSideData) {
1155
1156#ifndef NDEBUG
1157 if (!bd.getData().getNSharedPtr(bd.getData().getBase())) {
1159 "base functions not set");
1160 }
1161#endif
1162
1164
1165
1166 row_side, bd.getSide(),
1167
1168
1169 row_type, bd.getType(),
1170
1171
1172 row_data, bd.getData()
1173
1174 );
1175 }
1176
1177 break;
1178 case OP::OPSPACE:
1179 for (
auto &bd : *
BASE::brokenBaseSideData) {
1180 fluxMatPtr = boost::shared_ptr<MatrixDouble>(BASE::brokenBaseSideData,
1181 &bd.getFlux());
1182 CHKERR do_work_rhs(bd.getSide(), bd.getType(), bd.getData());
1183 }
1184 break;
1185 default:
1188 (std::string("wrong op type ") +
1189 OpBaseDerivativesBase::OpTypeNames[static_cast<unsigned char>(
1190 OP::opType)])
1191 .c_str());
1192 }
1193
1195 }
#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