v0.15.5
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 299 of file EshelbianCohesive.cpp.

Member Typedef Documentation

◆ OP

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

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

309 : 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 311 of file EshelbianCohesive.cpp.

312 {
313
315
316 if (OP::entsPtr) {
317 if (OP::entsPtr->find(this->getFEEntityHandle()) == OP::entsPtr->end())
319 }
320
321#ifndef NDEBUG
322 if (!brokenBaseSideData) {
323 SETERRQ(PETSC_COMM_SELF, MOFEM_IMPOSSIBLE_CASE, "space not set");
324 }
325#endif // NDEBUG
326
327 auto do_work_rhs = [this](int row_side, EntityType row_type,
328 EntitiesFieldData::EntData &row_data) {
330#ifndef NDEBUG
331 auto base = row_data.getBase();
332 if (base < 0 && base >= LASTBASE) {
333 SETERRQ(PETSC_COMM_SELF, MOFEM_IMPOSSIBLE_CASE,
334 "row base not set properly");
335 }
336#endif // NDEBUG
337
338 // get number of dofs on row
339 OP::nbRows = row_data.getIndices().size();
340 if (!OP::nbRows)
342 // get number of integration points
343 OP::nbIntegrationPts = OP::getGaussPts().size2();
344 // get row base functions
345 OP::nbRowBaseFunctions = OP::getNbOfBaseFunctions(row_data);
346 // resize and clear the right hand side vector
347 OP::locF.resize(OP::nbRows, false);
348 OP::locF.clear();
349 OP::locMat.resize(OP::nbRows, OP::nbRows, false);
350 OP::locMat.clear();
351 if (OP::nbRows) {
352 // integrate local vector
353 CHKERR this->iNtegrate(row_data);
354 // assemble local vector
355 CHKERR this->aSsemble(row_data);
356 }
358 };
359
360 switch (OP::opType) {
361 case OP::OPSPACE:
362 for (auto &bd : *brokenBaseSideData) {
363 fluxMatPtr =
364 boost::shared_ptr<MatrixDouble>(brokenBaseSideData, &bd.getFlux());
365 faceSense = bd.getSense();
366 CHKERR do_work_rhs(bd.getSide(), bd.getType(), bd.getData());
367 fluxMatPtr.reset();
368 faceSense = 0;
369 }
370 break;
371 default:
373 (std::string("wrong op type ") +
374 OpBaseDerivativesBase::OpTypeNames[OP::opType])
375 .c_str());
376 }
377
379 }
@ 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 383 of file EshelbianCohesive.cpp.

◆ fluxMatPtr

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

Definition at line 382 of file EshelbianCohesive.cpp.


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