v0.15.5
Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
EshelbianPlasticity::OpCohesive_dJ_dP Struct Reference
Inheritance diagram for EshelbianPlasticity::OpCohesive_dJ_dP:
[legend]
Collaboration diagram for EshelbianPlasticity::OpCohesive_dJ_dP:
[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 680 of file EshelbianCohesive.cpp.

Member Typedef Documentation

◆ OP

Definition at line 682 of file EshelbianCohesive.cpp.

Member Function Documentation

◆ aSsemble()

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

Definition at line 760 of file EshelbianCohesive.cpp.

760 {
762 return VecSetValues<AssemblyTypeSelector<A>>(vec_dJdu, data, OP::locF,
763 ADD_VALUES);
765 }
#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()

◆ iNtegrate()

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

Definition at line 685 of file EshelbianCohesive.cpp.

685 {
687
688 FTENSOR_INDEX(3, i);
689 FTENSOR_INDEX(3, J);
690
691 int nb_integration_pts = OP::getGaussPts().size2();
692 auto nb_dofs = data.getIndices().size();
693
694 int nb_base_functions = data.getN().size2() / 3;
695 auto t_row_base_fun = data.getFTensor1N<3>();
696 auto t_w = OP::getFTensor0IntegrationWeight();
697
698 auto t_P = getFTensor2FromMat<3, 3>(*(OP::fluxMatPtr));
699 auto t_kappa = getFTensor0FromVec<0>(*kappaPtr);
700 auto t_delta_kappa = getFTensor0FromVec<0>(*kappaDeltaPtr);
701 auto t_face_normal = getFTensor1NormalsAtGaussPts();
702
703 auto next = [&]() {
704 ++t_P;
705 ++t_face_normal;
706 ++t_kappa;
707 ++t_delta_kappa;
708 ++t_w;
709 };
710
711 for (auto gg = 0; gg != nb_integration_pts; ++gg) {
713 t_normal(J) = t_face_normal(J) * (faceSense / 2.);
714 FTensor::Tensor1<double, 3> t_normalized_normal;
715 t_normalized_normal(J) = t_normal(J);
716 t_normalized_normal.normalize();
718 t_traction(i) = t_P(i, J) * t_normalized_normal(J);
719
720 auto dJ_dtraction = [](auto &t_traction, auto &t_normalized_normal,
721 auto &t_delta_kappa, auto &t_kappa, auto gc) {
722 double kappa = static_cast<double>(t_kappa);
723 double delta_kappa = static_cast<double>(t_delta_kappa);
724 FTENSOR_INDEX(3, i);
725 FTensor::Tensor1<double, 3> t_traction_double;
726 t_traction_double(i) = t_traction(i);
727 auto t_dM =
729 t_traction_double, delta_kappa, kappa, t_normalized_normal, gc,
731 FTensor::Tensor1<double, 3> t_dJ_double;
732 t_dJ_double(i) = t_dM(i);
733 return t_dJ_double;
734 };
735
736 auto assemble = [&](const FTensor::Tensor1<double, 3> &&t_dJ) {
737
738 auto t_nf = getFTensor1FromPtr<3>(&*OP::locF.begin());
739 int bb = 0;
740 for (; bb != nb_dofs / SPACE_DIM; ++bb) {
741 double row_base = t_w * (t_row_base_fun(J) * t_normal(J));
742 t_nf(i) += row_base * t_dJ(i);
743 ++t_nf;
744 ++t_row_base_fun;
745 }
746 for (; bb != nb_base_functions; ++bb)
747 ++t_row_base_fun;
748 };
749
750 assemble(dJ_dtraction(t_traction, t_normalized_normal, t_delta_kappa,
751 t_kappa, *gcPtr));
752
753 // cerr << "AAAA " << OP::locF << endl;
754 next();
755 }
756
758 };
#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
static auto calculateDissipationSurplusDiffTraction(const FTensor::Tensor1< T, 3 > &t_traction, const T &delta_kappa, const T &kappa, FTensor::Tensor1< double, 3 > &t_n_normalize, double gc, 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: