v0.16.0
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 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)
 

Protected Attributes

boost::shared_ptr< MatrixDouble > fluxMatPtr
 
int faceSense = 0
 

Detailed Description

Definition at line 331 of file EshelbianCohesive.cpp.

Member Typedef Documentation

◆ OP

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

Definition at line 335 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 338 of file EshelbianCohesive.cpp.

341 : 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 343 of file EshelbianCohesive.cpp.

344 {
345
347
348 if (OP::entsPtr) {
349 if (OP::entsPtr->find(this->getFEEntityHandle()) == OP::entsPtr->end())
351 }
352
353#ifndef NDEBUG
354 if (!brokenBaseSideData) {
355 SETERRQ(PETSC_COMM_SELF, MOFEM_IMPOSSIBLE_CASE, "space not set");
356 }
357#endif // NDEBUG
358
359 auto do_work_rhs = [this](int row_side, EntityType row_type,
360 EntitiesFieldData::EntData &row_data) {
362#ifndef NDEBUG
363 auto base = row_data.getBase();
364 if (base < 0 && base >= LASTBASE) {
365 SETERRQ(PETSC_COMM_SELF, MOFEM_IMPOSSIBLE_CASE,
366 "row base not set properly");
367 }
368#endif // NDEBUG
369
370 // get number of dofs on row
371 OP::nbRows = row_data.getIndices().size();
372 if (!OP::nbRows)
374 // get number of integration points
375 OP::nbIntegrationPts = OP::getGaussPts().size2();
376 // get row base functions
377 OP::nbRowBaseFunctions = OP::getNbOfBaseFunctions(row_data);
378 // resize and clear the right hand side vector
379 OP::locF.resize(OP::nbRows, false);
380 OP::locF.clear();
381 OP::locMat.resize(OP::nbRows, OP::nbRows, false);
382 OP::locMat.clear();
383 if (OP::nbRows) {
384 // integrate local vector
385 CHKERR this->iNtegrate(row_data);
386 // assemble local vector
387 CHKERR this->aSsemble(row_data);
388 }
390 };
391
392 switch (OP::opType) {
393 case OP::OPSPACE:
394 for (auto &bd : *brokenBaseSideData) {
395 fluxMatPtr =
396 boost::shared_ptr<MatrixDouble>(brokenBaseSideData, &bd.getFlux());
397 faceSense = bd.getSense();
398 CHKERR do_work_rhs(bd.getSide(), bd.getType(), bd.getData());
399 fluxMatPtr.reset();
400 faceSense = 0;
401 }
402 break;
403 default:
405 (std::string("wrong op type ") +
406 OpBaseDerivativesBase::OpTypeNames[OP::opType])
407 .c_str());
408 }
409
411 }
@ 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.

Member Data Documentation

◆ faceSense

int EshelbianPlasticity::OpBrokenBaseCohesive::faceSense = 0
protected

Definition at line 415 of file EshelbianCohesive.cpp.

◆ fluxMatPtr

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

Definition at line 414 of file EshelbianCohesive.cpp.


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