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

Public Member Functions

 OpEnergy (boost::shared_ptr< DataAtIntegrationPts > data_ptr, boost::shared_ptr< double > total_energy_ptr)
 
MoFEMErrorCode doWork (int, EntityType, EntData &) override
 

Private Attributes

boost::shared_ptr< DataAtIntegrationPtsdataAtPts
 
boost::shared_ptr< doubletotalEnergyPtr
 

Detailed Description

Definition at line 142 of file HMHNeohookean.cpp.

Constructor & Destructor Documentation

◆ OpEnergy()

EshelbianPlasticity::HMHNeohookean::OpEnergy::OpEnergy ( boost::shared_ptr< DataAtIntegrationPts data_ptr,
boost::shared_ptr< double total_energy_ptr 
)
inline

Definition at line 143 of file HMHNeohookean.cpp.

145 : VolUserDataOperator(NOSPACE, OPSPACE), dataAtPts(std::move(data_ptr)),
146 totalEnergyPtr(std::move(total_energy_ptr)) {}
@ NOSPACE
Definition definitions.h:83
VolumeElementForcesAndSourcesCore::UserDataOperator VolUserDataOperator
boost::shared_ptr< DataAtIntegrationPts > dataAtPts

Member Function Documentation

◆ doWork()

MoFEMErrorCode EshelbianPlasticity::HMHNeohookean::OpEnergy::doWork ( int  ,
EntityType  ,
EntData  
)
inlineoverride

Definition at line 148 of file HMHNeohookean.cpp.

148 {
150 const auto material_ptr = getMaterial(dataAtPts);
151 const auto parameters = material_ptr->getParameters(getFEEntityHandle());
152 const int nb_integration_pts = getGaussPts().size2();
153 auto t_eigenvalues = dataAtPts->getFTensorEigenVals(nb_integration_pts);
154 dataAtPts->energyAtPts.resize(nb_integration_pts, false);
155 auto t_energy = getFTensor0FromVec(dataAtPts->energyAtPts);
156 auto t_weight = getFTensor0IntegrationWeight();
157 double element_energy = 0.;
158 for (int gg = 0; gg != nb_integration_pts; ++gg) {
159 // Isotropic energy uses the principal logarithms supplied by either
160 // configuration pipeline, independently of its displacement gradient.
161 const Material::SymmetricTensor t_log_stretch(
162 t_eigenvalues(0), 0., 0., t_eigenvalues(1), 0., t_eigenvalues(2));
163 double energy;
164 CHKERR evaluateDirect(parameters, t_log_stretch, energy);
165 t_energy = energy;
166 element_energy += t_weight * energy;
167 ++t_eigenvalues;
168 ++t_energy;
169 ++t_weight;
170 }
171 if (totalEnergyPtr)
172 *totalEnergyPtr += getMeasure() * element_energy;
174 }
#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.
static boost::shared_ptr< HMHNeohookean > getMaterial(const boost::shared_ptr< DataAtIntegrationPts > &data_ptr)
static MoFEMErrorCode evaluateDirect(const Material::Parameters &parameters, const Material::SymmetricTensor &t_log_stretch, double &energy, PackedStress *stress_ptr=nullptr, PackedTangent *tangent_ptr=nullptr)

Member Data Documentation

◆ dataAtPts

boost::shared_ptr<DataAtIntegrationPts> EshelbianPlasticity::HMHNeohookean::OpEnergy::dataAtPts
private

Definition at line 177 of file HMHNeohookean.cpp.

◆ totalEnergyPtr

boost::shared_ptr<double> EshelbianPlasticity::HMHNeohookean::OpEnergy::totalEnergyPtr
private

Definition at line 178 of file HMHNeohookean.cpp.


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