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

Public Member Functions

 OpExternalStrain (const std::string &field, boost::shared_ptr< ExternalStrainVec > external_strain_ptr, std::map< std::string, boost::shared_ptr< ScalingMethod > > scaling_methods)
 
MoFEMErrorCode iNtegrate (EntData &row_data) override
 

Private Attributes

boost::shared_ptr< ExternalStrainVecexternalStrainPtr
 
std::map< std::string, boost::shared_ptr< ScalingMethod > > scalingMethods
 

Detailed Description

Definition at line 455 of file HMHNeohookean.cpp.

Constructor & Destructor Documentation

◆ OpExternalStrain()

EshelbianPlasticity::HMHNeohookean::OpExternalStrain::OpExternalStrain ( const std::string &  field,
boost::shared_ptr< ExternalStrainVec external_strain_ptr,
std::map< std::string, boost::shared_ptr< ScalingMethod > >  scaling_methods 
)
inline

Definition at line 456 of file HMHNeohookean.cpp.

460 : FormBase(field, field, FormBase::OPROW),
461 externalStrainPtr(std::move(external_strain_ptr)),
462 scalingMethods(std::move(scaling_methods)) {}
boost::shared_ptr< ExternalStrainVec > externalStrainPtr
std::map< std::string, boost::shared_ptr< ScalingMethod > > scalingMethods
typename FormsIntegrators< VolUserDataOperator >::Assembly< A >::OpBase FormBase

Member Function Documentation

◆ iNtegrate()

MoFEMErrorCode EshelbianPlasticity::HMHNeohookean::OpExternalStrain::iNtegrate ( EntData row_data)
inlineoverride

Definition at line 464 of file HMHNeohookean.cpp.

464 {
468 const double time = EshelbianCore::physicalTimeFlg
470 : getFEMethod()->ts_t;
471 double pressure = 0.;
472 for (const auto &block : *externalStrainPtr) {
473 if (block.blockName.find("ANALYTICAL_EXTERNALSTRAIN") !=
474 std::string::npos)
475 SETERRQ(
476 PETSC_COMM_SELF, MOFEM_NOT_IMPLEMENTED,
477 "Analytical external strain is not implemented for Neo-Hookean");
478 if (block.ents.find(getFEEntityHandle()) == block.ents.end())
479 continue;
480 const auto scaling = scalingMethods.find(block.blockName);
481 double scale = 1.;
482 if (scaling != scalingMethods.end())
483 scale = scaling->second->getScale(time);
484 else
485 MOFEM_LOG("SELF", Sev::warning)
486 << "No scaling method found for " << block.blockName;
487 pressure += 3. * block.bulkModulusK * block.val * scale;
488 }
489 if (!std::isfinite(pressure))
490 SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY,
491 "Neo-Hookean prescribed external pressure must be finite");
492 FTENSOR_INDEXES(3, i, j);
494 const auto t_packed_basis = FTensor::SymmLTensor<double, 3>();
495 constexpr auto t_identity = FTensor::Kronecker_Delta_symmetric<int>();
496 PackedStress t_load;
497 t_load(L) = pressure * (t_packed_basis(i, j, L) * t_identity(i, j));
498 auto t_row = row_data.getFTensor0N();
499 auto t_weight = getFTensor0IntegrationWeight();
500 for (int gg = 0; gg != nbIntegrationPts; ++gg) {
501 const double alpha = getMeasure() * t_weight;
502 auto t_nf = getNf<size_symm>();
503 int rr = 0;
504 for (; rr != nbRows / size_symm; ++rr) {
505 t_nf(L) -= alpha * t_row * t_load(L);
506 ++t_nf;
507 ++t_row;
508 }
509 for (; rr != nbRowBaseFunctions; ++rr)
510 ++t_row;
511 ++t_weight;
512 }
514 }
#define FTENSOR_INDEXES(DIM,...)
#define FTENSOR_INDEX(DIM, I)
Kronecker Delta class symmetric.
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
@ MOFEM_DATA_INCONSISTENCY
Definition definitions.h:31
@ MOFEM_NOT_IMPLEMENTED
Definition definitions.h:32
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
#define MOFEM_LOG(channel, severity)
Log.
FTensor::Index< 'i', SPACE_DIM > i
FTensor::Index< 'j', 3 > j
static constexpr auto size_symm
static PetscBool physicalTimeFlg
static double currentPhysicalTime
FTensor::Tensor1< double, size_symm > PackedStress
FTensor::Tensor0< FTensor::PackPtr< double *, 1 > > getFTensor0N(const FieldApproximationBase base)
Get base function as Tensor0.
double scale
Definition plastic.cpp:123

Member Data Documentation

◆ externalStrainPtr

boost::shared_ptr<ExternalStrainVec> EshelbianPlasticity::HMHNeohookean::OpExternalStrain::externalStrainPtr
private

Definition at line 517 of file HMHNeohookean.cpp.

◆ scalingMethods

std::map<std::string, boost::shared_ptr<ScalingMethod> > EshelbianPlasticity::HMHNeohookean::OpExternalStrain::scalingMethods
private

Definition at line 518 of file HMHNeohookean.cpp.


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