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 282 of file EshelbianCohesive.cpp.

Member Typedef Documentation

◆ OP

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

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

292 : 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 294 of file EshelbianCohesive.cpp.

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

◆ fluxMatPtr

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

Definition at line 365 of file EshelbianCohesive.cpp.


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