v0.14.0
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
FractureMechanics::GriffithForceElement::OpConstrainsDelta Struct Reference

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

Inheritance diagram for FractureMechanics::GriffithForceElement::OpConstrainsDelta:
[legend]
Collaboration diagram for FractureMechanics::GriffithForceElement::OpConstrainsDelta:
[legend]

Public Member Functions

 OpConstrainsDelta (MoFEM::Interface &m_field, int tag, BlockData &block_data, CommonData &common_data, const std::string &lambda_field_name, SmartPetscObj< Vec > &delta_vec)
 
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

MoFEM::InterfacemField
 
const std::string lambdaFieldName
 
SmartPetscObj< Vec > & deltaVec
 
AuxFunctions< doubleauxFun
 
- Public Attributes inherited from FractureMechanics::GriffithForceElement::AuxOp
int tAg
 
BlockDatablockData
 
CommonDatacommonData
 
ublas::vector< int > rowIndices
 
ublas::vector< int > rowIndicesLocal
 
VectorInt3 rowLambdaIndices
 
VectorInt3 rowLambdaIndicesLocal
 
VectorDouble3 lambdaAtNodes
 
VectorDouble activeVariables
 

Detailed Description

Definition at line 854 of file GriffithForceElement.hpp.

Constructor & Destructor Documentation

◆ OpConstrainsDelta()

FractureMechanics::GriffithForceElement::OpConstrainsDelta::OpConstrainsDelta ( MoFEM::Interface m_field,
int  tag,
BlockData block_data,
CommonData common_data,
const std::string &  lambda_field_name,
SmartPetscObj< Vec > &  delta_vec 
)
inline

Definition at line 862 of file GriffithForceElement.hpp.

866 : FaceElementForcesAndSourcesCore::UserDataOperator(
867 "MESH_NODE_POSITIONS", UserDataOperator::OPROW),
868 AuxOp(tag, block_data, common_data), mField(m_field),
869 lambdaFieldName(lambda_field_name), deltaVec(delta_vec) {}
AuxOp(int tag, BlockData &block_data, CommonData &common_data)

Member Function Documentation

◆ doWork()

MoFEMErrorCode FractureMechanics::GriffithForceElement::OpConstrainsDelta::doWork ( int  side,
EntityType  type,
DataForcesAndSourcesCore::EntData &  data 
)
inline

Definition at line 873 of file GriffithForceElement.hpp.

874 {
876 if (type != MBVERTEX) {
878 }
879 // get indices of material DOFs
880 CHKERR setIndices(data);
881 // get indices of Lagrange multiplier DOFs
883 // do calculations
884 auxFun.currentCoords.resize(9, false);
885 for (int dd = 0; dd != 9; ++dd)
886 auxFun.currentCoords[dd] = data.getFieldData()[dd];
887
888 CHKERR auxFun.calculateGriffithForce(1, getGaussPts()(2, 0) * 0.5,
889 data.getDiffN(0));
890
891 // assemble area change
892 double delta[] = {0, 0, 0};
893 for (int nn = 0; nn != 3; ++nn) {
894 if (rowLambdaIndices[nn] == -1) {
895 if (rowIndices[3 * nn + 0] != -1 || rowIndices[3 * nn + 1] != -1 ||
896 rowIndices[3 * nn + 2] != -1) {
897 SETERRQ(PETSC_COMM_WORLD, MOFEM_DATA_INCONSISTENCY,
898 "Element has no nodes at crack front");
899 }
900 continue;
901 }
902 for (int dd = 0; dd != 3; ++dd) {
903 int idx = 3 * nn + dd;
904 delta[nn] += auxFun.griffithForce[idx] *
905 (data.getFieldData()[idx] - getCoords()[idx]);
906 }
907 }
908 // add nodes to vector of lambda indices
909 CHKERR VecSetValues(deltaVec, 3, &rowLambdaIndices[0], delta, ADD_VALUES);
910
912 }
#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
@ MOFEM_DATA_INCONSISTENCY
Definition: definitions.h:31
#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
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 VecSetValues(Vec V, const EntitiesFieldData::EntData &data, const double *ptr, InsertMode iora)
Assemble PETSc vector.
static constexpr double delta
MoFEMErrorCode calculateGriffithForce(const double gc, const double beta, const MatrixDouble &diff_n)
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::OpConstrainsDelta::auxFun

Definition at line 871 of file GriffithForceElement.hpp.

◆ deltaVec

SmartPetscObj<Vec>& FractureMechanics::GriffithForceElement::OpConstrainsDelta::deltaVec

Definition at line 860 of file GriffithForceElement.hpp.

◆ lambdaFieldName

const std::string FractureMechanics::GriffithForceElement::OpConstrainsDelta::lambdaFieldName

Definition at line 859 of file GriffithForceElement.hpp.

◆ mField

MoFEM::Interface& FractureMechanics::GriffithForceElement::OpConstrainsDelta::mField

Definition at line 858 of file GriffithForceElement.hpp.


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