999 {
1001
1002 if (OP::entsPtr) {
1003 if (OP::entsPtr->find(this->getFEEntityHandle()) == OP::entsPtr->end())
1005 }
1006
1007#ifndef NDEBUG
1008 if (!BASE::brokenBaseSideData) {
1010 }
1011#endif
1012
1013 auto do_work_rhs = [this](int row_side, EntityType row_type,
1014 EntitiesFieldData::EntData &row_data) {
1016
1017 OP::nbRows = row_data.getIndices().size();
1018 if (!OP::nbRows)
1020
1021 OP::nbIntegrationPts = OP::getGaussPts().size2();
1022
1023 OP::nbRowBaseFunctions = OP::getNbOfBaseFunctions(row_data);
1024
1025 OP::locF.resize(OP::nbRows, false);
1026 OP::locF.clear();
1027
1028 CHKERR this->iNtegrate(row_data);
1029
1030 CHKERR this->aSsemble(row_data);
1032 };
1033
1034 auto do_work_lhs = [this](int row_side, int col_side, EntityType row_type,
1035 EntityType col_type,
1036 EntitiesFieldData::EntData &row_data,
1037 EntitiesFieldData::EntData &col_data) {
1039
1040 auto check_if_assemble_transpose = [&] {
1041 if (this->sYmm) {
1042 if (OP::rowSide != OP::colSide || OP::rowType != OP::colType)
1043 return true;
1044 else
1045 return false;
1046 } else if (OP::assembleTranspose) {
1047 return true;
1048 }
1049 return false;
1050 };
1051
1052 OP::rowSide = row_side;
1053 OP::rowType = row_type;
1054 OP::colSide = col_side;
1055 OP::colType = col_type;
1056 OP::nbCols = col_data.getIndices().size();
1057 OP::locMat.resize(OP::nbRows, OP::nbCols, false);
1058 OP::locMat.clear();
1059 CHKERR this->iNtegrate(row_data, col_data);
1060 CHKERR this->aSsemble(row_data, col_data, check_if_assemble_transpose());
1062 };
1063
1064 switch (OP::opType) {
1065 case OP::OPROW:
1066
1067 OP::nbRows = row_data.getIndices().size();
1068 if (!OP::nbRows)
1070 OP::nbIntegrationPts = OP::getGaussPts().size2();
1071 OP::nbRowBaseFunctions = OP::getNbOfBaseFunctions(row_data);
1072
1073 if (!OP::nbRows)
1075
1076 for (
auto &bd : *
BASE::brokenBaseSideData) {
1077
1078#ifndef NDEBUG
1079 if (!bd.getData().getNSharedPtr(bd.getData().getBase())) {
1081 "base functions not set");
1082 }
1083#endif
1084
1086
1087
1088 row_side, bd.getSide(),
1089
1090
1091 row_type, bd.getType(),
1092
1093
1094 row_data, bd.getData()
1095
1096 );
1097 }
1098
1099 break;
1100 case OP::OPSPACE:
1101 for (
auto &bd : *
BASE::brokenBaseSideData) {
1102 CHKERR do_work_rhs(bd.getSide(), bd.getType(), bd.getData());
1103 }
1104 break;
1105 default:
1107 (std::string("wrong op type ") +
1108 OpBaseDerivativesBase::OpTypeNames[OP::opType])
1109 .c_str());
1110 }
1111
1113 }
#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