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 1053 of file EshelbianOperators.hpp.

Member Typedef Documentation

◆ BASE

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

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

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


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