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

Public Member Functions

 OpSpatialPhysical_du_du (std::string row_field, std::string col_field, boost::shared_ptr< DataAtIntegrationPts > data_ptr, const double alpha)
 
MoFEMErrorCode integrate (EntData &row_data, EntData &col_data)
 
MoFEMErrorCode integrateHencky (EntData &row_data, EntData &col_data)
 
MoFEMErrorCode integratePolyconvexHencky (EntData &row_data, EntData &col_data)
 
- Public Member Functions inherited from OpAssembleVolume
MoFEMErrorCode assemble (int row_side, int col_side, EntityType row_type, EntityType col_type, EntData &row_data, EntData &col_data)
 
- Public Member Functions inherited from OpAssembleBasic< VolUserDataOperator >
 OpAssembleBasic (const std::string &field_name, boost::shared_ptr< DataAtIntegrationPts > data_ptr, const char type)
 
 OpAssembleBasic (std::string row_field, std::string col_field, boost::shared_ptr< DataAtIntegrationPts > data_ptr, const char type, const bool assemble_symmetry, ScaleOff scale_off=[]() { return 1;})
 
 OpAssembleBasic (const FieldSpace space)
 
virtual MoFEMErrorCode integrate (EntData &data)
 
virtual MoFEMErrorCode integrate (int row_side, EntityType row_type, EntData &data)
 
virtual MoFEMErrorCode assemble (EntData &data)
 
virtual MoFEMErrorCode assemble (int row_side, EntityType row_type, EntData &data)
 
MoFEMErrorCode doWork (int side, EntityType type, EntData &data)
 
MoFEMErrorCode doWork (int row_side, int col_side, EntityType row_type, EntityType col_type, EntData &row_data, EntData &col_data)
 
- Public Member Functions inherited from MoFEM::VolumeElementForcesAndSourcesCore::UserDataOperator
int getNumNodes ()
 get element number of nodes
 
const EntityHandlegetConn ()
 get element connectivity
 
double getVolume () const
 element volume (linear geometry)
 
doublegetVolume ()
 element volume (linear geometry)
 
FTensor::Tensor2< double *, 3, 3 > & getJac ()
 get element Jacobian
 
FTensor::Tensor2< double *, 3, 3 > & getInvJac ()
 get element inverse Jacobian
 
VectorDoublegetCoords ()
 nodal coordinates
 
VolumeElementForcesAndSourcesCoregetVolumeFE () const
 return pointer to Generic Volume Finite Element object
 
- Public Member Functions inherited from MoFEM::ForcesAndSourcesCore::UserDataOperator
 UserDataOperator (const FieldSpace space, const char type=OPSPACE, const bool symm=true)
 Constructor for operators working on finite element spaces.
 
 UserDataOperator (const std::string field_name, const char type, const bool symm=true)
 Constructor for operators working on a single field.
 
 UserDataOperator (const std::string row_field_name, const std::string col_field_name, const char type, const bool symm=true)
 Constructor for operators working on two fields (bilinear forms)
 
boost::shared_ptr< const NumeredEntFiniteElementgetNumeredEntFiniteElementPtr () const
 Return raw pointer to NumeredEntFiniteElement.
 
EntityHandle getFEEntityHandle () const
 Return finite element entity handle.
 
int getFEDim () const
 Get dimension of finite element.
 
EntityType getFEType () const
 Get dimension of finite element.
 
boost::weak_ptr< SideNumbergetSideNumberPtr (const int side_number, const EntityType type)
 Get the side number pointer.
 
EntityHandle getSideEntity (const int side_number, const EntityType type)
 Get the side entity.
 
int getNumberOfNodesOnElement () const
 Get the number of nodes on finite element.
 
MoFEMErrorCode getProblemRowIndices (const std::string filed_name, const EntityType type, const int side, VectorInt &indices) const
 Get row indices.
 
MoFEMErrorCode getProblemColIndices (const std::string filed_name, const EntityType type, const int side, VectorInt &indices) const
 Get col indices.
 
const FEMethodgetFEMethod () const
 Return raw pointer to Finite Element Method object.
 
int getOpType () const
 Get operator types.
 
void setOpType (const OpType type)
 Set operator type.
 
void addOpType (const OpType type)
 Add operator type.
 
int getNinTheLoop () const
 get number of finite element in the loop
 
int getLoopSize () const
 get size of elements in the loop
 
std::string getFEName () const
 Get name of the element.
 
ForcesAndSourcesCoregetPtrFE () const
 
ForcesAndSourcesCoregetSidePtrFE () const
 
ForcesAndSourcesCoregetRefinePtrFE () const
 
const PetscData::SwitchesgetDataCtx () const
 
const KspMethod::KSPContext getKSPCtx () const
 
const SnesMethod::SNESContext getSNESCtx () const
 
const TSMethod::TSContext getTSCtx () const
 
Vec getKSPf () const
 
Mat getKSPA () const
 
Mat getKSPB () const
 
Vec getSNESf () const
 
Vec getSNESx () const
 
Mat getSNESA () const
 
Mat getSNESB () const
 
Vec getTSu () const
 
Vec getTSu_t () const
 
Vec getTSu_tt () const
 
Vec getTSf () const
 
Mat getTSA () const
 
Mat getTSB () const
 
int getTSstep () const
 
double getTStime () const
 
double getTStimeStep () const
 
double getTSa () const
 
double getTSaa () const
 
MatrixDoublegetGaussPts ()
 matrix of integration (Gauss) points for Volume Element
 
auto getFTensor0IntegrationWeight ()
 Get integration weights.
 
MatrixDoublegetCoordsAtGaussPts ()
 Gauss points and weight, matrix (nb. of points x 3)
 
auto getFTensor1CoordsAtGaussPts ()
 Get coordinates at integration points assuming linear geometry.
 
double getMeasure () const
 get measure of element
 
doublegetMeasure ()
 get measure of element
 
MoFEM::InterfacegetMField ()
 
moab::Interface & getMoab ()
 
virtual boost::weak_ptr< ForcesAndSourcesCoregetSubPipelinePtr () const
 
MoFEMErrorCode loopSide (const string &fe_name, ForcesAndSourcesCore *side_fe, const size_t dim, const EntityHandle ent_for_side=0, boost::shared_ptr< Range > fe_range=nullptr, const int verb=QUIET, const LogManager::SeverityLevel sev=Sev::noisy, AdjCache *adj_cache=nullptr)
 User calls this function to loop over elements on the side of face. This function calls finite element with its operator to do calculations.
 
MoFEMErrorCode loopThis (const string &fe_name, ForcesAndSourcesCore *this_fe, const int verb=QUIET, const LogManager::SeverityLevel sev=Sev::noisy)
 User calls this function to loop over the same element using a different set of integration points. This function calls finite element with its operator to do calculations.
 
MoFEMErrorCode loopParent (const string &fe_name, ForcesAndSourcesCore *parent_fe, const int verb=QUIET, const LogManager::SeverityLevel sev=Sev::noisy)
 User calls this function to loop over parent elements. This function calls finite element with its operator to do calculations.
 
MoFEMErrorCode loopChildren (const string &fe_name, ForcesAndSourcesCore *child_fe, const int verb=QUIET, const LogManager::SeverityLevel sev=Sev::noisy)
 User calls this function to loop over parent elements. This function calls finite element with its operator to do calculations.
 
MoFEMErrorCode loopRange (const string &fe_name, ForcesAndSourcesCore *range_fe, boost::shared_ptr< Range > fe_range, const int verb=QUIET, const LogManager::SeverityLevel sev=Sev::noisy)
 Iterate over range of elements.
 
- Public Member Functions inherited from MoFEM::DataOperator
 DataOperator (const bool symm=true)
 
virtual ~DataOperator ()=default
 
virtual MoFEMErrorCode opLhs (EntitiesFieldData &row_data, EntitiesFieldData &col_data)
 
virtual MoFEMErrorCode opRhs (EntitiesFieldData &data, const bool error_if_no_base=false)
 
bool getSymm () const
 Get if operator uses symmetry of DOFs or not.
 
void setSymm ()
 set if operator is executed taking in account symmetry
 
void unSetSymm ()
 unset if operator is executed for non symmetric problem
 

Public Attributes

const double alphaU
 
- Public Attributes inherited from OpAssembleBasic< VolUserDataOperator >
const bool assembleSymmetry
 
boost::shared_ptr< DataAtIntegrationPtsdataAtPts
 data at integration pts
 
VectorDouble nF
 local right hand side vector
 
MatrixDouble K
 local tangent matrix
 
MatrixDouble transposeK
 
ScaleOff scaleOff
 
- Public Attributes inherited from MoFEM::ForcesAndSourcesCore::UserDataOperator
char opType
 
std::string rowFieldName
 
std::string colFieldName
 
FieldSpace sPace
 
- Public Attributes inherited from MoFEM::DataOperator
DoWorkLhsHookFunType doWorkLhsHook
 
DoWorkRhsHookFunType doWorkRhsHook
 
bool sYmm
 If true assume that matrix is symmetric structure.
 
std::array< bool, MBMAXTYPE > doEntities
 If true operator is executed for entity.
 
booldoVertices
 \deprectaed If false skip vertices
 
booldoEdges
 \deprectaed If false skip edges
 
booldoQuads
 \deprectaed
 
booldoTris
 \deprectaed
 
booldoTets
 \deprectaed
 
booldoPrisms
 \deprectaed
 

Private Attributes

PetscBool polyConvex = PETSC_FALSE
 
MatrixDouble dP
 

Additional Inherited Members

- Public Types inherited from OpAssembleVolume
using OP = OpAssembleBasic< VolUserDataOperator >
 
using ScaleOff = typename OP::ScaleOff
 
- Public Types inherited from OpAssembleBasic< VolUserDataOperator >
using ScaleOff = boost::function< double()>
 
- Public Types inherited from MoFEM::ForcesAndSourcesCore::UserDataOperator
enum  OpType {
  OPROW = 1 << 0 , OPCOL = 1 << 1 , OPROWCOL = 1 << 2 , OPSPACE = 1 << 3 ,
  OPLAST = 1 << 3
}
 Controls loop over entities on element. More...
 
using AdjCache = std::map< EntityHandle, std::vector< boost::weak_ptr< NumeredEntFiniteElement > > >
 
- Public Types inherited from MoFEM::DataOperator
using DoWorkLhsHookFunType = boost::function< MoFEMErrorCode(DataOperator *op_ptr, int row_side, int col_side, EntityType row_type, EntityType col_type, EntitiesFieldData::EntData &row_data, EntitiesFieldData::EntData &col_data)>
 
using DoWorkRhsHookFunType = boost::function< MoFEMErrorCode(DataOperator *op_ptr, int side, EntityType type, EntitiesFieldData::EntData &data)>
 
- Static Public Attributes inherited from MoFEM::ForcesAndSourcesCore::UserDataOperator
static const char *const OpTypeNames []
 
- Protected Member Functions inherited from MoFEM::VolumeElementForcesAndSourcesCore::UserDataOperator
MoFEMErrorCode setPtrFE (ForcesAndSourcesCore *ptr)
 
- Protected Attributes inherited from MoFEM::ForcesAndSourcesCore::UserDataOperator
ForcesAndSourcesCoreptrFE
 
- Static Protected Attributes inherited from OpAssembleVolume
static std::map< std::pair< std::string, std::string >, MatrixDouble > mapMatrix
 

Detailed Description

Definition at line 126 of file HMHHencky.cpp.

Constructor & Destructor Documentation

◆ OpSpatialPhysical_du_du()

EshelbianPlasticity::HMHHencky::OpSpatialPhysical_du_du::OpSpatialPhysical_du_du ( std::string  row_field,
std::string  col_field,
boost::shared_ptr< DataAtIntegrationPts data_ptr,
const double  alpha 
)

Definition at line 550 of file HMHHencky.cpp.

553 : OpAssembleVolume(row_field, col_field, data_ptr, OPROWCOL, false),
554 alphaU(alpha) {
555 sYmm = false;
556
557 CHK_MOAB_THROW(PetscOptionsGetBool(PETSC_NULLPTR, "", "-poly_convex",
558 &polyConvex, PETSC_NULLPTR),
559 "get polyconvex option failed");
560}
#define CHK_MOAB_THROW(err, msg)
Check error code of MoAB function and throw MoFEM exception.
PetscErrorCode PetscOptionsGetBool(PetscOptions *, const char pre[], const char name[], PetscBool *bval, PetscBool *set)
bool sYmm
If true assume that matrix is symmetric structure.
@ OPROWCOL
operator doWork is executed on FE rows &columns

Member Function Documentation

◆ integrate()

MoFEMErrorCode EshelbianPlasticity::HMHHencky::OpSpatialPhysical_du_du::integrate ( EntData row_data,
EntData col_data 
)
virtual

Reimplemented from OpAssembleBasic< VolUserDataOperator >.

Definition at line 667 of file HMHHencky.cpp.

668 {
670
671 if (polyConvex) {
672 CHKERR integratePolyconvexHencky(row_data, col_data);
673 } else {
674 CHKERR integrateHencky(row_data, col_data);
675 }
677}
#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.
MoFEMErrorCode integrateHencky(EntData &row_data, EntData &col_data)
MoFEMErrorCode integratePolyconvexHencky(EntData &row_data, EntData &col_data)

◆ integrateHencky()

MoFEMErrorCode EshelbianPlasticity::HMHHencky::OpSpatialPhysical_du_du::integrateHencky ( EntData row_data,
EntData col_data 
)

Definition at line 680 of file HMHHencky.cpp.

681 {
683
686 auto t_L = symm_L_tensor();
687 auto t_diff = diff_tensor();
688
689 int nb_integration_pts = row_data.getN().size1();
690 int row_nb_dofs = row_data.getIndices().size();
691 int col_nb_dofs = col_data.getIndices().size();
692
693 auto get_ftensor2 = [](MatrixDouble &m, const int r, const int c) {
695 size_symm>(
696
697 &m(r + 0, c + 0), &m(r + 0, c + 1), &m(r + 0, c + 2), &m(r + 0, c + 3),
698 &m(r + 0, c + 4), &m(r + 0, c + 5),
699
700 &m(r + 1, c + 0), &m(r + 1, c + 1), &m(r + 1, c + 2), &m(r + 1, c + 3),
701 &m(r + 1, c + 4), &m(r + 1, c + 5),
702
703 &m(r + 2, c + 0), &m(r + 2, c + 1), &m(r + 2, c + 2), &m(r + 2, c + 3),
704 &m(r + 2, c + 4), &m(r + 2, c + 5),
705
706 &m(r + 3, c + 0), &m(r + 3, c + 1), &m(r + 3, c + 2), &m(r + 3, c + 3),
707 &m(r + 3, c + 4), &m(r + 3, c + 5),
708
709 &m(r + 4, c + 0), &m(r + 4, c + 1), &m(r + 4, c + 2), &m(r + 4, c + 3),
710 &m(r + 4, c + 4), &m(r + 4, c + 5),
711
712 &m(r + 5, c + 0), &m(r + 5, c + 1), &m(r + 5, c + 2), &m(r + 5, c + 3),
713 &m(r + 5, c + 4), &m(r + 5, c + 5)
714
715 );
716 };
717 FTensor::Index<'i', 3> i;
718 FTensor::Index<'j', 3> j;
719 FTensor::Index<'k', 3> k;
720 FTensor::Index<'l', 3> l;
721 FTensor::Index<'m', 3> m;
722 FTensor::Index<'n', 3> n;
723
724 auto v = getVolume();
725 auto t_w = getFTensor0IntegrationWeight();
726
727 auto t_approx_P_adjoint__dstretch =
728 getFTensor2FromMat<3, 3>(dataAtPts->adjointPdstretchAtPts);
729 auto t_eigen_vals = getFTensor1FromMat<3>(dataAtPts->eigenVals);
730 auto t_eigen_vecs = getFTensor2FromMat<3, 3>(dataAtPts->eigenVecs);
731
732 int row_nb_base_functions = row_data.getN().size2();
733 auto t_row_base_fun = row_data.getFTensor0N();
734
735 auto get_dP = [&]() {
736 dP.resize(size_symm * size_symm, nb_integration_pts, false);
737 auto ts_a = getTSa();
738
739 auto t_D = getFTensor4DdgFromPtr<3, 3, 0>(&*dataAtPts->matD.data().begin());
741 t_dP_tmp(L, J) = -(1 + alphaU * ts_a) *
742 (t_L(i, j, L) *
743 ((t_D(i, j, m, n) * t_diff(m, n, k, l)) * t_L(k, l, J)));
744
747 auto t_approx_P_adjoint__dstretch =
748 getFTensor2FromMat<3, 3>(dataAtPts->adjointPdstretchAtPts);
749 auto t_eigen_vals = getFTensor1FromMat<3>(dataAtPts->eigenVals);
750 auto t_eigen_vecs = getFTensor2FromMat<3, 3>(dataAtPts->eigenVecs);
751 auto &nbUniq = dataAtPts->nbUniq;
752
753 auto t_dP = getFTensor2FromMat<size_symm, size_symm>(dP);
754 for (auto gg = 0; gg != nb_integration_pts; ++gg) {
755
756 // Work of symmetric tensor on undefined tensor is equal to the work
757 // of the symmetric part of it
759 t_sym(i, j) = (t_approx_P_adjoint__dstretch(i, j) ||
760 t_approx_P_adjoint__dstretch(j, i));
761 t_sym(i, j) /= 2.0;
762 auto t_diff2_uP2 = EigenMatrix::getDiffDiffMat(
763 t_eigen_vals, t_eigen_vecs, EshelbianCore::f, EshelbianCore::d_f,
764 EshelbianCore::dd_f, t_sym, nbUniq[gg]);
765 t_dP(L, J) = t_L(i, j, L) *
766 ((t_diff2_uP2(i, j, k, l) + t_diff2_uP2(k, l, i, j)) *
767 t_L(k, l, J)) /
768 2. +
769 t_dP_tmp(L, J);
770
771 ++t_dP;
772 ++t_approx_P_adjoint__dstretch;
773 ++t_eigen_vals;
774 ++t_eigen_vecs;
775 }
776 } else {
777 auto t_dP = getFTensor2FromMat<size_symm, size_symm>(dP);
778 for (auto gg = 0; gg != nb_integration_pts; ++gg) {
779 t_dP(L, J) = t_dP_tmp(L, J);
780 ++t_dP;
781 }
782 }
783
784 return getFTensor2FromMat<size_symm, size_symm>(dP);
785 };
786
787 auto t_dP = get_dP();
788 for (int gg = 0; gg != nb_integration_pts; ++gg) {
789 double a = v * t_w;
790
791 int rr = 0;
792 for (; rr != row_nb_dofs / 6; ++rr) {
793 auto t_col_base_fun = col_data.getFTensor0N(gg, 0);
794 auto t_m = get_ftensor2(K, 6 * rr, 0);
795 for (int cc = 0; cc != col_nb_dofs / 6; ++cc) {
796 const double b = a * t_row_base_fun * t_col_base_fun;
797 t_m(L, J) -= b * t_dP(L, J);
798 ++t_m;
799 ++t_col_base_fun;
800 }
801 ++t_row_base_fun;
802 }
803
804 for (; rr != row_nb_base_functions; ++rr) {
805 ++t_row_base_fun;
806 }
807
808 ++t_w;
809 ++t_dP;
810 }
812}
constexpr double a
FTensor::Index< 'i', SPACE_DIM > i
const double c
speed of light (cm/ns)
const double v
phase velocity of light in medium (cm/ns)
const double n
refractive index of diffusive medium
FTensor::Index< 'J', DIM1 > J
Definition level_set.cpp:30
FTensor::Index< 'l', 3 > l
FTensor::Index< 'j', 3 > j
FTensor::Index< 'k', 3 > k
auto getDiffDiffMat(A &&t_val, B &&t_vec, Fun< double > f, Fun< double > d_f, Fun< double > dd_f, C &&t_S, const int nb)
Get the Diff Diff Mat object.
static constexpr auto size_symm
UBlasMatrix< double > MatrixDouble
Definition Types.hpp:77
int r
Definition sdf.py:205
FTensor::Index< 'm', 3 > m
static enum StretchSelector stretchSelector
static enum RotSelector gradApproximator
static boost::function< double(const double)> f
static boost::function< double(const double)> dd_f
static boost::function< double(const double)> d_f
FTensor::Tensor0< FTensor::PackPtr< double *, 1 > > getFTensor0N(const FieldApproximationBase base)
Get base function as Tensor0.
MatrixDouble & getN(const FieldApproximationBase base)
get base functions this return matrix (nb. of rows is equal to nb. of Gauss pts, nb....
const VectorInt & getIndices() const
Get global indices of degrees of freedom on entity.
auto getFTensor0IntegrationWeight()
Get integration weights.
MatrixDouble K
local tangent matrix
boost::shared_ptr< DataAtIntegrationPts > dataAtPts
data at integration pts

◆ integratePolyconvexHencky()

MoFEMErrorCode EshelbianPlasticity::HMHHencky::OpSpatialPhysical_du_du::integratePolyconvexHencky ( EntData row_data,
EntData col_data 
)

Definition at line 814 of file HMHHencky.cpp.

815 {
817
820 auto t_L = symm_L_tensor();
821 auto t_diff = diff_tensor();
822
823 int nb_integration_pts = row_data.getN().size1();
824 int row_nb_dofs = row_data.getIndices().size();
825 int col_nb_dofs = col_data.getIndices().size();
826
827 auto get_ftensor2 = [](MatrixDouble &m, const int r, const int c) {
829 size_symm>(
830
831 &m(r + 0, c + 0), &m(r + 0, c + 1), &m(r + 0, c + 2), &m(r + 0, c + 3),
832 &m(r + 0, c + 4), &m(r + 0, c + 5),
833
834 &m(r + 1, c + 0), &m(r + 1, c + 1), &m(r + 1, c + 2), &m(r + 1, c + 3),
835 &m(r + 1, c + 4), &m(r + 1, c + 5),
836
837 &m(r + 2, c + 0), &m(r + 2, c + 1), &m(r + 2, c + 2), &m(r + 2, c + 3),
838 &m(r + 2, c + 4), &m(r + 2, c + 5),
839
840 &m(r + 3, c + 0), &m(r + 3, c + 1), &m(r + 3, c + 2), &m(r + 3, c + 3),
841 &m(r + 3, c + 4), &m(r + 3, c + 5),
842
843 &m(r + 4, c + 0), &m(r + 4, c + 1), &m(r + 4, c + 2), &m(r + 4, c + 3),
844 &m(r + 4, c + 4), &m(r + 4, c + 5),
845
846 &m(r + 5, c + 0), &m(r + 5, c + 1), &m(r + 5, c + 2), &m(r + 5, c + 3),
847 &m(r + 5, c + 4), &m(r + 5, c + 5)
848
849 );
850 };
851 FTensor::Index<'i', 3> i;
852 FTensor::Index<'j', 3> j;
853 FTensor::Index<'k', 3> k;
854 FTensor::Index<'l', 3> l;
855 FTensor::Index<'m', 3> m;
856 FTensor::Index<'n', 3> n;
857
858 auto v = getVolume();
859 auto t_w = getFTensor0IntegrationWeight();
860
861 int row_nb_base_functions = row_data.getN().size2();
862 auto t_row_base_fun = row_data.getFTensor0N();
863
864 auto get_dP = [&]() {
865 dP.resize(size_symm * size_symm, nb_integration_pts, false);
866 auto ts_a = getTSa();
867
868 auto t_D = getFTensor4DdgFromPtr<3, 3, 0>(&*dataAtPts->matD.data().begin());
869
870 constexpr double nohat_k = 1. / 4;
871 constexpr double hat_k = 1. / 8;
872 double mu = dataAtPts->mu;
873 double lambda = dataAtPts->lambda;
874
875 constexpr double third = boost::math::constants::third<double>();
877 auto t_diff_deviator = diff_deviator(diff_tensor());
878
879 auto t_approx_P_adjoint__dstretch =
880 getFTensor2FromMat<3, 3>(dataAtPts->adjointPdstretchAtPts);
881 auto t_log_stretch_h1 =
882 getFTensor2SymmetricFromMat<3>(dataAtPts->logStretchTotalTensorAtPts);
883 auto t_eigen_vals = getFTensor1FromMat<3>(dataAtPts->eigenVals);
884 auto t_eigen_vecs = getFTensor2FromMat<3, 3>(dataAtPts->eigenVecs);
885 auto &nbUniq = dataAtPts->nbUniq;
886
887 auto t_dP = getFTensor2FromMat<size_symm, size_symm>(dP);
888 for (auto gg = 0; gg != nb_integration_pts; ++gg) {
889
890 double log_det = t_log_stretch_h1(i, i);
891 double log_det2 = log_det * log_det;
893 t_dev(i, j) = t_log_stretch_h1(i, j) - t_kd(i, j) * (third * log_det);
894 double dev_norm2 = t_dev(i, j) * t_dev(i, j);
895
896 auto A = 2 * mu * std::exp(nohat_k * dev_norm2);
897 auto B = lambda * std::exp(hat_k * log_det2) * log_det;
898
899 FTensor::Tensor2_symmetric<double, 3> t_A_diff, t_B_diff;
900 t_A_diff(i, j) =
901 (A * 2 * nohat_k) * (t_dev(k, l) * t_diff_deviator(k, l, i, j));
902 t_B_diff(i, j) = (B * 2 * hat_k) * log_det * t_kd(i, j) +
903 lambda * std::exp(hat_k * log_det2) * t_kd(i, j);
905 t_dT(i, j, k, l) =
906 t_A_diff(i, j) * (t_dev(m, n) * t_diff_deviator(m, n, k, l))
907
908 +
909
910 A * t_diff_deviator(m, n, i, j) * t_diff_deviator(m, n, k, l)
911
912 +
913
914 t_B_diff(i, j) * t_kd(k, l);
915
916 t_dP(L, J) = -t_L(i, j, L) *
917 ((
918
919 t_dT(i, j, k, l)
920
921 +
922
923 (alphaU * ts_a) * (t_D(i, j, m, n) * t_diff(m, n, k, l)
924
925 )) *
926 t_L(k, l, J));
927
928 // Work of symmetric tensor on undefined tensor is equal to the work
929 // of the symmetric part of it
933 t_sym(i, j) = (t_approx_P_adjoint__dstretch(i, j) ||
934 t_approx_P_adjoint__dstretch(j, i));
935 t_sym(i, j) /= 2.0;
936 auto t_diff2_uP2 = EigenMatrix::getDiffDiffMat(
937 t_eigen_vals, t_eigen_vecs, EshelbianCore::f, EshelbianCore::d_f,
938 EshelbianCore::dd_f, t_sym, nbUniq[gg]);
939 t_dP(L, J) += t_L(i, j, L) *
940 ((t_diff2_uP2(i, j, k, l) + t_diff2_uP2(k, l, i, j)) *
941 t_L(k, l, J)) /
942 2.;
943 }
944
945 ++t_dP;
946 ++t_approx_P_adjoint__dstretch;
947 ++t_log_stretch_h1;
948 ++t_eigen_vals;
949 ++t_eigen_vecs;
950 }
951
952 return getFTensor2FromMat<size_symm, size_symm>(dP);
953 };
954
955 auto t_dP = get_dP();
956 for (int gg = 0; gg != nb_integration_pts; ++gg) {
957 double a = v * t_w;
958
959 int rr = 0;
960 for (; rr != row_nb_dofs / 6; ++rr) {
961 auto t_col_base_fun = col_data.getFTensor0N(gg, 0);
962 auto t_m = get_ftensor2(K, 6 * rr, 0);
963 for (int cc = 0; cc != col_nb_dofs / 6; ++cc) {
964 const double b = a * t_row_base_fun * t_col_base_fun;
965 t_m(L, J) -= b * t_dP(L, J);
966 ++t_m;
967 ++t_col_base_fun;
968 }
969 ++t_row_base_fun;
970 }
971
972 for (; rr != row_nb_base_functions; ++rr) {
973 ++t_row_base_fun;
974 }
975
976 ++t_w;
977 ++t_dP;
978 }
980}
constexpr double third
Kronecker Delta class symmetric.
constexpr auto t_kd
static double lambda
auto diff_deviator(FTensor::Ddg< double, 3, 3 > &&t_diff_stress)
constexpr AssemblyType A

Member Data Documentation

◆ alphaU

const double EshelbianPlasticity::HMHHencky::OpSpatialPhysical_du_du::alphaU

Definition at line 127 of file HMHHencky.cpp.

◆ dP

MatrixDouble EshelbianPlasticity::HMHHencky::OpSpatialPhysical_du_du::dP
private

Definition at line 139 of file HMHHencky.cpp.

◆ polyConvex

PetscBool EshelbianPlasticity::HMHHencky::OpSpatialPhysical_du_du::polyConvex = PETSC_FALSE
private

Definition at line 137 of file HMHHencky.cpp.


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