v0.15.4
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Protected Attributes | List of all members
EshelbianPlasticity::OpBrokenBaseCohesive Struct Reference
Inheritance diagram for EshelbianPlasticity::OpBrokenBaseCohesive:
[legend]
Collaboration diagram for EshelbianPlasticity::OpBrokenBaseCohesive:
[legend]

Public Types

using OP = FormsIntegrators< FaceElementForcesAndSourcesCore::UserDataOperator >::Assembly< A >::OpBrokenBase
 
- Public Types inherited from MoFEM::OpBrokenBaseImpl< OpBase >
using OP = OpBase
 
- Public Types inherited from MoFEM::OpBaseImpl< A, EleOp >
using OpType = typename EleOp::OpType
 
using EntData = EntitiesFieldData::EntData
 
using MatSetValuesHook = boost::function< MoFEMErrorCode(ForcesAndSourcesCore::UserDataOperator *op_ptr, const EntitiesFieldData::EntData &row_data, const EntitiesFieldData::EntData &col_data, MatrixDouble &m)>
 

Public Member Functions

 OpBrokenBaseCohesive (boost::shared_ptr< std::vector< BrokenBaseSideData > > broken_flux_data_ptr, boost::shared_ptr< Range > ents_ptr=nullptr)
 
MoFEMErrorCode doWork (int row_side, EntityType row_type, EntitiesFieldData::EntData &row_data)
 
- Public Member Functions inherited from MoFEM::OpBrokenBaseImpl< OpBase >
 OpBrokenBaseImpl (boost::shared_ptr< std::vector< BrokenBaseSideData > > broken_base_side_data, boost::shared_ptr< Range > ents_ptr=nullptr)
 
 OpBrokenBaseImpl (const std::string row_field, boost::shared_ptr< std::vector< BrokenBaseSideData > > broken_base_side_data, const bool assmb_transpose, const bool only_transpose, boost::shared_ptr< Range > ents_ptr=nullptr)
 
MoFEMErrorCode doWork (int row_side, EntityType row_type, EntitiesFieldData::EntData &row_data)
 
- Public Member Functions inherited from MoFEM::OpBaseImpl< A, EleOp >
 OpBaseImpl (const std::string row_field_name, const std::string col_field_name, const OpType type, boost::shared_ptr< Range > ents_ptr=nullptr)
 Constructor for base operator implementation.
 
MoFEMErrorCode doWork (int row_side, int col_side, EntityType row_type, EntityType col_type, EntData &row_data, EntData &col_data)
 Do calculations for the left hand side.
 
MoFEMErrorCode doWork (int row_side, EntityType row_type, EntData &row_data)
 Do calculations for the right hand side.
 

Protected Attributes

boost::shared_ptr< MatrixDouble > fluxMatPtr
 
int faceSense = 0
 
- Protected Attributes inherited from MoFEM::OpBrokenBaseImpl< OpBase >
boost::shared_ptr< std::vector< BrokenBaseSideData > > brokenBaseSideData
 
- Protected Attributes inherited from MoFEM::OpBaseImpl< A, EleOp >
int nbRows
 number of dofs on rows
 
int nbCols
 number if dof on column
 
int nbIntegrationPts
 number of integration points
 
int nbRowBaseFunctions
 number or row base functions
 
int rowSide
 row side number
 
int colSide
 column side number
 
EntityType rowType
 row type
 
EntityType colType
 column type
 
bool assembleTranspose
 
bool onlyTranspose
 
MatrixDouble locMat
 local entity block matrix
 
MatrixDouble locMatTranspose
 local entity block matrix
 
VectorDouble locF
 local entity vector
 

Additional Inherited Members

- Public Attributes inherited from MoFEM::OpBaseImpl< A, EleOp >
TimeFun timeScalingFun
 assumes that time variable is set
 
FEFun feScalingFun
 set by fe entity handle
 
boost::shared_ptr< RangeentsPtr
 Entities on which element is run.
 
- Static Public Attributes inherited from MoFEM::OpBaseImpl< A, EleOp >
static MatSetValuesHook matSetValuesHook
 
- Protected Member Functions inherited from MoFEM::OpBaseImpl< A, EleOp >
template<int DIM>
FTensor::Tensor1< FTensor::PackPtr< double *, DIM >, DIM > getNf ()
 Get local vector tensor for assembly.
 
template<int DIM>
FTensor::Tensor2< FTensor::PackPtr< double *, DIM >, DIM, DIM > getLocMat (const int rr)
 Get local matrix tensor for assembly.
 
virtual MoFEMErrorCode iNtegrate (EntData &row_data, EntData &col_data)
 Integrate grad-grad operator.
 
virtual MoFEMErrorCode aSsemble (EntData &row_data, EntData &col_data, const bool trans)
 Assemble local matrix into global matrix.
 
virtual MoFEMErrorCode iNtegrate (EntData &data)
 Class dedicated to integrate operator.
 
virtual MoFEMErrorCode aSsemble (EntData &data)
 Assemble local vector into global vector.
 
virtual size_t getNbOfBaseFunctions (EntitiesFieldData::EntData &data)
 Get number of base functions.
 

Detailed Description

Definition at line 276 of file EshelbianCohesive.cpp.

Member Typedef Documentation

◆ OP

using EshelbianPlasticity::OpBrokenBaseCohesive::OP = FormsIntegrators<FaceElementForcesAndSourcesCore::UserDataOperator>:: Assembly<A>::OpBrokenBase

Definition at line 280 of file EshelbianCohesive.cpp.

Constructor & Destructor Documentation

◆ OpBrokenBaseCohesive()

EshelbianPlasticity::OpBrokenBaseCohesive::OpBrokenBaseCohesive ( boost::shared_ptr< std::vector< BrokenBaseSideData > >  broken_flux_data_ptr,
boost::shared_ptr< Range ents_ptr = nullptr 
)
inline

Definition at line 283 of file EshelbianCohesive.cpp.

286 : OP(broken_flux_data_ptr, ents_ptr) {}
FormsIntegrators< FaceElementForcesAndSourcesCore::UserDataOperator >::Assembly< A >::OpBrokenBase OP

Member Function Documentation

◆ doWork()

MoFEMErrorCode EshelbianPlasticity::OpBrokenBaseCohesive::doWork ( int  row_side,
EntityType  row_type,
EntitiesFieldData::EntData row_data 
)
inline

Definition at line 288 of file EshelbianCohesive.cpp.

289 {
290
292
293 if (OP::entsPtr) {
294 if (OP::entsPtr->find(this->getFEEntityHandle()) == OP::entsPtr->end())
296 }
297
298#ifndef NDEBUG
299 if (!brokenBaseSideData) {
300 SETERRQ(PETSC_COMM_SELF, MOFEM_IMPOSSIBLE_CASE, "space not set");
301 }
302#endif // NDEBUG
303
304 auto do_work_rhs = [this](int row_side, EntityType row_type,
305 EntitiesFieldData::EntData &row_data) {
307#ifndef NDEBUG
308 auto base = row_data.getBase();
309 if (base < 0 && base >= LASTBASE) {
310 SETERRQ(PETSC_COMM_SELF, MOFEM_IMPOSSIBLE_CASE,
311 "row base not set properly");
312 }
313#endif // NDEBUG
314
315 // get number of dofs on row
316 OP::nbRows = row_data.getIndices().size();
317 if (!OP::nbRows)
319 // get number of integration points
320 OP::nbIntegrationPts = OP::getGaussPts().size2();
321 // get row base functions
323 // resize and clear the right hand side vector
324 OP::locF.resize(OP::nbRows, false);
325 OP::locF.clear();
326 OP::locMat.resize(OP::nbRows, OP::nbRows, false);
327 OP::locMat.clear();
328 if (OP::nbRows) {
329 // integrate local vector
330 CHKERR this->iNtegrate(row_data);
331 // assemble local vector
332 CHKERR this->aSsemble(row_data);
333 }
335 };
336
337 switch (OP::opType) {
338 case OP::OPSPACE:
339 for (auto &bd : *brokenBaseSideData) {
340 fluxMatPtr =
341 boost::shared_ptr<MatrixDouble>(brokenBaseSideData, &bd.getFlux());
342 faceSense = bd.getSense();
343 CHKERR do_work_rhs(bd.getSide(), bd.getType(), bd.getData());
344 fluxMatPtr.reset();
345 faceSense = 0;
346 }
347 break;
348 default:
350 (std::string("wrong op type ") +
351 OpBaseDerivativesBase::OpTypeNames[OP::opType])
352 .c_str());
353 }
354
356 }
@ LASTBASE
Definition definitions.h:69
#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
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
#define CHKERR
Inline error check.
boost::shared_ptr< MatrixDouble > fluxMatPtr
Data on single entity (This is passed as argument to DataOperator::doWork)
FieldApproximationBase & getBase()
Get approximation base.
const VectorInt & getIndices() const
Get global indices of degrees of freedom on entity.
VectorDouble locF
local entity vector
boost::shared_ptr< Range > entsPtr
Entities on which element is run.
int nbRows
number of dofs on rows
int nbIntegrationPts
number of integration points
virtual MoFEMErrorCode aSsemble(EntData &row_data, EntData &col_data, const bool trans)
Assemble local matrix into global matrix.
virtual MoFEMErrorCode iNtegrate(EntData &row_data, EntData &col_data)
Integrate grad-grad operator.
MatrixDouble locMat
local entity block matrix
virtual size_t getNbOfBaseFunctions(EntitiesFieldData::EntData &data)
Get number of base functions.
int nbRowBaseFunctions
number or row base functions
boost::shared_ptr< std::vector< BrokenBaseSideData > > brokenBaseSideData

Member Data Documentation

◆ faceSense

int EshelbianPlasticity::OpBrokenBaseCohesive::faceSense = 0
protected

Definition at line 360 of file EshelbianCohesive.cpp.

◆ fluxMatPtr

boost::shared_ptr<MatrixDouble> EshelbianPlasticity::OpBrokenBaseCohesive::fluxMatPtr
protected

Definition at line 359 of file EshelbianCohesive.cpp.


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