1017 {
1019
1020 if (OP::entsPtr) {
1021 if (OP::entsPtr->find(this->getFEEntityHandle()) == OP::entsPtr->end())
1023 }
1024
1025#ifndef NDEBUG
1026 if (!BASE::brokenBaseSideData) {
1028 }
1029#endif
1030
1031 auto do_work_rhs = [this](int row_side, EntityType row_type,
1032 EntitiesFieldData::EntData &row_data) {
1034
1035 OP::nbRows = row_data.getIndices().size();
1036 if (!OP::nbRows)
1038
1039 OP::nbIntegrationPts = OP::getGaussPts().size2();
1040
1041 OP::nbRowBaseFunctions = OP::getNbOfBaseFunctions(row_data);
1042
1043 OP::locF.resize(OP::nbRows, false);
1044 OP::locF.clear();
1045
1046 CHKERR this->iNtegrate(row_data);
1047
1048 CHKERR this->aSsemble(row_data);
1050 };
1051
1052 auto do_work_lhs = [this](int row_side, int col_side, EntityType row_type,
1053 EntityType col_type,
1054 EntitiesFieldData::EntData &row_data,
1055 EntitiesFieldData::EntData &col_data) {
1057
1058 auto check_if_assemble_transpose = [&] {
1059 if (this->sYmm) {
1060 if (OP::rowSide != OP::colSide || OP::rowType != OP::colType)
1061 return true;
1062 else
1063 return false;
1064 } else if (OP::assembleTranspose) {
1065 return true;
1066 }
1067 return false;
1068 };
1069
1070 OP::rowSide = row_side;
1071 OP::rowType = row_type;
1072 OP::colSide = col_side;
1073 OP::colType = col_type;
1074 OP::nbCols = col_data.getIndices().size();
1075 OP::locMat.resize(OP::nbRows, OP::nbCols, false);
1076 OP::locMat.clear();
1077 CHKERR this->iNtegrate(row_data, col_data);
1078 CHKERR this->aSsemble(row_data, col_data, check_if_assemble_transpose());
1080 };
1081
1082 switch (OP::opType) {
1083 case OP::OPROW:
1084
1085 OP::nbRows = row_data.getIndices().size();
1086 if (!OP::nbRows)
1088 OP::nbIntegrationPts = OP::getGaussPts().size2();
1089 OP::nbRowBaseFunctions = OP::getNbOfBaseFunctions(row_data);
1090
1091 if (!OP::nbRows)
1093
1094 for (
auto &bd : *
BASE::brokenBaseSideData) {
1095
1096#ifndef NDEBUG
1097 if (!bd.getData().getNSharedPtr(bd.getData().getBase())) {
1099 "base functions not set");
1100 }
1101#endif
1102
1104
1105
1106 row_side, bd.getSide(),
1107
1108
1109 row_type, bd.getType(),
1110
1111
1112 row_data, bd.getData()
1113
1114 );
1115 }
1116
1117 break;
1118 case OP::OPSPACE:
1119 for (
auto &bd : *
BASE::brokenBaseSideData) {
1120 fluxMatPtr = boost::shared_ptr<MatrixDouble>(BASE::brokenBaseSideData,
1121 &bd.getFlux());
1122 CHKERR do_work_rhs(bd.getSide(), bd.getType(), bd.getData());
1123 }
1124 break;
1125 default:
1127 (std::string("wrong op type ") +
1128 OpBaseDerivativesBase::OpTypeNames[OP::opType])
1129 .c_str());
1130 }
1131
1133 }
#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