v0.14.0
Public Member Functions | List of all members
CohesiveElement::CohesiveInterfaceElement::OpSetSignToShapeFunctions Struct Reference

Set negative sign to shape functions on face 4. More...

#include <users_modules/basic_finite_elements/cohesive_interface/src/CohesiveInterfaceElement.hpp>

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

Public Member Functions

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

Detailed Description

Set negative sign to shape functions on face 4.

Definition at line 307 of file CohesiveInterfaceElement.hpp.

Constructor & Destructor Documentation

◆ OpSetSignToShapeFunctions()

CohesiveElement::CohesiveInterfaceElement::OpSetSignToShapeFunctions::OpSetSignToShapeFunctions ( const std::string  field_name)
inline

Definition at line 309 of file CohesiveInterfaceElement.hpp.

309  :
310  FlatPrismElementForcesAndSourcesCore::UserDataOperator(field_name,ForcesAndSourcesCore::UserDataOperator::OPROW) {}

Member Function Documentation

◆ doWork()

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

Definition at line 312 of file CohesiveInterfaceElement.hpp.

312  {
314  if(data.getN().size1()==0) MoFEMFunctionReturnHot(0);
315  if(data.getN().size2()==0) MoFEMFunctionReturnHot(0);
316  switch(type) {
317  case MBVERTEX:
318  for(unsigned int gg = 0;gg<data.getN().size1();gg++) {
319  for(int nn = 3;nn<6;nn++) {
320  data.getN()(gg,nn) *= -1;
321  }
322  }
323  break;
324  case MBEDGE:
325  if(side < 3) MoFEMFunctionReturnHot(0);
326  data.getN() *= -1;
327  break;
328  case MBTRI:
329  if(side == 3) MoFEMFunctionReturnHot(0);
330  data.getN() *= -1;
331  break;
332  default:
333  SETERRQ(PETSC_COMM_SELF,1,"data inconsitency");
334  }
336  }

The documentation for this struct was generated from the following file:
MoFEMFunctionReturnHot
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:460
convert.type
type
Definition: convert.py:64
field_name
constexpr auto field_name
Definition: poisson_2d_homogeneous.cpp:13
UserDataOperator
ForcesAndSourcesCore::UserDataOperator UserDataOperator
Definition: HookeElement.hpp:75
MoFEMFunctionBeginHot
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:453