v0.15.4
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 993 of file EshelbianOperators.hpp.

Member Typedef Documentation

◆ BASE

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

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

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