v0.16.0
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Protected Attributes | List of all members
OpStabBrokenBaseImpl< OP > Struct Template Reference

#include "users_modules/eshelbian_plasticity/src/EshelbianOperators.hpp"

Inheritance diagram for OpStabBrokenBaseImpl< OP >:
[legend]
Collaboration diagram for OpStabBrokenBaseImpl< OP >:
[legend]

Public Types

using BASE = OpBrokenBaseImpl< OP >
 

Public Member Functions

MoFEMErrorCode doWork (int row_side, EntityType row_type, EntitiesFieldData::EntData &row_data)
 

Protected Attributes

boost::weak_ptr< MatrixDouble > fluxMatPtr
 

Detailed Description

template<typename OP>
struct OpStabBrokenBaseImpl< OP >

Definition at line 1109 of file EshelbianOperators.hpp.

Member Typedef Documentation

◆ BASE

template<typename OP >
using OpStabBrokenBaseImpl< OP >::BASE = OpBrokenBaseImpl<OP>

Definition at line 1111 of file EshelbianOperators.hpp.

Member Function Documentation

◆ doWork()

template<typename OP >
MoFEMErrorCode OpStabBrokenBaseImpl< OP >::doWork ( int  row_side,
EntityType  row_type,
EntitiesFieldData::EntData &  row_data 
)
inline

Definition at line 1114 of file EshelbianOperators.hpp.

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) {
1125 SETERRQ(PETSC_COMM_SELF, MOFEM_IMPOSSIBLE_CASE, "space not set");
1126 }
1127#endif // NDEBUG
1128
1129 auto do_work_rhs = [this](int, EntityType,
1130 EntitiesFieldData::EntData &row_data) {
1132 // get number of dofs on row
1133 OP::nbRows = row_data.getIndices().size();
1134 if (!OP::nbRows)
1136 // get number of integration points
1137 OP::nbIntegrationPts = OP::getGaussPts().size2();
1138 // get row base functions
1139 OP::nbRowBaseFunctions = OP::getNbOfBaseFunctions(row_data);
1140 // resize and clear the right hand side vector
1141 OP::locF.resize(OP::nbRows, false);
1142 OP::locF.clear();
1143 // integrate local vector
1144 CHKERR this->iNtegrate(row_data);
1145 // assemble local vector
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())) {
1196 SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY,
1197 "base functions not set");
1198 }
1199#endif
1200
1201 CHKERR do_work_lhs(
1202
1203 // side
1204 row_side, bd.getSide(),
1205
1206 // type
1207 row_type, bd.getType(),
1208
1209 // row_data
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_IMPOSSIBLE_CASE
Definition definitions.h:35
@ MOFEM_DATA_INCONSISTENCY
Definition definitions.h:31
#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

Member Data Documentation

◆ fluxMatPtr

template<typename OP >
boost::weak_ptr<MatrixDouble> OpStabBrokenBaseImpl< OP >::fluxMatPtr
protected

Definition at line 1236 of file EshelbianOperators.hpp.


The documentation for this struct was generated from the following file: