v0.13.2
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
EshelbianPlasticity::OpCalculateStrainEnergy Struct Reference

#include <users_modules/eshelbian_plasticty/src/EshelbianPlasticity.hpp>

Inheritance diagram for EshelbianPlasticity::OpCalculateStrainEnergy:
[legend]
Collaboration diagram for EshelbianPlasticity::OpCalculateStrainEnergy:
[legend]

Public Member Functions

 OpCalculateStrainEnergy (const std::string field_name, boost::shared_ptr< DataAtIntegrationPts > data_at_pts, boost::shared_ptr< double > &e)
 
MoFEMErrorCode doWork (int side, EntityType type, EntitiesFieldData::EntData &data)
 

Private Attributes

boost::shared_ptr< DataAtIntegrationPtsdataAtPts
 
boost::shared_ptr< doubleenergy
 

Detailed Description

Definition at line 832 of file EshelbianPlasticity.hpp.

Constructor & Destructor Documentation

◆ OpCalculateStrainEnergy()

EshelbianPlasticity::OpCalculateStrainEnergy::OpCalculateStrainEnergy ( const std::string  field_name,
boost::shared_ptr< DataAtIntegrationPts data_at_pts,
boost::shared_ptr< double > &  e 
)
inline

Definition at line 834 of file EshelbianPlasticity.hpp.

838 dataAtPts(data_at_pts), energy(e) {}
VolumeElementForcesAndSourcesCore::UserDataOperator VolUserDataOperator
constexpr auto field_name
boost::shared_ptr< DataAtIntegrationPts > dataAtPts
@ OPROW
operator doWork function is executed on FE rows

Member Function Documentation

◆ doWork()

MoFEMErrorCode EshelbianPlasticity::OpCalculateStrainEnergy::doWork ( int  side,
EntityType  type,
EntitiesFieldData::EntData data 
)
Examples
EshelbianOperators.cpp.

Definition at line 1822 of file EshelbianOperators.cpp.

1823 {
1825 if (type == MBTET) {
1826 int nb_integration_pts = data.getN().size1();
1827 auto v = getVolume();
1828 auto t_w = getFTensor0IntegrationWeight();
1829 auto t_P = getFTensor2FromMat<3, 3>(dataAtPts->approxPAtPts);
1830 auto t_h = getFTensor2FromMat<3, 3>(dataAtPts->hAtPts);
1831
1834
1835 for (int gg = 0; gg != nb_integration_pts; ++gg) {
1836 const double a = t_w * v;
1837 (*energy) += a * t_P(i, J) * t_h(i, J);
1838 ++t_w;
1839 ++t_P;
1840 ++t_h;
1841 }
1842 }
1844}
static Index< 'J', 3 > J
constexpr double a
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:346
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:416
FTensor::Index< 'i', SPACE_DIM > i
const double v
phase velocity of light in medium (cm/ns)
MatrixDouble & getN(const FieldApproximationBase base)
get base functions this return matrix (nb. of rows is equal to nb. of Gauss pts, nb....

Member Data Documentation

◆ dataAtPts

boost::shared_ptr<DataAtIntegrationPts> EshelbianPlasticity::OpCalculateStrainEnergy::dataAtPts
private
Examples
EshelbianOperators.cpp.

Definition at line 844 of file EshelbianPlasticity.hpp.

◆ energy

boost::shared_ptr<double> EshelbianPlasticity::OpCalculateStrainEnergy::energy
private

Definition at line 845 of file EshelbianPlasticity.hpp.


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