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

Public Types

using OP = OpCohesiveRhs
 
- Public Types inherited from EshelbianPlasticity::OpCohesiveRhs
using OP = OpBrokenBaseCohesive
 
- Public Types inherited from EshelbianPlasticity::OpBrokenBaseCohesive
using OP = FormsIntegrators< FaceElementForcesAndSourcesCore::UserDataOperator >::Assembly< A >::OpBrokenBase
 

Public Member Functions

MoFEMErrorCode iNtegrate (EntData &data)
 
MoFEMErrorCode aSsemble (EntData &data)
 
 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)
 
- Public Member Functions inherited from 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)
 
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)
 

Additional Inherited Members

- Protected Attributes inherited from EshelbianPlasticity::OpCohesiveRhs
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 471 of file EshelbianCohesive.cpp.

Member Typedef Documentation

◆ OP

Definition at line 473 of file EshelbianCohesive.cpp.

Member Function Documentation

◆ aSsemble()

MoFEMErrorCode EshelbianPlasticity::OpCohesiveLhs_dPdP::aSsemble ( EntData data)
inline

Definition at line 555 of file EshelbianCohesive.cpp.

555 {
557
558 if (!this->timeScalingFun.empty())
559 this->locMat *= this->timeScalingFun(this->getFEMethod()->ts_t);
560 if (!this->feScalingFun.empty())
561 this->locMat *= this->feScalingFun(this->getFEMethod());
562 // assemble local matrix
563 CHKERR this->matSetValuesHook(this, data, data, this->locMat);
564
566 }
#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()
#define CHKERR
Inline error check.

◆ iNtegrate()

MoFEMErrorCode EshelbianPlasticity::OpCohesiveLhs_dPdP::iNtegrate ( EntData data)
inline

Definition at line 476 of file EshelbianCohesive.cpp.

476 {
478
479 auto get_sense_index = [this]() { return (faceSense == 1) ? 0 : 1; };
480
481 auto nb_dofs = data.getIndices().size();
482 FTENSOR_INDEX(3, i);
483 FTENSOR_INDEX(3, j);
484 FTENSOR_INDEX(3, J);
485
486 int nb_integration_pts = OP::getGaussPts().size2();
487
488 auto t_P = getFTensor2FromMat<3, 3>(*(OP::fluxMatPtr));
489 auto t_kappa = getFTensor0FromVec<0>(*kappaPtr);
490 auto t_delta_kappa = getFTensor0FromVec<0>(*kappaDeltaPtr);
491 auto t_face_normal = getFTensor1NormalsAtGaussPts();
492
493 int nb_base_functions = data.getN().size2() / 3;
494 auto t_row_base_fun = data.getFTensor1N<3>();
495 auto t_w = OP::getFTensor0IntegrationWeight();
496
497 auto next = [&]() {
498 ++t_P;
499 ++t_kappa;
500 ++t_delta_kappa;
501 ++t_face_normal;
502 ++t_w;
503 };
504
505 for (auto gg = 0; gg != nb_integration_pts; ++gg) {
507 t_normal(J) = t_face_normal(J) * (faceSense / 2.);
508 FTensor::Tensor1<double, 3> t_normalized_normal;
509 t_normalized_normal(J) = t_normal(J);
510 t_normalized_normal.normalize();
512 t_traction(i) = t_P(i, J) * t_normalized_normal(J);
513
514 auto fracture = [this](auto &t_traction, auto &t_normalized_normal,
515 auto &t_kappa, auto &t_delta_kappa, auto gc) {
516 double kappa = static_cast<double>(t_kappa + t_delta_kappa);
520 t_traction, t_normalized_normal, alpha, OpGetParameters::beta);
521 FTENSOR_INDEX(3, i);
522 FTENSOR_INDEX(3, j);
523 FTensor::Tensor2<double, 3, 3> t_dgap_double;
524 t_dgap_double(i, j) = -t_dgap(i, j);
525 return t_dgap_double;
526 };
527
528 auto assemble = [&](const FTensor::Tensor2<double, 3, 3> &&t_dgap) {
529 int rr = 0;
530 for (; rr != nb_dofs / SPACE_DIM; ++rr) {
531 auto t_mat = getFTensor2FromArray<3, 3, 3>(OP::locMat, 3 * rr);
532 double row_base = t_w * (t_row_base_fun(J) * t_normal(J));
533 auto t_col_base_fun = data.getFTensor1N<3>(gg, 0);
534 for (int cc = 0; cc != nb_dofs / SPACE_DIM; ++cc) {
535 double col_base = t_col_base_fun(J) * t_normalized_normal(J);
536 t_mat(i, j) += (row_base * col_base) * t_dgap(i, j);
537 ++t_mat;
538 ++t_col_base_fun;
539 }
540 ++t_row_base_fun;
541 }
542 for (; rr != nb_base_functions; ++rr)
543 ++t_row_base_fun;
544 };
545
546 assemble(fracture(t_traction, t_normalized_normal, t_kappa, t_delta_kappa,
547 *gcPtr));
548
549 next();
550 }
551
553 };
#define FTENSOR_INDEX(DIM, I)
constexpr int SPACE_DIM
Tensor1< T, Tensor_Dim > normalize()
double kappa
FTensor::Index< 'i', SPACE_DIM > i
FTensor::Index< 'J', DIM1 > J
Definition level_set.cpp:30
FTensor::Index< 'j', 3 > j
static T getAlpha(const T &kappa, double gc, double min_stiffness)
static auto calculateDiffGapDTraction(const FTensor::Tensor1< T, 3 > &t_traction, FTensor::Tensor1< double, 3 > &t_n_normalize, double alpha, double beta)
boost::shared_ptr< MatrixDouble > fluxMatPtr
boost::shared_ptr< double > gcPtr
boost::shared_ptr< VectorDouble > kappaDeltaPtr
boost::shared_ptr< VectorDouble > kappaPtr
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.

◆ 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 372 of file EshelbianCohesive.cpp.

381 : OpBrokenBaseCohesive(broken_base_side_data, ents_ptr), gcPtr(gc_ptr),
382 kappaPtr(kappa_ptr), kappaDeltaPtr(kappa_delta_ptr),
383 lambdaPtr(lambda_ptr), dissipationTag(dissipation_tags),
384 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< std::array< MatrixDouble, 2 > > lambdaPtr

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