v0.10.0
Public Member Functions | Private Attributes | List of all members
EshelbianPlasticity::OpCalculateStrainEnergy Struct Reference

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

Inherits VolUserDataOperator.

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, DataForcesAndSourcesCore::EntData &data)
 

Private Attributes

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

Detailed Description

Definition at line 1138 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 
)

Definition at line 1140 of file EshelbianPlasticity.hpp.

1144  dataAtPts(data_at_pts), energy(e) {}

Member Function Documentation

◆ doWork()

MoFEMErrorCode EshelbianPlasticity::OpCalculateStrainEnergy::doWork ( int  side,
EntityType  type,
DataForcesAndSourcesCore::EntData data 
)

Definition at line 2232 of file EshelbianOperators.cpp.

2233  {
2235  if (type == MBTET) {
2236  int nb_integration_pts = data.getN().size1();
2237  auto v = getVolume();
2238  auto t_w = getFTensor0IntegrationWeight();
2239  auto t_P = getFTensor2FromMat<3, 3>(dataAtPts->approxPAtPts);
2240  auto t_h = getFTensor2FromMat<3, 3>(dataAtPts->hAtPts);
2241 
2244 
2245  for (int gg = 0; gg != nb_integration_pts; ++gg) {
2246  const double a = t_w * v;
2247  (*energy) += a * t_P(i, J) * t_h(i, J);
2248  ++t_w;
2249  ++t_P;
2250  ++t_h;
2251  }
2252  }
2254 }

Member Data Documentation

◆ dataAtPts

boost::shared_ptr<DataAtIntegrationPts> EshelbianPlasticity::OpCalculateStrainEnergy::dataAtPts
private

Definition at line 1150 of file EshelbianPlasticity.hpp.

◆ energy

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

Definition at line 1151 of file EshelbianPlasticity.hpp.


The documentation for this struct was generated from the following files:
convert.type
type
Definition: convert.py:66
FTensor::Index< 'i', 3 >
EshelbianPlasticity::OpCalculateStrainEnergy::dataAtPts
boost::shared_ptr< DataAtIntegrationPts > dataAtPts
Definition: EshelbianPlasticity.hpp:1150
MoFEM::ForcesAndSourcesCore::UserDataOperator::OPROW
@ OPROW
Definition: ForcesAndSourcesCore.hpp:99
MoFEM::DataForcesAndSourcesCore::EntData::getN
MatrixDouble & getN(const FieldApproximationBase base)
get base functions this return matrix (nb. of rows is equal to nb. of Gauss pts, nb....
Definition: DataStructures.hpp:1288
EshelbianPlasticity::OpCalculateStrainEnergy::energy
boost::shared_ptr< double > energy
Definition: EshelbianPlasticity.hpp:1151
i
FTensor::Index< 'i', 3 > i
Definition: matrix_function.cpp:18
EshelbianPlasticity::VolUserDataOperator
VolumeElementForcesAndSourcesCore::UserDataOperator VolUserDataOperator
Definition: EshelbianPlasticity.hpp:35
MoFEMFunctionReturn
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:485
MoFEMFunctionBegin
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:415
J
static Index< 'J', 3 > J
Definition: BasicFeTools.hpp:83