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