v0.16.3
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

CommonData & commonData
 

Detailed Description

Operator calculate gap in local coordinate system.

Definition at line 415 of file CohesiveInterfaceElement.hpp.

Constructor & Destructor Documentation

◆ OpCalculateGapLocal()

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

Definition at line 419 of file CohesiveInterfaceElement.hpp.

420 : FlatPrismElementForcesAndSourcesCore::UserDataOperator(
421 field_name, ForcesAndSourcesCore::UserDataOperator::OPROW),
422 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 424 of file CohesiveInterfaceElement.hpp.

425 {
427 try {
428 if (type == MBVERTEX) {
429 int nb_gauss_pts = data.getN().size1();
430 commonData.gapLoc.resize(nb_gauss_pts, 3);
431 for (int gg = 0; gg < nb_gauss_pts; gg++) {
432 ublas::matrix_row<MatrixDouble> gap_glob(commonData.gapGlob, gg);
433 ublas::matrix_row<MatrixDouble> gap_loc(commonData.gapLoc, gg);
434 gap_loc = prod(commonData.R[gg], gap_glob);
435 }
436 }
437 } catch (const std::exception &ex) {
438 std::ostringstream ss;
439 ss << "throw in method: " << ex.what() << std::endl;
440 SETERRQ(PETSC_COMM_SELF, MOFEM_STD_EXCEPTION_THROW, "%s",
441 ss.str().c_str());
442 }
444 }
std::string type
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
@ MOFEM_STD_EXCEPTION_THROW
Definition definitions.h:39
#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 418 of file CohesiveInterfaceElement.hpp.


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