v0.15.5
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 997 of file EshelbianOperators.hpp.

Member Typedef Documentation

◆ BASE

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

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

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) {
1013 SETERRQ(PETSC_COMM_SELF, MOFEM_IMPOSSIBLE_CASE, "space not set");
1014 }
1015#endif // NDEBUG
1016
1017 auto do_work_rhs = [this](int row_side, EntityType row_type,
1018 EntitiesFieldData::EntData &row_data) {
1020 // get number of dofs on row
1021 OP::nbRows = row_data.getIndices().size();
1022 if (!OP::nbRows)
1024 // get number of integration points
1025 OP::nbIntegrationPts = OP::getGaussPts().size2();
1026 // get row base functions
1027 OP::nbRowBaseFunctions = OP::getNbOfBaseFunctions(row_data);
1028 // resize and clear the right hand side vector
1029 OP::locF.resize(OP::nbRows, false);
1030 OP::locF.clear();
1031 // integrate local vector
1032 CHKERR this->iNtegrate(row_data);
1033 // assemble local vector
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();
1063 CHKERR this->iNtegrate(row_data, col_data);
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())) {
1084 SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY,
1085 "base functions not set");
1086 }
1087#endif
1088
1089 CHKERR do_work_lhs(
1090
1091 // side
1092 row_side, bd.getSide(),
1093
1094 // type
1095 row_type, bd.getType(),
1096
1097 // row_data
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_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.
MoFEMErrorCode iNtegrate(EntitiesFieldData::EntData &row_data)
OpBrokenBaseImpl< OP > BASE

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