v0.16.0
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 1011 of file EshelbianOperators.hpp.

Member Typedef Documentation

◆ BASE

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

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

1017 {
1019
1020 if (OP::entsPtr) {
1021 if (OP::entsPtr->find(this->getFEEntityHandle()) == OP::entsPtr->end())
1023 }
1024
1025#ifndef NDEBUG
1026 if (!BASE::brokenBaseSideData) {
1027 SETERRQ(PETSC_COMM_SELF, MOFEM_IMPOSSIBLE_CASE, "space not set");
1028 }
1029#endif // NDEBUG
1030
1031 auto do_work_rhs = [this](int row_side, EntityType row_type,
1032 EntitiesFieldData::EntData &row_data) {
1034 // get number of dofs on row
1035 OP::nbRows = row_data.getIndices().size();
1036 if (!OP::nbRows)
1038 // get number of integration points
1039 OP::nbIntegrationPts = OP::getGaussPts().size2();
1040 // get row base functions
1041 OP::nbRowBaseFunctions = OP::getNbOfBaseFunctions(row_data);
1042 // resize and clear the right hand side vector
1043 OP::locF.resize(OP::nbRows, false);
1044 OP::locF.clear();
1045 // integrate local vector
1046 CHKERR this->iNtegrate(row_data);
1047 // assemble local vector
1048 CHKERR this->aSsemble(row_data);
1050 };
1051
1052 auto do_work_lhs = [this](int row_side, int col_side, EntityType row_type,
1053 EntityType col_type,
1054 EntitiesFieldData::EntData &row_data,
1055 EntitiesFieldData::EntData &col_data) {
1057
1058 auto check_if_assemble_transpose = [&] {
1059 if (this->sYmm) {
1060 if (OP::rowSide != OP::colSide || OP::rowType != OP::colType)
1061 return true;
1062 else
1063 return false;
1064 } else if (OP::assembleTranspose) {
1065 return true;
1066 }
1067 return false;
1068 };
1069
1070 OP::rowSide = row_side;
1071 OP::rowType = row_type;
1072 OP::colSide = col_side;
1073 OP::colType = col_type;
1074 OP::nbCols = col_data.getIndices().size();
1075 OP::locMat.resize(OP::nbRows, OP::nbCols, false);
1076 OP::locMat.clear();
1077 CHKERR this->iNtegrate(row_data, col_data);
1078 CHKERR this->aSsemble(row_data, col_data, check_if_assemble_transpose());
1080 };
1081
1082 switch (OP::opType) {
1083 case OP::OPROW:
1084
1085 OP::nbRows = row_data.getIndices().size();
1086 if (!OP::nbRows)
1088 OP::nbIntegrationPts = OP::getGaussPts().size2();
1089 OP::nbRowBaseFunctions = OP::getNbOfBaseFunctions(row_data);
1090
1091 if (!OP::nbRows)
1093
1094 for (auto &bd : *BASE::brokenBaseSideData) {
1095
1096#ifndef NDEBUG
1097 if (!bd.getData().getNSharedPtr(bd.getData().getBase())) {
1098 SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY,
1099 "base functions not set");
1100 }
1101#endif
1102
1103 CHKERR do_work_lhs(
1104
1105 // side
1106 row_side, bd.getSide(),
1107
1108 // type
1109 row_type, bd.getType(),
1110
1111 // row_data
1112 row_data, bd.getData()
1113
1114 );
1115 }
1116
1117 break;
1118 case OP::OPSPACE:
1119 for (auto &bd : *BASE::brokenBaseSideData) {
1120 fluxMatPtr = boost::shared_ptr<MatrixDouble>(BASE::brokenBaseSideData,
1121 &bd.getFlux());
1122 CHKERR do_work_rhs(bd.getSide(), bd.getType(), bd.getData());
1123 }
1124 break;
1125 default:
1127 (std::string("wrong op type ") +
1128 OpBaseDerivativesBase::OpTypeNames[OP::opType])
1129 .c_str());
1130 }
1131
1133 }
#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 1136 of file EshelbianOperators.hpp.


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