1115 {
1117
1118 if (OP::entsPtr) {
1119 if (OP::entsPtr->find(this->getFEEntityHandle()) == OP::entsPtr->end())
1121 }
1122
1123#ifndef NDEBUG
1124 if (!BASE::brokenBaseSideData) {
1126 }
1127#endif
1128
1129 auto do_work_rhs = [
this](
int, EntityType,
1130 EntitiesFieldData::EntData &row_data) {
1132
1133 OP::nbRows = row_data.getIndices().size();
1134 if (!OP::nbRows)
1136
1137 OP::nbIntegrationPts = OP::getGaussPts().size2();
1138
1139 OP::nbRowBaseFunctions = OP::getNbOfBaseFunctions(row_data);
1140
1141 OP::locF.resize(OP::nbRows, false);
1142 OP::locF.clear();
1143
1144 CHKERR this->iNtegrate(row_data);
1145
1146 CHKERR this->aSsemble(row_data);
1148 };
1149
1150 auto do_work_lhs = [this](int row_side, int col_side, EntityType row_type,
1151 EntityType col_type,
1152 EntitiesFieldData::EntData &row_data,
1153 EntitiesFieldData::EntData &col_data) {
1155
1156 auto check_if_assemble_transpose = [&] {
1157 if (this->sYmm) {
1158 if (OP::rowSide != OP::colSide || OP::rowType != OP::colType)
1159 return true;
1160 else
1161 return false;
1162 } else if (OP::assembleTranspose) {
1163 return true;
1164 }
1165 return false;
1166 };
1167
1168 OP::rowSide = row_side;
1169 OP::rowType = row_type;
1170 OP::colSide = col_side;
1171 OP::colType = col_type;
1172 OP::nbCols = col_data.getIndices().size();
1173 OP::locMat.resize(OP::nbRows, OP::nbCols, false);
1174 OP::locMat.clear();
1175 CHKERR this->iNtegrate(row_data, col_data);
1176 CHKERR this->aSsemble(row_data, col_data, check_if_assemble_transpose());
1178 };
1179
1180 switch (OP::opType) {
1181 case OP::OPROW:
1182
1183 OP::nbRows = row_data.getIndices().size();
1184 if (!OP::nbRows)
1186 OP::nbIntegrationPts = OP::getGaussPts().size2();
1187 OP::nbRowBaseFunctions = OP::getNbOfBaseFunctions(row_data);
1188
1189 if (!OP::nbRows)
1191
1192 for (
auto &bd : *
BASE::brokenBaseSideData) {
1193
1194#ifndef NDEBUG
1195 if (!bd.getData().getNSharedPtr(bd.getData().getBase())) {
1197 "base functions not set");
1198 }
1199#endif
1200
1202
1203
1204 row_side, bd.getSide(),
1205
1206
1207 row_type, bd.getType(),
1208
1209
1210 row_data, bd.getData()
1211
1212 );
1213 }
1214
1215 break;
1216 case OP::OPSPACE:
1217 for (
auto &bd : *
BASE::brokenBaseSideData) {
1218 fluxMatPtr = boost::shared_ptr<MatrixDouble>(BASE::brokenBaseSideData,
1219 &bd.getFlux());
1220 CHKERR do_work_rhs(bd.getSide(), bd.getType(), bd.getData());
1221 }
1222 break;
1223 default:
1226 (std::string("wrong op type ") +
1227 OpBaseDerivativesBase::OpTypeNames[static_cast<unsigned char>(
1228 OP::opType)])
1229 .c_str());
1230 }
1231
1233 }
#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