v0.15.0
Loading...
Searching...
No Matches
Public Types | Public Member Functions | 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)
 

Detailed Description

template<typename OP>
struct OpStabBrokenBaseImpl< OP >

Definition at line 988 of file EshelbianOperators.hpp.

Member Typedef Documentation

◆ BASE

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

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

994 {
996
997 if (OP::entsPtr) {
998 if (OP::entsPtr->find(this->getFEEntityHandle()) == OP::entsPtr->end())
1000 }
1001
1002#ifndef NDEBUG
1003 if (!BASE::brokenBaseSideData) {
1004 SETERRQ(PETSC_COMM_SELF, MOFEM_IMPOSSIBLE_CASE, "space not set");
1005 }
1006#endif // NDEBUG
1007
1008 auto do_work_rhs = [this](int row_side, EntityType row_type,
1009 EntitiesFieldData::EntData &row_data) {
1011 // get number of dofs on row
1012 OP::nbRows = row_data.getIndices().size();
1013 if (!OP::nbRows)
1015 // get number of integration points
1016 OP::nbIntegrationPts = OP::getGaussPts().size2();
1017 // get row base functions
1018 OP::nbRowBaseFunctions = OP::getNbOfBaseFunctions(row_data);
1019 // resize and clear the right hand side vector
1020 OP::locF.resize(OP::nbRows, false);
1021 OP::locF.clear();
1022 // integrate local vector
1023 CHKERR this->iNtegrate(row_data);
1024 // assemble local vector
1025 CHKERR this->aSsemble(row_data);
1027 };
1028
1029 auto do_work_lhs = [this](int row_side, int col_side, EntityType row_type,
1030 EntityType col_type,
1031 EntitiesFieldData::EntData &row_data,
1032 EntitiesFieldData::EntData &col_data) {
1034
1035 auto check_if_assemble_transpose = [&] {
1036 if (this->sYmm) {
1037 if (OP::rowSide != OP::colSide || OP::rowType != OP::colType)
1038 return true;
1039 else
1040 return false;
1041 } else if (OP::assembleTranspose) {
1042 return true;
1043 }
1044 return false;
1045 };
1046
1047 OP::rowSide = row_side;
1048 OP::rowType = row_type;
1049 OP::colSide = col_side;
1050 OP::colType = col_type;
1051 OP::nbCols = col_data.getIndices().size();
1052 OP::locMat.resize(OP::nbRows, OP::nbCols, false);
1053 OP::locMat.clear();
1054 CHKERR this->iNtegrate(row_data, col_data);
1055 CHKERR this->aSsemble(row_data, col_data, check_if_assemble_transpose());
1057 };
1058
1059 switch (OP::opType) {
1060 case OP::OPROW:
1061
1062 OP::nbRows = row_data.getIndices().size();
1063 if (!OP::nbRows)
1065 OP::nbIntegrationPts = OP::getGaussPts().size2();
1066 OP::nbRowBaseFunctions = OP::getNbOfBaseFunctions(row_data);
1067
1068 if (!OP::nbRows)
1070
1071 for (auto &bd : *BASE::brokenBaseSideData) {
1072
1073#ifndef NDEBUG
1074 if (!bd.getData().getNSharedPtr(bd.getData().getBase())) {
1075 SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY,
1076 "base functions not set");
1077 }
1078#endif
1079
1080 CHKERR do_work_lhs(
1081
1082 // side
1083 row_side, bd.getSide(),
1084
1085 // type
1086 row_type, bd.getType(),
1087
1088 // row_data
1089 row_data, bd.getData()
1090
1091 );
1092 }
1093
1094 break;
1095 case OP::OPSPACE:
1096 for (auto &bd : *BASE::brokenBaseSideData) {
1097 CHKERR do_work_rhs(bd.getSide(), bd.getType(), bd.getData());
1098 }
1099 break;
1100 default:
1102 (std::string("wrong op type ") +
1103 OpBaseDerivativesBase::OpTypeNames[OP::opType])
1104 .c_str());
1105 }
1106
1108 }
#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.
OpBrokenBaseImpl< OP > BASE

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