v0.15.5
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 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)
 
- 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)
 

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
 

Detailed Description

Definition at line 386 of file EshelbianCohesive.cpp.

Member Typedef Documentation

◆ OP

Definition at line 388 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 389 of file EshelbianCohesive.cpp.

398 : OpBrokenBaseCohesive(broken_base_side_data, ents_ptr), gcPtr(gc_ptr),
399 kappaPtr(kappa_ptr), kappaDeltaPtr(kappa_delta_ptr),
400 lambdaPtr(lambda_ptr), dissipationTag(dissipation_tags),
401 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)
inline

Definition at line 403 of file EshelbianCohesive.cpp.

403 {
405
406 auto get_sense_index = [this]() { return (faceSense == 1) ? 0 : 1; };
407
408 auto nb_dofs = data.getIndices().size();
409 FTENSOR_INDEX(3, i);
410 FTENSOR_INDEX(3, J);
411
412 int nb_integration_pts = OP::getGaussPts().size2();
413
414 auto t_P = getFTensor2FromMat<3, 3>(*(OP::fluxMatPtr));
415 auto t_kappa = getFTensor0FromVec<0>(*kappaPtr);
416 auto t_delta_kappa = getFTensor0FromVec<0>(*kappaDeltaPtr);
417 auto t_face_normal = getFTensor1NormalsAtGaussPts();
418
419 int nb_base_functions = data.getN().size2() / 3;
420 auto t_row_base_fun = data.getFTensor1N<3>();
421 auto t_w = OP::getFTensor0IntegrationWeight();
422
423 auto next = [&]() {
424 ++t_P;
425 ++t_face_normal;
426 ++t_kappa;
427 ++t_delta_kappa;
428 ++t_w;
429 };
430
431 for (auto gg = 0; gg != nb_integration_pts; ++gg) {
433 t_normal(J) = t_face_normal(J) * (faceSense / 2.);
434 FTensor::Tensor1<double, 3> t_normalized_normal;
435 t_normalized_normal(J) = t_normal(J);
436 t_normalized_normal.normalize();
438 t_traction(i) = t_P(i, J) * t_normalized_normal(J);
439
440 auto fracture = [this](auto &t_traction, auto &t_normalized_normal,
441 auto &t_kappa, auto &t_delta_kappa, auto gc) {
442 double kappa = static_cast<double>(t_kappa + t_delta_kappa);
445 auto [teff, t_gap] = GriffithCohesiveLaw::calculateGap(
446 t_traction, t_normalized_normal, alpha, OpGetParameters::beta,
447 true);
448 FTENSOR_INDEX(3, i);
449 FTensor::Tensor1<double, 3> t_gap_double;
450 t_gap_double(i) = -t_gap(i);
451 return t_gap_double;
452 };
453
454 auto assemble = [&](const FTensor::Tensor1<double, 3> &&t_gap) {
455 auto t_nf = getFTensor1FromPtr<3>(&*OP::locF.begin());
456 int bb = 0;
457 for (; bb != nb_dofs / SPACE_DIM; ++bb) {
458 double row_base = t_w * (t_row_base_fun(J) * t_normal(J));
459 t_nf(i) += row_base * t_gap(i);
460 ++t_nf;
461 ++t_row_base_fun;
462 }
463 for (; bb != nb_base_functions; ++bb)
464 ++t_row_base_fun;
465 };
466
467 assemble(fracture(t_traction, t_normalized_normal, t_kappa, t_delta_kappa,
468 *gcPtr));
469
470 next();
471 }
472
474 };
#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, bool sign_sensitive=true)
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.

Member Data Documentation

◆ dissipationTag

Tag EshelbianPlasticity::OpCohesiveRhs::dissipationTag
protected

Definition at line 485 of file EshelbianCohesive.cpp.

◆ gcPtr

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

Definition at line 478 of file EshelbianCohesive.cpp.

◆ gradDissipationTag

Tag EshelbianPlasticity::OpCohesiveRhs::gradDissipationTag
protected

Definition at line 486 of file EshelbianCohesive.cpp.

◆ kappaDeltaPtr

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

Definition at line 480 of file EshelbianCohesive.cpp.

◆ kappaPtr

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

Definition at line 479 of file EshelbianCohesive.cpp.

◆ lambdaPtr

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

Definition at line 481 of file EshelbianCohesive.cpp.

◆ tatalDissipationGrad

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

Definition at line 483 of file EshelbianCohesive.cpp.

◆ totalDissipation

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

Definition at line 482 of file EshelbianCohesive.cpp.

◆ uGammaPtr

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

Definition at line 477 of file EshelbianCohesive.cpp.

◆ vec_dJdu

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

Definition at line 484 of file EshelbianCohesive.cpp.


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