No Matches
Public Member Functions | Public Attributes | List of all members
FractureMechanics::GriffithForceElement::OpConstrainsRhs Struct Reference

#include <users_modules/fracture_mechanics/src/GriffithForceElement.hpp>

Inheritance diagram for FractureMechanics::GriffithForceElement::OpConstrainsRhs:
Collaboration diagram for FractureMechanics::GriffithForceElement::OpConstrainsRhs:

Public Member Functions

 OpConstrainsRhs (MoFEM::Interface &m_field, int tag, BlockData &block_data, CommonData &common_data, const std::string &lambda_field_name)
MoFEMErrorCode doWork (int side, EntityType type, DataForcesAndSourcesCore::EntData &data)
- Public Member Functions inherited from FractureMechanics::GriffithForceElement::AuxOp
 AuxOp (int tag, BlockData &block_data, CommonData &common_data)
MoFEMErrorCode setIndices (DataForcesAndSourcesCore::EntData &data)
MoFEMErrorCode setVariables (FaceElementForcesAndSourcesCore::UserDataOperator *fe_ptr, DataForcesAndSourcesCore::EntData &data)
MoFEMErrorCode setLambdaNodes (FaceElementForcesAndSourcesCore::UserDataOperator *fe_ptr, const std::string &lambda_field_name)
MoFEMErrorCode setLambdaIndices (FaceElementForcesAndSourcesCore::UserDataOperator *fe_ptr, const std::string &lambda_field_name)

Public Attributes

const std::string lambdaFieldName
AuxFunctions< doubleauxFun
VectorDouble9 nF
- Public Attributes inherited from FractureMechanics::GriffithForceElement::AuxOp
int tAg
ublas::vector< int > rowIndices
ublas::vector< int > rowIndicesLocal
VectorInt3 rowLambdaIndices
VectorInt3 rowLambdaIndicesLocal
VectorDouble3 lambdaAtNodes
VectorDouble activeVariables

Detailed Description

Definition at line 991 of file GriffithForceElement.hpp.

Constructor & Destructor Documentation

◆ OpConstrainsRhs()

FractureMechanics::GriffithForceElement::OpConstrainsRhs::OpConstrainsRhs ( MoFEM::Interface m_field,
int  tag,
BlockData block_data,
CommonData common_data,
const std::string &  lambda_field_name 

Definition at line 998 of file GriffithForceElement.hpp.

1001 : FaceElementForcesAndSourcesCore::UserDataOperator(
1002 "MESH_NODE_POSITIONS", UserDataOperator::OPROW),
1003 AuxOp(tag, block_data, common_data), mField(m_field),
1004 lambdaFieldName(lambda_field_name) {}
AuxOp(int tag, BlockData &block_data, CommonData &common_data)

Member Function Documentation

◆ doWork()

MoFEMErrorCode FractureMechanics::GriffithForceElement::OpConstrainsRhs::doWork ( int  side,
EntityType  type,
DataForcesAndSourcesCore::EntData &  data 

Definition at line 1010 of file GriffithForceElement.hpp.

1011 {
1013 if (type != MBVERTEX)
1016 // get indices of material DOFs
1017 CHKERR setIndices(data);
1021 auxFun.currentCoords.resize(9, false);
1022 noalias(auxFun.currentCoords) = data.getFieldData();
1024 CHKERR auxFun.calculateGriffithForce(1, getGaussPts()(2, 0) * 0.5,
1025 data.getDiffN(0));
1027 // assemble local vector
1028 nF.resize(9, false);
1029 nF.clear();
1030 for (int nn = 0; nn != 3; nn++) {
1031 if (rowLambdaIndices[nn] != -1) {
1032 const auto lambda = lambdaAtNodes[nn];
1033 for (int dd = 0; dd != 3; dd++) {
1034 int idx = 3 * nn + dd;
1035 nF[idx] -= lambda * auxFun.griffithForce[idx];
1036 }
1037 }
1038 }
1040 // assemble the right hand vectors
1041 CHKERR VecSetValues(getFEMethod()->snes_f, 9, &*rowIndices.data().begin(),
1042 &nF[0], ADD_VALUES);
1045 }
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:447
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:346
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:416
#define CHKERR
Inline error check.
Definition: definitions.h:535
constexpr double lambda
const Tensor2_symmetric_Expr< const ddTensor0< T, Dim, i, j >, typename promote< T, double >::V, Dim, i, j > dd(const Tensor0< T * > &a, const Index< i, Dim > index1, const Index< j, Dim > index2, const Tensor1< int, Dim > &d_ijk, const Tensor1< double, Dim > &d_xyz)
Definition: ddTensor0.hpp:33
MoFEMErrorCode calculateGriffithForce(const double gc, const double beta, const MatrixDouble &diff_n)
MoFEMErrorCode setLambdaNodes(FaceElementForcesAndSourcesCore::UserDataOperator *fe_ptr, const std::string &lambda_field_name)
MoFEMErrorCode setLambdaIndices(FaceElementForcesAndSourcesCore::UserDataOperator *fe_ptr, const std::string &lambda_field_name)
MoFEMErrorCode setIndices(DataForcesAndSourcesCore::EntData &data)

Member Data Documentation

◆ auxFun

AuxFunctions<double> FractureMechanics::GriffithForceElement::OpConstrainsRhs::auxFun

Definition at line 1006 of file GriffithForceElement.hpp.

◆ lambdaFieldName

const std::string FractureMechanics::GriffithForceElement::OpConstrainsRhs::lambdaFieldName

Definition at line 996 of file GriffithForceElement.hpp.

◆ mField

MoFEM::Interface& FractureMechanics::GriffithForceElement::OpConstrainsRhs::mField

Definition at line 995 of file GriffithForceElement.hpp.

◆ nF

VectorDouble9 FractureMechanics::GriffithForceElement::OpConstrainsRhs::nF

Definition at line 1007 of file GriffithForceElement.hpp.

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