v0.15.0
Loading...
Searching...
No Matches
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 EshelbianPlasticity::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 EshelbianPlasticity::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)
 
 UserDataOperator (const std::string field_name, const char type, const bool symm=true)
 
 UserDataOperator (const std::string row_field_name, const std::string col_field_name, const char type, const bool symm=true)
 
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
 
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 EshelbianPlasticity::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 EshelbianPlasticity::OpAssembleVolume
using OP = OpAssembleBasic<VolUserDataOperator>
 
- Public Types inherited from EshelbianPlasticity::OpAssembleBasic< VolUserDataOperator >
using ScaleOff
 
- 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
 
- Public Types inherited from MoFEM::DataOperator
using DoWorkLhsHookFunType
 
using DoWorkRhsHookFunType
 
- 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 Member Functions inherited from MoFEM::ForcesAndSourcesCore::UserDataOperator
- Protected Attributes inherited from MoFEM::ForcesAndSourcesCore::UserDataOperator
ForcesAndSourcesCoreptrFE
 
- Static Protected Attributes inherited from EshelbianPlasticity::OpAssembleVolume
static std::map< std::pair< std::string, std::string >, MatrixDouble > mapMatrix
 

Detailed Description

Definition at line 125 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 516 of file HMHHencky.cpp.

519 : OpAssembleVolume(row_field, col_field, data_ptr, OPROWCOL, false),
520 alphaU(alpha) {
521 sYmm = false;
522
523 CHK_MOAB_THROW(PetscOptionsGetBool(PETSC_NULLPTR, "", "-poly_convex",
524 &polyConvex, PETSC_NULLPTR),
525 "get polyconvex option failed");
526}
#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 EshelbianPlasticity::OpAssembleBasic< VolUserDataOperator >.

Definition at line 617 of file HMHHencky.cpp.

618 {
620
621 if (polyConvex) {
622 CHKERR integratePolyconvexHencky(row_data, col_data);
623 } else {
624 CHKERR integrateHencky(row_data, col_data);
625 }
627}
#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 630 of file HMHHencky.cpp.

631 {
633
636 auto t_L = symm_L_tensor();
637 auto t_diff = diff_tensor();
638
639 int nb_integration_pts = row_data.getN().size1();
640 int row_nb_dofs = row_data.getIndices().size();
641 int col_nb_dofs = col_data.getIndices().size();
642
643 auto get_ftensor2 = [](MatrixDouble &m, const int r, const int c) {
645 size_symm>(
646
647 &m(r + 0, c + 0), &m(r + 0, c + 1), &m(r + 0, c + 2), &m(r + 0, c + 3),
648 &m(r + 0, c + 4), &m(r + 0, c + 5),
649
650 &m(r + 1, c + 0), &m(r + 1, c + 1), &m(r + 1, c + 2), &m(r + 1, c + 3),
651 &m(r + 1, c + 4), &m(r + 1, c + 5),
652
653 &m(r + 2, c + 0), &m(r + 2, c + 1), &m(r + 2, c + 2), &m(r + 2, c + 3),
654 &m(r + 2, c + 4), &m(r + 2, c + 5),
655
656 &m(r + 3, c + 0), &m(r + 3, c + 1), &m(r + 3, c + 2), &m(r + 3, c + 3),
657 &m(r + 3, c + 4), &m(r + 3, c + 5),
658
659 &m(r + 4, c + 0), &m(r + 4, c + 1), &m(r + 4, c + 2), &m(r + 4, c + 3),
660 &m(r + 4, c + 4), &m(r + 4, c + 5),
661
662 &m(r + 5, c + 0), &m(r + 5, c + 1), &m(r + 5, c + 2), &m(r + 5, c + 3),
663 &m(r + 5, c + 4), &m(r + 5, c + 5)
664
665 );
666 };
667 FTensor::Index<'i', 3> i;
668 FTensor::Index<'j', 3> j;
669 FTensor::Index<'k', 3> k;
670 FTensor::Index<'l', 3> l;
671 FTensor::Index<'m', 3> m;
672 FTensor::Index<'n', 3> n;
673
674 auto v = getVolume();
675 auto t_w = getFTensor0IntegrationWeight();
676
677 auto t_approx_P_adjoint__dstretch =
678 getFTensor2FromMat<3, 3>(dataAtPts->adjointPdstretchAtPts);
679 auto t_eigen_vals = getFTensor1FromMat<3>(dataAtPts->eigenVals);
680 auto t_eigen_vecs = getFTensor2FromMat<3, 3>(dataAtPts->eigenVecs);
681
682 int row_nb_base_functions = row_data.getN().size2();
683 auto t_row_base_fun = row_data.getFTensor0N();
684
685 auto get_dP = [&]() {
686 dP.resize(size_symm * size_symm, nb_integration_pts, false);
687 auto ts_a = getTSa();
688
689 auto t_D = getFTensor4DdgFromPtr<3, 3, 0>(&*dataAtPts->matD.data().begin());
691 t_dP_tmp(L, J) = -(1 + alphaU * ts_a) *
692 (t_L(i, j, L) *
693 ((t_D(i, j, m, n) * t_diff(m, n, k, l)) * t_L(k, l, J)));
694
697 auto t_approx_P_adjoint__dstretch =
698 getFTensor2FromMat<3, 3>(dataAtPts->adjointPdstretchAtPts);
699 auto t_eigen_vals = getFTensor1FromMat<3>(dataAtPts->eigenVals);
700 auto t_eigen_vecs = getFTensor2FromMat<3, 3>(dataAtPts->eigenVecs);
701 auto &nbUniq = dataAtPts->nbUniq;
702
703 auto t_dP = getFTensor2FromMat<size_symm, size_symm>(dP);
704 for (auto gg = 0; gg != nb_integration_pts; ++gg) {
705
706 // Work of symmetric tensor on undefined tensor is equal to the work
707 // of the symmetric part of it
709 t_sym(i, j) = (t_approx_P_adjoint__dstretch(i, j) ||
710 t_approx_P_adjoint__dstretch(j, i));
711 t_sym(i, j) /= 2.0;
712 auto t_diff2_uP2 = EigenMatrix::getDiffDiffMat(
713 t_eigen_vals, t_eigen_vecs, EshelbianCore::f, EshelbianCore::d_f,
714 EshelbianCore::dd_f, t_sym, nbUniq[gg]);
715 t_dP(L, J) = t_L(i, j, L) *
716 ((t_diff2_uP2(i, j, k, l) + t_diff2_uP2(k, l, i, j)) *
717 t_L(k, l, J)) /
718 2. +
719 t_dP_tmp(L, J);
720
721 ++t_dP;
722 ++t_approx_P_adjoint__dstretch;
723 ++t_eigen_vals;
724 ++t_eigen_vecs;
725 }
726 } else {
727 auto t_dP = getFTensor2FromMat<size_symm, size_symm>(dP);
728 for (auto gg = 0; gg != nb_integration_pts; ++gg) {
729 t_dP(L, J) = t_dP_tmp(L, J);
730 ++t_dP;
731 }
732 }
733
734 return getFTensor2FromMat<size_symm, size_symm>(dP);
735 };
736
737 auto t_dP = get_dP();
738 for (int gg = 0; gg != nb_integration_pts; ++gg) {
739 double a = v * t_w;
740
741 int rr = 0;
742 for (; rr != row_nb_dofs / 6; ++rr) {
743 auto t_col_base_fun = col_data.getFTensor0N(gg, 0);
744 auto t_m = get_ftensor2(K, 6 * rr, 0);
745 for (int cc = 0; cc != col_nb_dofs / 6; ++cc) {
746 const double b = a * t_row_base_fun * t_col_base_fun;
747 t_m(L, J) -= b * t_dP(L, J);
748 ++t_m;
749 ++t_col_base_fun;
750 }
751 ++t_row_base_fun;
752 }
753
754 for (; rr != row_nb_base_functions; ++rr) {
755 ++t_row_base_fun;
756 }
757
758 ++t_w;
759 ++t_dP;
760 }
762}
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
int r
Definition sdf.py:8
FTensor::Index< 'm', 3 > m
static enum StretchSelector stretchSelector
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 dofs on entity.
auto getFTensor0IntegrationWeight()
Get integration weights.

◆ integratePolyconvexHencky()

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

Definition at line 764 of file HMHHencky.cpp.

765 {
767
770 auto t_L = symm_L_tensor();
771 auto t_diff = diff_tensor();
772
773 int nb_integration_pts = row_data.getN().size1();
774 int row_nb_dofs = row_data.getIndices().size();
775 int col_nb_dofs = col_data.getIndices().size();
776
777 auto get_ftensor2 = [](MatrixDouble &m, const int r, const int c) {
779 size_symm>(
780
781 &m(r + 0, c + 0), &m(r + 0, c + 1), &m(r + 0, c + 2), &m(r + 0, c + 3),
782 &m(r + 0, c + 4), &m(r + 0, c + 5),
783
784 &m(r + 1, c + 0), &m(r + 1, c + 1), &m(r + 1, c + 2), &m(r + 1, c + 3),
785 &m(r + 1, c + 4), &m(r + 1, c + 5),
786
787 &m(r + 2, c + 0), &m(r + 2, c + 1), &m(r + 2, c + 2), &m(r + 2, c + 3),
788 &m(r + 2, c + 4), &m(r + 2, c + 5),
789
790 &m(r + 3, c + 0), &m(r + 3, c + 1), &m(r + 3, c + 2), &m(r + 3, c + 3),
791 &m(r + 3, c + 4), &m(r + 3, c + 5),
792
793 &m(r + 4, c + 0), &m(r + 4, c + 1), &m(r + 4, c + 2), &m(r + 4, c + 3),
794 &m(r + 4, c + 4), &m(r + 4, c + 5),
795
796 &m(r + 5, c + 0), &m(r + 5, c + 1), &m(r + 5, c + 2), &m(r + 5, c + 3),
797 &m(r + 5, c + 4), &m(r + 5, c + 5)
798
799 );
800 };
801 FTensor::Index<'i', 3> i;
802 FTensor::Index<'j', 3> j;
803 FTensor::Index<'k', 3> k;
804 FTensor::Index<'l', 3> l;
805 FTensor::Index<'m', 3> m;
806 FTensor::Index<'n', 3> n;
807
808 auto v = getVolume();
809 auto t_w = getFTensor0IntegrationWeight();
810
811 int row_nb_base_functions = row_data.getN().size2();
812 auto t_row_base_fun = row_data.getFTensor0N();
813
814 auto get_dP = [&]() {
815 dP.resize(size_symm * size_symm, nb_integration_pts, false);
816 auto ts_a = getTSa();
817
818 auto t_D = getFTensor4DdgFromPtr<3, 3, 0>(&*dataAtPts->matD.data().begin());
819
820 constexpr double nohat_k = 1. / 4;
821 constexpr double hat_k = 1. / 8;
822 double mu = dataAtPts->mu;
823 double lambda = dataAtPts->lambda;
824
825 constexpr double third = boost::math::constants::third<double>();
827 auto t_diff_deviator = diff_deviator(diff_tensor());
828
829 auto t_approx_P_adjoint__dstretch =
830 getFTensor2FromMat<3, 3>(dataAtPts->adjointPdstretchAtPts);
831 auto t_log_stretch_h1 =
832 getFTensor2SymmetricFromMat<3>(dataAtPts->logStretchTotalTensorAtPts);
833 auto t_eigen_vals = getFTensor1FromMat<3>(dataAtPts->eigenVals);
834 auto t_eigen_vecs = getFTensor2FromMat<3, 3>(dataAtPts->eigenVecs);
835 auto &nbUniq = dataAtPts->nbUniq;
836
837 auto t_dP = getFTensor2FromMat<size_symm, size_symm>(dP);
838 for (auto gg = 0; gg != nb_integration_pts; ++gg) {
839
840 double log_det = t_log_stretch_h1(i, i);
841 double log_det2 = log_det * log_det;
843 t_dev(i, j) = t_log_stretch_h1(i, j) - t_kd(i, j) * (third * log_det);
844 double dev_norm2 = t_dev(i, j) * t_dev(i, j);
845
846 auto A = 2 * mu * std::exp(nohat_k * dev_norm2);
847 auto B = lambda * std::exp(hat_k * log_det2) * log_det;
848
849 FTensor::Tensor2_symmetric<double, 3> t_A_diff, t_B_diff;
850 t_A_diff(i, j) =
851 (A * 2 * nohat_k) * (t_dev(k, l) * t_diff_deviator(k, l, i, j));
852 t_B_diff(i, j) = (B * 2 * hat_k) * log_det * t_kd(i, j) +
853 lambda * std::exp(hat_k * log_det2) * t_kd(i, j);
855 t_dT(i, j, k, l) =
856 t_A_diff(i, j) * (t_dev(m, n) * t_diff_deviator(m, n, k, l))
857
858 +
859
860 A * t_diff_deviator(m, n, i, j) * t_diff_deviator(m, n, k, l)
861
862 +
863
864 t_B_diff(i, j) * t_kd(k, l);
865
866 t_dP(L, J) = -t_L(i, j, L) *
867 ((
868
869 t_dT(i, j, k, l)
870
871 +
872
873 (alphaU * ts_a) * (t_D(i, j, m, n) * t_diff(m, n, k, l)
874
875 )) *
876 t_L(k, l, J));
877
878 // Work of symmetric tensor on undefined tensor is equal to the work
879 // of the symmetric part of it
883 t_sym(i, j) = (t_approx_P_adjoint__dstretch(i, j) ||
884 t_approx_P_adjoint__dstretch(j, i));
885 t_sym(i, j) /= 2.0;
886 auto t_diff2_uP2 = EigenMatrix::getDiffDiffMat(
887 t_eigen_vals, t_eigen_vecs, EshelbianCore::f, EshelbianCore::d_f,
888 EshelbianCore::dd_f, t_sym, nbUniq[gg]);
889 t_dP(L, J) += t_L(i, j, L) *
890 ((t_diff2_uP2(i, j, k, l) + t_diff2_uP2(k, l, i, j)) *
891 t_L(k, l, J)) /
892 2.;
893 }
894
895 ++t_dP;
896 ++t_approx_P_adjoint__dstretch;
897 ++t_log_stretch_h1;
898 ++t_eigen_vals;
899 ++t_eigen_vecs;
900 }
901
902 return getFTensor2FromMat<size_symm, size_symm>(dP);
903 };
904
905 auto t_dP = get_dP();
906 for (int gg = 0; gg != nb_integration_pts; ++gg) {
907 double a = v * t_w;
908
909 int rr = 0;
910 for (; rr != row_nb_dofs / 6; ++rr) {
911 auto t_col_base_fun = col_data.getFTensor0N(gg, 0);
912 auto t_m = get_ftensor2(K, 6 * rr, 0);
913 for (int cc = 0; cc != col_nb_dofs / 6; ++cc) {
914 const double b = a * t_row_base_fun * t_col_base_fun;
915 t_m(L, J) -= b * t_dP(L, J);
916 ++t_m;
917 ++t_col_base_fun;
918 }
919 ++t_row_base_fun;
920 }
921
922 for (; rr != row_nb_base_functions; ++rr) {
923 ++t_row_base_fun;
924 }
925
926 ++t_w;
927 ++t_dP;
928 }
930}
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)

Member Data Documentation

◆ alphaU

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

Definition at line 126 of file HMHHencky.cpp.

◆ dP

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

Definition at line 138 of file HMHHencky.cpp.

◆ polyConvex

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

Definition at line 136 of file HMHHencky.cpp.


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