v0.14.0
Public Member Functions | Public Attributes | List of all members
FractureMechanics::GriffithForceElement::MyTriangleFEConstrainsDelta Struct Reference

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

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

Public Member Functions

 MyTriangleFEConstrainsDelta (MoFEM::Interface &m_field, const std::string &lambda_field_name)
 
MoFEMErrorCode preProcess ()
 
MoFEMErrorCode postProcess ()
 
- Public Member Functions inherited from FractureMechanics::GriffithForceElement::MyTriangleFE
 MyTriangleFE (MoFEM::Interface &m_field)
 
int getRule (int order)
 

Public Attributes

const std::string lambdaFieldName
 
bool ownDeltaVec
 
SmartPetscObj< Vec > deltaVec
 
- Public Attributes inherited from FractureMechanics::GriffithForceElement::MyTriangleFE
Mat B
 
Vec F
 

Detailed Description

Definition at line 811 of file GriffithForceElement.hpp.

Constructor & Destructor Documentation

◆ MyTriangleFEConstrainsDelta()

FractureMechanics::GriffithForceElement::MyTriangleFEConstrainsDelta::MyTriangleFEConstrainsDelta ( MoFEM::Interface m_field,
const std::string &  lambda_field_name 
)
inline

Definition at line 817 of file GriffithForceElement.hpp.

819  : MyTriangleFE(m_field), lambdaFieldName(lambda_field_name) {}

Member Function Documentation

◆ postProcess()

MoFEMErrorCode FractureMechanics::GriffithForceElement::MyTriangleFEConstrainsDelta::postProcess ( )
inline

Definition at line 835 of file GriffithForceElement.hpp.

835  {
837  MOFEM_LOG_CHANNEL("WORLD");
839  MOFEM_LOG_TAG("WORLD", "Arc");
840 
841  CHKERR VecAssemblyBegin(deltaVec);
842  CHKERR VecAssemblyEnd(deltaVec);
843  CHKERR VecGhostUpdateBegin(deltaVec, ADD_VALUES, SCATTER_REVERSE);
844  CHKERR VecGhostUpdateEnd(deltaVec, ADD_VALUES, SCATTER_REVERSE);
845  CHKERR VecGhostUpdateBegin(deltaVec, INSERT_VALUES, SCATTER_FORWARD);
846  CHKERR VecGhostUpdateEnd(deltaVec, INSERT_VALUES, SCATTER_FORWARD);
847  double nrm;
848  CHKERR VecNorm(deltaVec, NORM_2, &nrm);
849  MOFEM_LOG_C("WORLD", Sev::noisy, "\tdelta vec nrm = %9.8e", nrm);
851  }

◆ preProcess()

MoFEMErrorCode FractureMechanics::GriffithForceElement::MyTriangleFEConstrainsDelta::preProcess ( )
inline

Definition at line 821 of file GriffithForceElement.hpp.

821  {
823  Vec l;
824  CHKERR VecGhostGetLocalForm(deltaVec, &l);
825  double *a;
826  CHKERR VecGetArray(l, &a);
827  int n;
828  CHKERR VecGetLocalSize(l, &n);
829  std::fill(&a[0], &a[n], 0);
830  CHKERR VecRestoreArray(l, &a);
831  CHKERR VecGhostRestoreLocalForm(deltaVec, &l);
833  }

Member Data Documentation

◆ deltaVec

SmartPetscObj<Vec> FractureMechanics::GriffithForceElement::MyTriangleFEConstrainsDelta::deltaVec

Definition at line 815 of file GriffithForceElement.hpp.

◆ lambdaFieldName

const std::string FractureMechanics::GriffithForceElement::MyTriangleFEConstrainsDelta::lambdaFieldName

Definition at line 813 of file GriffithForceElement.hpp.

◆ ownDeltaVec

bool FractureMechanics::GriffithForceElement::MyTriangleFEConstrainsDelta::ownDeltaVec

Definition at line 814 of file GriffithForceElement.hpp.


The documentation for this struct was generated from the following file:
MOFEM_LOG_CHANNEL
#define MOFEM_LOG_CHANNEL(channel)
Set and reset channel.
Definition: LogManager.hpp:284
FractureMechanics::GriffithForceElement::MyTriangleFEConstrainsDelta::deltaVec
SmartPetscObj< Vec > deltaVec
Definition: GriffithForceElement.hpp:815
MOFEM_LOG_FUNCTION
#define MOFEM_LOG_FUNCTION()
Set scope.
Definition: LogManager.hpp:325
CHKERR
#define CHKERR
Inline error check.
Definition: definitions.h:535
FractureMechanics::GriffithForceElement::MyTriangleFE::MyTriangleFE
MyTriangleFE(MoFEM::Interface &m_field)
Definition: GriffithForceElement.hpp:44
a
constexpr double a
Definition: approx_sphere.cpp:30
MOFEM_LOG_C
#define MOFEM_LOG_C(channel, severity, format,...)
Definition: LogManager.hpp:311
FractureMechanics::GriffithForceElement::MyTriangleFEConstrainsDelta::lambdaFieldName
const std::string lambdaFieldName
Definition: GriffithForceElement.hpp:813
MOFEM_LOG_TAG
#define MOFEM_LOG_TAG(channel, tag)
Tag channel.
Definition: LogManager.hpp:339
convert.n
n
Definition: convert.py:82
EigenMatrix::Vec
const FTensor::Tensor2< T, Dim, Dim > Vec
Definition: MatrixFunction.hpp:66
MoFEMFunctionReturn
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:416
MoFEMFunctionBegin
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:346
l
FTensor::Index< 'l', 3 > l
Definition: matrix_function.cpp:21