v0.16.3
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 1071 of file EshelbianOperators.hpp.

Member Typedef Documentation

◆ BASE

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

Definition at line 1073 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 1076 of file EshelbianOperators.hpp.

1077 {
1079
1080 if (OP::entsPtr) {
1081 if (OP::entsPtr->find(this->getFEEntityHandle()) == OP::entsPtr->end())
1083 }
1084
1085#ifndef NDEBUG
1086 if (!BASE::brokenBaseSideData) {
1087 SETERRQ(PETSC_COMM_SELF, MOFEM_IMPOSSIBLE_CASE, "space not set");
1088 }
1089#endif // NDEBUG
1090
1091 auto do_work_rhs = [this](int, EntityType,
1092 EntitiesFieldData::EntData &row_data) {
1094 // get number of dofs on row
1095 OP::nbRows = row_data.getIndices().size();
1096 if (!OP::nbRows)
1098 // get number of integration points
1099 OP::nbIntegrationPts = OP::getGaussPts().size2();
1100 // get row base functions
1101 OP::nbRowBaseFunctions = OP::getNbOfBaseFunctions(row_data);
1102 // resize and clear the right hand side vector
1103 OP::locF.resize(OP::nbRows, false);
1104 OP::locF.clear();
1105 // integrate local vector
1106 CHKERR this->iNtegrate(row_data);
1107 // assemble local vector
1108 CHKERR this->aSsemble(row_data);
1110 };
1111
1112 auto do_work_lhs = [this](int row_side, int col_side, EntityType row_type,
1113 EntityType col_type,
1114 EntitiesFieldData::EntData &row_data,
1115 EntitiesFieldData::EntData &col_data) {
1117
1118 auto check_if_assemble_transpose = [&] {
1119 if (this->sYmm) {
1120 if (OP::rowSide != OP::colSide || OP::rowType != OP::colType)
1121 return true;
1122 else
1123 return false;
1124 } else if (OP::assembleTranspose) {
1125 return true;
1126 }
1127 return false;
1128 };
1129
1130 OP::rowSide = row_side;
1131 OP::rowType = row_type;
1132 OP::colSide = col_side;
1133 OP::colType = col_type;
1134 OP::nbCols = col_data.getIndices().size();
1135 OP::locMat.resize(OP::nbRows, OP::nbCols, false);
1136 OP::locMat.clear();
1137 CHKERR this->iNtegrate(row_data, col_data);
1138 CHKERR this->aSsemble(row_data, col_data, check_if_assemble_transpose());
1140 };
1141
1142 switch (OP::opType) {
1143 case OP::OPROW:
1144
1145 OP::nbRows = row_data.getIndices().size();
1146 if (!OP::nbRows)
1148 OP::nbIntegrationPts = OP::getGaussPts().size2();
1149 OP::nbRowBaseFunctions = OP::getNbOfBaseFunctions(row_data);
1150
1151 if (!OP::nbRows)
1153
1154 for (auto &bd : *BASE::brokenBaseSideData) {
1155
1156#ifndef NDEBUG
1157 if (!bd.getData().getNSharedPtr(bd.getData().getBase())) {
1158 SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY,
1159 "base functions not set");
1160 }
1161#endif
1162
1163 CHKERR do_work_lhs(
1164
1165 // side
1166 row_side, bd.getSide(),
1167
1168 // type
1169 row_type, bd.getType(),
1170
1171 // row_data
1172 row_data, bd.getData()
1173
1174 );
1175 }
1176
1177 break;
1178 case OP::OPSPACE:
1179 for (auto &bd : *BASE::brokenBaseSideData) {
1180 fluxMatPtr = boost::shared_ptr<MatrixDouble>(BASE::brokenBaseSideData,
1181 &bd.getFlux());
1182 CHKERR do_work_rhs(bd.getSide(), bd.getType(), bd.getData());
1183 }
1184 break;
1185 default:
1188 (std::string("wrong op type ") +
1189 OpBaseDerivativesBase::OpTypeNames[static_cast<unsigned char>(
1190 OP::opType)])
1191 .c_str());
1192 }
1193
1195 }
#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 1198 of file EshelbianOperators.hpp.


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