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

Member Typedef Documentation

◆ OP

Definition at line 733 of file EshelbianCohesive.cpp.

Member Function Documentation

◆ aSsemble()

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

Definition at line 811 of file EshelbianCohesive.cpp.

811 {
813 return VecSetValues<AssemblyTypeSelector<A>>(vec_dJdu, data, OP::locF,
814 ADD_VALUES);
816 }
#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 736 of file EshelbianCohesive.cpp.

736 {
738
739 FTENSOR_INDEX(3, i);
740 FTENSOR_INDEX(3, J);
741
742 int nb_integration_pts = OP::getGaussPts().size2();
743 auto nb_dofs = data.getIndices().size();
744
745 int nb_base_functions = data.getN().size2() / 3;
746 auto t_row_base_fun = data.getFTensor1N<3>();
747 auto t_w = OP::getFTensor0IntegrationWeight();
748
749 auto t_P = getFTensor2FromMat<3, 3>(*(OP::fluxMatPtr));
750 auto t_kappa = getFTensor0FromVec<0>(*kappaPtr);
751 auto t_delta_kappa = getFTensor0FromVec<0>(*kappaDeltaPtr);
752 auto t_face_normal = getFTensor1NormalsAtGaussPts();
753
754 auto next = [&]() {
755 ++t_P;
756 ++t_face_normal;
757 ++t_kappa;
758 ++t_delta_kappa;
759 ++t_w;
760 };
761
762 for (auto gg = 0; gg != nb_integration_pts; ++gg) {
764 t_normal(J) = t_face_normal(J) * (faceSense / 2.);
765 FTensor::Tensor1<double, 3> t_normalized_normal;
766 t_normalized_normal(J) = t_normal(J);
767 t_normalized_normal.normalize();
769 t_traction(i) = t_P(i, J) * t_normalized_normal(J);
770
771 auto dJ_dtraction = [](auto &t_traction, auto &t_normalized_normal,
772 auto &t_delta_kappa, auto &t_kappa, auto gc) {
773 double kappa = static_cast<double>(t_kappa);
774 double delta_kappa = static_cast<double>(t_delta_kappa);
775 FTENSOR_INDEX(3, i);
776 FTensor::Tensor1<double, 3> t_traction_double;
777 t_traction_double(i) = t_traction(i);
778 auto t_dM =
780 t_traction_double, delta_kappa, kappa, t_normalized_normal, gc,
782 FTensor::Tensor1<double, 3> t_dJ_double;
783 t_dJ_double(i) = t_dM(i);
784 return t_dJ_double;
785 };
786
787 auto assemble = [&](const FTensor::Tensor1<double, 3> &&t_dJ) {
788
789 auto t_nf = getFTensor1FromPtr<3>(&*OP::locF.begin());
790 int bb = 0;
791 for (; bb != nb_dofs / SPACE_DIM; ++bb) {
792 double row_base = t_w * (t_row_base_fun(J) * t_normal(J));
793 t_nf(i) += row_base * t_dJ(i);
794 ++t_nf;
795 ++t_row_base_fun;
796 }
797 for (; bb != nb_base_functions; ++bb)
798 ++t_row_base_fun;
799 };
800
801 assemble(dJ_dtraction(t_traction, t_normalized_normal, t_delta_kappa,
802 t_kappa, *gcPtr));
803
804 // cerr << "AAAA " << OP::locF << endl;
805 next();
806 }
807
809 };
#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....
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: