v0.15.4
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Protected Attributes | List of all members
EshelbianPlasticity::OpCohesiveRhs Struct Reference
Inheritance diagram for EshelbianPlasticity::OpCohesiveRhs:
[legend]
Collaboration diagram for EshelbianPlasticity::OpCohesiveRhs:
[legend]

Public Types

using OP = OpBrokenBaseCohesive
 
- Public Types inherited from EshelbianPlasticity::OpBrokenBaseCohesive
using OP = FormsIntegrators< FaceElementForcesAndSourcesCore::UserDataOperator >::Assembly< A >::OpBrokenBase
 
- Public Types inherited from MoFEM::OpBrokenBaseImpl< OpBase >
using OP = OpBase
 
- Public Types inherited from MoFEM::OpBaseImpl< A, EleOp >
using OpType = typename EleOp::OpType
 
using EntData = EntitiesFieldData::EntData
 
using MatSetValuesHook = boost::function< MoFEMErrorCode(ForcesAndSourcesCore::UserDataOperator *op_ptr, const EntitiesFieldData::EntData &row_data, const EntitiesFieldData::EntData &col_data, MatrixDouble &m)>
 

Public Member Functions

 OpCohesiveRhs (boost::shared_ptr< std::vector< BrokenBaseSideData > > broken_base_side_data, boost::shared_ptr< double > gc_ptr, boost::shared_ptr< VectorDouble > kappa_ptr, boost::shared_ptr< VectorDouble > kappa_delta_ptr, boost::shared_ptr< std::array< MatrixDouble, 2 > > lambda_ptr=nullptr, Tag dissipation_tags=Tag(), Tag grad_dissipation_tags=Tag(), SmartPetscObj< Vec > vec_dJ_dx=SmartPetscObj< Vec >(), boost::shared_ptr< Range > ents_ptr=nullptr)
 
MoFEMErrorCode iNtegrate (EntData &data)
 Class dedicated to integrate operator.
 
- Public Member Functions inherited from EshelbianPlasticity::OpBrokenBaseCohesive
 OpBrokenBaseCohesive (boost::shared_ptr< std::vector< BrokenBaseSideData > > broken_flux_data_ptr, boost::shared_ptr< Range > ents_ptr=nullptr)
 
MoFEMErrorCode doWork (int row_side, EntityType row_type, EntitiesFieldData::EntData &row_data)
 
- Public Member Functions inherited from MoFEM::OpBrokenBaseImpl< OpBase >
 OpBrokenBaseImpl (boost::shared_ptr< std::vector< BrokenBaseSideData > > broken_base_side_data, boost::shared_ptr< Range > ents_ptr=nullptr)
 
 OpBrokenBaseImpl (const std::string row_field, boost::shared_ptr< std::vector< BrokenBaseSideData > > broken_base_side_data, const bool assmb_transpose, const bool only_transpose, boost::shared_ptr< Range > ents_ptr=nullptr)
 
MoFEMErrorCode doWork (int row_side, EntityType row_type, EntitiesFieldData::EntData &row_data)
 
- Public Member Functions inherited from MoFEM::OpBaseImpl< A, EleOp >
 OpBaseImpl (const std::string row_field_name, const std::string col_field_name, const OpType type, boost::shared_ptr< Range > ents_ptr=nullptr)
 Constructor for base operator implementation.
 
MoFEMErrorCode doWork (int row_side, int col_side, EntityType row_type, EntityType col_type, EntData &row_data, EntData &col_data)
 Do calculations for the left hand side.
 
MoFEMErrorCode doWork (int row_side, EntityType row_type, EntData &row_data)
 Do calculations for the right hand side.
 

Protected Attributes

boost::shared_ptr< MatrixDouble > uGammaPtr
 
boost::shared_ptr< doublegcPtr
 
boost::shared_ptr< VectorDouble > kappaPtr
 
boost::shared_ptr< VectorDouble > kappaDeltaPtr
 
boost::shared_ptr< std::array< MatrixDouble, 2 > > lambdaPtr
 
boost::shared_ptr< doubletotalDissipation
 
boost::shared_ptr< doubletatalDissipationGrad
 
SmartPetscObj< Vec > vec_dJdu
 
Tag dissipationTag
 
Tag gradDissipationTag
 
- Protected Attributes inherited from EshelbianPlasticity::OpBrokenBaseCohesive
boost::shared_ptr< MatrixDouble > fluxMatPtr
 
int faceSense = 0
 
- Protected Attributes inherited from MoFEM::OpBrokenBaseImpl< OpBase >
boost::shared_ptr< std::vector< BrokenBaseSideData > > brokenBaseSideData
 
- Protected Attributes inherited from MoFEM::OpBaseImpl< A, EleOp >
int nbRows
 number of dofs on rows
 
int nbCols
 number if dof on column
 
int nbIntegrationPts
 number of integration points
 
int nbRowBaseFunctions
 number or row base functions
 
int rowSide
 row side number
 
int colSide
 column side number
 
EntityType rowType
 row type
 
EntityType colType
 column type
 
bool assembleTranspose
 
bool onlyTranspose
 
MatrixDouble locMat
 local entity block matrix
 
MatrixDouble locMatTranspose
 local entity block matrix
 
VectorDouble locF
 local entity vector
 

Additional Inherited Members

- Public Attributes inherited from MoFEM::OpBaseImpl< A, EleOp >
TimeFun timeScalingFun
 assumes that time variable is set
 
FEFun feScalingFun
 set by fe entity handle
 
boost::shared_ptr< RangeentsPtr
 Entities on which element is run.
 
- Static Public Attributes inherited from MoFEM::OpBaseImpl< A, EleOp >
static MatSetValuesHook matSetValuesHook
 
- Protected Member Functions inherited from MoFEM::OpBaseImpl< A, EleOp >
template<int DIM>
FTensor::Tensor1< FTensor::PackPtr< double *, DIM >, DIM > getNf ()
 Get local vector tensor for assembly.
 
template<int DIM>
FTensor::Tensor2< FTensor::PackPtr< double *, DIM >, DIM, DIM > getLocMat (const int rr)
 Get local matrix tensor for assembly.
 
virtual MoFEMErrorCode iNtegrate (EntData &row_data, EntData &col_data)
 Integrate grad-grad operator.
 
virtual MoFEMErrorCode aSsemble (EntData &row_data, EntData &col_data, const bool trans)
 Assemble local matrix into global matrix.
 
virtual MoFEMErrorCode aSsemble (EntData &data)
 Assemble local vector into global vector.
 
virtual size_t getNbOfBaseFunctions (EntitiesFieldData::EntData &data)
 Get number of base functions.
 

Detailed Description

Definition at line 363 of file EshelbianCohesive.cpp.

Member Typedef Documentation

◆ OP

Definition at line 365 of file EshelbianCohesive.cpp.

Constructor & Destructor Documentation

◆ OpCohesiveRhs()

EshelbianPlasticity::OpCohesiveRhs::OpCohesiveRhs ( boost::shared_ptr< std::vector< BrokenBaseSideData > >  broken_base_side_data,
boost::shared_ptr< double gc_ptr,
boost::shared_ptr< VectorDouble >  kappa_ptr,
boost::shared_ptr< VectorDouble >  kappa_delta_ptr,
boost::shared_ptr< std::array< MatrixDouble, 2 > >  lambda_ptr = nullptr,
Tag  dissipation_tags = Tag(),
Tag  grad_dissipation_tags = Tag(),
SmartPetscObj< Vec >  vec_dJ_dx = SmartPetscObj<Vec>(),
boost::shared_ptr< Range ents_ptr = nullptr 
)
inline

Definition at line 366 of file EshelbianCohesive.cpp.

375 : OpBrokenBaseCohesive(broken_base_side_data, ents_ptr), gcPtr(gc_ptr),
376 kappaPtr(kappa_ptr), kappaDeltaPtr(kappa_delta_ptr),
377 lambdaPtr(lambda_ptr), dissipationTag(dissipation_tags),
378 gradDissipationTag(grad_dissipation_tags), vec_dJdu(vec_dJ_dx) {}
OpBrokenBaseCohesive(boost::shared_ptr< std::vector< BrokenBaseSideData > > broken_flux_data_ptr, boost::shared_ptr< Range > ents_ptr=nullptr)
boost::shared_ptr< double > gcPtr
boost::shared_ptr< VectorDouble > kappaDeltaPtr
boost::shared_ptr< VectorDouble > kappaPtr
boost::shared_ptr< std::array< MatrixDouble, 2 > > lambdaPtr

Member Function Documentation

◆ iNtegrate()

MoFEMErrorCode EshelbianPlasticity::OpCohesiveRhs::iNtegrate ( EntData data)
inlinevirtual

Class dedicated to integrate operator.

Parameters
dataentity data on element row
Returns
error code

Reimplemented from MoFEM::OpBaseImpl< A, EleOp >.

Definition at line 380 of file EshelbianCohesive.cpp.

380 {
382
383 auto get_sense_index = [this]() { return (faceSense == 1) ? 0 : 1; };
384
385 auto nb_dofs = data.getIndices().size();
386 FTENSOR_INDEX(3, i);
387 FTENSOR_INDEX(3, J);
388
389 int nb_integration_pts = OP::getGaussPts().size2();
390
391 auto t_P = getFTensor2FromMat<3, 3>(*(OP::fluxMatPtr));
392 auto t_kappa = getFTensor0FromVec<0>(*kappaPtr);
393 auto t_delta_kappa = getFTensor0FromVec<0>(*kappaDeltaPtr);
394 auto t_face_normal = getFTensor1NormalsAtGaussPts();
395
396 int nb_base_functions = data.getN().size2() / 3;
397 auto t_row_base_fun = data.getFTensor1N<3>();
398 auto t_w = OP::getFTensor0IntegrationWeight();
399
400 auto next = [&]() {
401 ++t_P;
402 ++t_face_normal;
403 ++t_kappa;
404 ++t_delta_kappa;
405 ++t_w;
406 };
407
408 for (auto gg = 0; gg != nb_integration_pts; ++gg) {
410 t_normal(J) = t_face_normal(J) * (faceSense / 2.);
411 FTensor::Tensor1<double, 3> t_normalized_normal;
412 t_normalized_normal(J) = t_normal(J);
413 t_normalized_normal.normalize();
415 t_traction(i) = t_P(i, J) * t_normalized_normal(J);
416
417 auto fracture = [this](auto &t_traction, auto &t_normalized_normal,
418 auto &t_kappa, auto &t_delta_kappa, auto gc) {
419 double kappa = static_cast<double>(t_kappa + t_delta_kappa);
423 t_traction, t_normalized_normal, alpha, OpGetParameters::beta);
424 FTENSOR_INDEX(3, i);
425 FTensor::Tensor1<double, 3> t_gap_double;
426 t_gap_double(i) = -t_gap(i);
427 return t_gap_double;
428 };
429
430 auto assemble = [&](const FTensor::Tensor1<double, 3> &&t_gap) {
431 auto t_nf = getFTensor1FromPtr<3>(&*OP::locF.begin());
432 int bb = 0;
433 for (; bb != nb_dofs / SPACE_DIM; ++bb) {
434 double row_base = t_w * (t_row_base_fun(J) * t_normal(J));
435 t_nf(i) += row_base * t_gap(i);
436 ++t_nf;
437 ++t_row_base_fun;
438 }
439 for (; bb != nb_base_functions; ++bb)
440 ++t_row_base_fun;
441 };
442
443 assemble(fracture(t_traction, t_normalized_normal, t_kappa, t_delta_kappa,
444 *gcPtr));
445
446 next();
447 }
448
450 };
#define FTENSOR_INDEX(DIM, I)
constexpr int SPACE_DIM
Tensor1< T, Tensor_Dim > normalize()
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
double kappa
FTensor::Index< 'i', SPACE_DIM > i
FTensor::Index< 'J', DIM1 > J
Definition level_set.cpp:30
static T getAlpha(const T &kappa, double gc, double min_stiffness)
static auto calculateGap(const FTensor::Tensor1< T, 3 > &t_traction, FTensor::Tensor1< double, 3 > &t_n_normalize, double alpha, double beta)
boost::shared_ptr< MatrixDouble > fluxMatPtr
MatrixDouble & getN(const FieldApproximationBase base)
get base functions this return matrix (nb. of rows is equal to nb. of Gauss pts, nb....
FTensor::Tensor1< FTensor::PackPtr< double *, Tensor_Dim >, Tensor_Dim > getFTensor1N(FieldApproximationBase base)
Get base functions for Hdiv/Hcurl spaces.
const VectorInt & getIndices() const
Get global indices of degrees of freedom on entity.
VectorDouble locF
local entity vector

Member Data Documentation

◆ dissipationTag

Tag EshelbianPlasticity::OpCohesiveRhs::dissipationTag
protected

Definition at line 461 of file EshelbianCohesive.cpp.

◆ gcPtr

boost::shared_ptr<double> EshelbianPlasticity::OpCohesiveRhs::gcPtr
protected

Definition at line 454 of file EshelbianCohesive.cpp.

◆ gradDissipationTag

Tag EshelbianPlasticity::OpCohesiveRhs::gradDissipationTag
protected

Definition at line 462 of file EshelbianCohesive.cpp.

◆ kappaDeltaPtr

boost::shared_ptr<VectorDouble> EshelbianPlasticity::OpCohesiveRhs::kappaDeltaPtr
protected

Definition at line 456 of file EshelbianCohesive.cpp.

◆ kappaPtr

boost::shared_ptr<VectorDouble> EshelbianPlasticity::OpCohesiveRhs::kappaPtr
protected

Definition at line 455 of file EshelbianCohesive.cpp.

◆ lambdaPtr

boost::shared_ptr<std::array<MatrixDouble, 2> > EshelbianPlasticity::OpCohesiveRhs::lambdaPtr
protected

Definition at line 457 of file EshelbianCohesive.cpp.

◆ tatalDissipationGrad

boost::shared_ptr<double> EshelbianPlasticity::OpCohesiveRhs::tatalDissipationGrad
protected

Definition at line 459 of file EshelbianCohesive.cpp.

◆ totalDissipation

boost::shared_ptr<double> EshelbianPlasticity::OpCohesiveRhs::totalDissipation
protected

Definition at line 458 of file EshelbianCohesive.cpp.

◆ uGammaPtr

boost::shared_ptr<MatrixDouble> EshelbianPlasticity::OpCohesiveRhs::uGammaPtr
protected

Definition at line 453 of file EshelbianCohesive.cpp.

◆ vec_dJdu

SmartPetscObj<Vec> EshelbianPlasticity::OpCohesiveRhs::vec_dJdu
protected

Definition at line 460 of file EshelbianCohesive.cpp.


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