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

Member Typedef Documentation

◆ OP

Definition at line 701 of file EshelbianCohesive.cpp.

Member Function Documentation

◆ aSsemble()

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

Definition at line 779 of file EshelbianCohesive.cpp.

779 {
781 return VecSetValues<AssemblyTypeSelector<A>>(vec_dJdu, data, OP::locF,
782 ADD_VALUES);
784 }
#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 704 of file EshelbianCohesive.cpp.

704 {
706
707 FTENSOR_INDEX(3, i);
708 FTENSOR_INDEX(3, J);
709
710 int nb_integration_pts = OP::getGaussPts().size2();
711 auto nb_dofs = data.getIndices().size();
712
713 int nb_base_functions = data.getN().size2() / 3;
714 auto t_row_base_fun = data.getFTensor1N<3>();
715 auto t_w = OP::getFTensor0IntegrationWeight();
716
717 auto t_P = getFTensor2FromMat<3, 3>(*(OP::fluxMatPtr));
718 auto t_kappa = getFTensor0FromVec<0>(*kappaPtr);
719 auto t_delta_kappa = getFTensor0FromVec<0>(*kappaDeltaPtr);
720 auto t_face_normal = getFTensor1NormalsAtGaussPts();
721
722 auto next = [&]() {
723 ++t_P;
724 ++t_face_normal;
725 ++t_kappa;
726 ++t_delta_kappa;
727 ++t_w;
728 };
729
730 for (auto gg = 0; gg != nb_integration_pts; ++gg) {
732 t_normal(J) = t_face_normal(J) * (faceSense / 2.);
733 FTensor::Tensor1<double, 3> t_normalized_normal;
734 t_normalized_normal(J) = t_normal(J);
735 t_normalized_normal.normalize();
737 t_traction(i) = t_P(i, J) * t_normalized_normal(J);
738
739 auto dJ_dtraction = [](auto &t_traction, auto &t_normalized_normal,
740 auto &t_delta_kappa, auto &t_kappa, auto gc) {
741 double kappa = static_cast<double>(t_kappa);
742 double delta_kappa = static_cast<double>(t_delta_kappa);
743 FTENSOR_INDEX(3, i);
744 FTensor::Tensor1<double, 3> t_traction_double;
745 t_traction_double(i) = t_traction(i);
746 auto t_dM =
748 t_traction_double, delta_kappa, kappa, t_normalized_normal, gc,
750 FTensor::Tensor1<double, 3> t_dJ_double;
751 t_dJ_double(i) = t_dM(i);
752 return t_dJ_double;
753 };
754
755 auto assemble = [&](const FTensor::Tensor1<double, 3> &&t_dJ) {
756
757 auto t_nf = getFTensor1FromPtr<3>(&*OP::locF.begin());
758 int bb = 0;
759 for (; bb != nb_dofs / SPACE_DIM; ++bb) {
760 double row_base = t_w * (t_row_base_fun(J) * t_normal(J));
761 t_nf(i) += row_base * t_dJ(i);
762 ++t_nf;
763 ++t_row_base_fun;
764 }
765 for (; bb != nb_base_functions; ++bb)
766 ++t_row_base_fun;
767 };
768
769 assemble(dJ_dtraction(t_traction, t_normalized_normal, t_delta_kappa,
770 t_kappa, *gcPtr));
771
772 // cerr << "AAAA " << OP::locF << endl;
773 next();
774 }
775
777 };
#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, double min_stiffness)
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 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< std::array< MatrixDouble, 2 > > lambdaPtr

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