v0.16.0
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 521 of file EshelbianCohesive.cpp.

Member Typedef Documentation

◆ OP

Definition at line 523 of file EshelbianCohesive.cpp.

Member Function Documentation

◆ aSsemble()

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

Definition at line 606 of file EshelbianCohesive.cpp.

606 {
608
609 if (!this->timeScalingFun.empty())
610 this->locMat *= this->timeScalingFun(this->getFEMethod()->ts_t);
611 if (!this->feScalingFun.empty())
612 this->locMat *= this->feScalingFun(this->getFEMethod());
613 // assemble local matrix
614 CHKERR this->matSetValuesHook(this, data, data, this->locMat);
615
617 }
#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 526 of file EshelbianCohesive.cpp.

526 {
528
529 auto get_sense_index = [this]() { return (faceSense == 1) ? 0 : 1; };
530
531 auto nb_dofs = data.getIndices().size();
532 FTENSOR_INDEX(3, i);
533 FTENSOR_INDEX(3, j);
534 FTENSOR_INDEX(3, J);
535
536 int nb_integration_pts = OP::getGaussPts().size2();
537
538 auto t_P = getFTensor2FromMat<3, 3>(*(OP::fluxMatPtr));
539 auto t_kappa = getFTensor0FromVec<0>(*kappaPtr);
540 auto t_delta_kappa = getFTensor0FromVec<0>(*kappaDeltaPtr);
541 auto t_face_normal = getFTensor1NormalsAtGaussPts();
542
543 int nb_base_functions = data.getN().size2() / 3;
544 auto t_row_base_fun = data.getFTensor1N<3>();
545 auto t_w = OP::getFTensor0IntegrationWeight();
546
547 auto next = [&]() {
548 ++t_P;
549 ++t_kappa;
550 ++t_delta_kappa;
551 ++t_face_normal;
552 ++t_w;
553 };
554
555 for (auto gg = 0; gg != nb_integration_pts; ++gg) {
557 t_normal(J) = t_face_normal(J) * (faceSense / 2.);
558 FTensor::Tensor1<double, 3> t_normalized_normal;
559 t_normalized_normal(J) = t_normal(J);
560 t_normalized_normal.normalize();
562 t_traction(i) = t_P(i, J) * t_normalized_normal(J);
563
564 auto fracture = [this](auto &t_traction, auto &t_normalized_normal,
565 auto &t_kappa, auto &t_delta_kappa, auto gc) {
566 double kappa = static_cast<double>(t_kappa + t_delta_kappa);
570 t_traction, t_normalized_normal, alpha, OpGetParameters::beta,
571 true);
572 FTENSOR_INDEX(3, i);
573 FTENSOR_INDEX(3, j);
574 FTensor::Tensor2<double, 3, 3> t_dgap_double;
575 t_dgap_double(i, j) = -t_dgap(i, j) / 2.;
576 return t_dgap_double;
577 };
578
579 auto assemble = [&](const FTensor::Tensor2<double, 3, 3> &&t_dgap) {
580 int rr = 0;
581 for (; rr != nb_dofs / SPACE_DIM; ++rr) {
582 auto t_mat = getFTensor2FromArray<3, 3, 3>(OP::locMat, 3 * rr);
583 double row_base = t_w * (t_row_base_fun(J) * t_normal(J));
584 auto t_col_base_fun = data.getFTensor1N<3>(gg, 0);
585 for (int cc = 0; cc != nb_dofs / SPACE_DIM; ++cc) {
586 double col_base = t_col_base_fun(J) * t_normalized_normal(J);
587 t_mat(i, j) += (row_base * col_base) * t_dgap(i, j);
588 ++t_mat;
589 ++t_col_base_fun;
590 }
591 ++t_row_base_fun;
592 }
593 for (; rr != nb_base_functions; ++rr)
594 ++t_row_base_fun;
595 };
596
597 assemble(fracture(t_traction, t_normalized_normal, t_kappa, t_delta_kappa,
598 *gcPtr));
599
600 next();
601 }
602
604 };
#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, bool sign_sensitive=true)
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....
auto 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 421 of file EshelbianCohesive.cpp.

430 : OpBrokenBaseCohesive(broken_base_side_data, ents_ptr), gcPtr(gc_ptr),
431 kappaPtr(kappa_ptr), kappaDeltaPtr(kappa_delta_ptr),
432 lambdaPtr(lambda_ptr), dissipationTag(dissipation_tags),
433 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: