v0.16.0
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
CohesiveElement::CohesiveInterfaceElement::OpCalculateGapLocal Struct Reference

Operator calculate gap in local coordinate system. More...

#include "tutorials/cor-12_cohesive_interface/src/CohesiveInterfaceElement.hpp"

Inheritance diagram for CohesiveElement::CohesiveInterfaceElement::OpCalculateGapLocal:
[legend]
Collaboration diagram for CohesiveElement::CohesiveInterfaceElement::OpCalculateGapLocal:
[legend]

Public Member Functions

 OpCalculateGapLocal (const std::string field_name, CommonData &common_data)
 
MoFEMErrorCode doWork (int side, EntityType type, EntitiesFieldData::EntData &data)
 

Public Attributes

CommonDatacommonData
 

Detailed Description

Operator calculate gap in local coordinate system.

Definition at line 412 of file CohesiveInterfaceElement.hpp.

Constructor & Destructor Documentation

◆ OpCalculateGapLocal()

CohesiveElement::CohesiveInterfaceElement::OpCalculateGapLocal::OpCalculateGapLocal ( const std::string  field_name,
CommonData common_data 
)
inline

Definition at line 416 of file CohesiveInterfaceElement.hpp.

417 : FlatPrismElementForcesAndSourcesCore::UserDataOperator(
418 field_name, ForcesAndSourcesCore::UserDataOperator::OPROW),
419 commonData(common_data) {}
constexpr auto field_name

Member Function Documentation

◆ doWork()

MoFEMErrorCode CohesiveElement::CohesiveInterfaceElement::OpCalculateGapLocal::doWork ( int  side,
EntityType  type,
EntitiesFieldData::EntData &  data 
)
inline

Definition at line 421 of file CohesiveInterfaceElement.hpp.

422 {
424 try {
425 if (type == MBVERTEX) {
426 int nb_gauss_pts = data.getN().size1();
427 commonData.gapLoc.resize(nb_gauss_pts, 3);
428 for (int gg = 0; gg < nb_gauss_pts; gg++) {
429 ublas::matrix_row<MatrixDouble> gap_glob(commonData.gapGlob, gg);
430 ublas::matrix_row<MatrixDouble> gap_loc(commonData.gapLoc, gg);
431 gap_loc = prod(commonData.R[gg], gap_glob);
432 }
433 }
434 } catch (const std::exception &ex) {
435 std::ostringstream ss;
436 ss << "throw in method: " << ex.what() << std::endl;
437 SETERRQ(PETSC_COMM_SELF, 1, ss.str().c_str());
438 }
440 }
std::string type
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...

Member Data Documentation

◆ commonData

CommonData& CohesiveElement::CohesiveInterfaceElement::OpCalculateGapLocal::commonData

Definition at line 415 of file CohesiveInterfaceElement.hpp.


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