v0.15.0
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 ()
 
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 >
 
- 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 517 of file HMHHencky.cpp.

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

635 {
637
638 if (polyConvex) {
639 CHKERR integratePolyconvexHencky(row_data, col_data);
640 } else {
641 CHKERR integrateHencky(row_data, col_data);
642 }
644}
#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 647 of file HMHHencky.cpp.

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

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

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: