- Examples
- cell_forces.cpp.
Definition at line 429 of file cell_forces.cpp.
◆ OpElasticEnergy()
| CellEngineering::OpElasticEnergy::OpElasticEnergy |
( |
boost::shared_ptr< MatrixDouble > |
strain_ptr, |
|
|
boost::shared_ptr< MatrixDouble > |
stress_ptr, |
|
|
double & |
energy |
|
) |
| |
|
inline |
Definition at line 432 of file cell_forces.cpp.
434 : VolumeElementForcesAndSourcesCore::UserDataOperator(
boost::shared_ptr< MatrixDouble > stressPtr
boost::shared_ptr< MatrixDouble > strainPtr
@ OPSPACE
operator do Work is execute on space data
◆ doWork()
- Examples
- cell_forces.cpp.
Definition at line 438 of file cell_forces.cpp.
439 {
441
442 const size_t nb_gauss_pts = getGaussPts().size2();
444 auto get_strain =
447 auto get_stress =
450 auto t_strain = get_strain();
451 auto t_stress = get_stress();
454
455 for (size_t gg = 0; gg != nb_gauss_pts; ++gg) {
456 const double alpha = getMeasure() * getGaussPts()(
SPACE_DIM, gg);
457 energy += 0.5 * alpha * t_strain(
i,
j) * t_stress(
i,
j);
458 ++t_strain;
459 ++t_stress;
460 }
461
463 }
#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()
FTensor::Index< 'i', SPACE_DIM > i
FTensor::Index< 'j', 3 > j
DataLayoutTraits< DataLayout::GaussByCoeffs > DL
decltype(GetFTensor2SymmetricFromMatImpl< Tensor_Dim, S, DL, M >::get(std::declval< M & >(), 0, 0)) GetFTensor2SymmetricFromMatType
◆ energy
| double& CellEngineering::OpElasticEnergy::energy |
|
private |
◆ strainPtr
| boost::shared_ptr<MatrixDouble> CellEngineering::OpElasticEnergy::strainPtr |
|
private |
◆ stressPtr
| boost::shared_ptr<MatrixDouble> CellEngineering::OpElasticEnergy::stressPtr |
|
private |
The documentation for this struct was generated from the following file: