https://mooseframework.inl.gov
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Protected Types | Protected Member Functions | Protected Attributes | Static Protected Attributes | Private Attributes | List of all members
TwoParameterPlasticityStressUpdate Class Referenceabstract

TwoParameterPlasticityStressUpdate performs the return-map algorithm and associated stress updates for plastic models that describe (p, q) plasticity. More...

#include <TwoParameterPlasticityStressUpdate.h>

Inheritance diagram for TwoParameterPlasticityStressUpdate:
[legend]

Public Types

using GR2 = GenericRankTwoTensor< is_ad >
 
using GSR2 = Moose::GenericType< R2, is_ad >
 
using GR4 = GenericRankFourTensor< is_ad >
 
using GSR4 = Moose::GenericType< R4, is_ad >
 
enum  TEST_TYPE
 
typedef DataFileName DataFileParameterType
 

Public Member Functions

 TwoParameterPlasticityStressUpdate (const InputParameters &parameters, unsigned num_yf, unsigned num_intnl)
 
virtual void updateState (GR2 &strain_increment, GR2 &inelastic_strain_increment, const GR2 &rotation_increment, GR2 &stress_new, const RankTwoTensor &stress_old, const GR4 &elasticity_tensor, const RankTwoTensor &elastic_strain_old, bool compute_full_tangent_operator=false, RankFourTensor &tangent_operator=StressUpdateBaseTempl< is_ad >::_identityTensor)
 Given a strain increment that results in a trial stress, perform some procedure (such as an iterative return-mapping process) to produce an admissible stress, an elastic strain increment and an inelastic strain increment. More...
 
virtual void updateStateSubstep (GR2 &, GR2 &, const GR2 &, GR2 &, const RankTwoTensor &, const GR4 &, const RankTwoTensor &, bool compute_full_tangent_operator=false, RankFourTensor &tangent_operator=StressUpdateBaseTempl< is_ad >::_identityTensor)
 Similar to the updateState function, this method updates the strain and stress for one substep. More...
 
void setQp (unsigned int qp)
 Sets the value of the global variable _qp for inheriting classes. More...
 
virtual bool requiresIsotropicTensor ()=0
 Does the model require the elasticity tensor to be isotropic? More...
 
virtual bool isIsotropic ()
 Is the implmented model isotropic? The safe default is 'false'. More...
 
virtual Real computeTimeStepLimit ()
 
virtual bool substeppingCapabilityEnabled ()
 Does the model include the infrastructure for substep decomposition of the elastic strain initially used to calculate the trial stress guess Inheriting classes which wish to use the substepping capability should overwrite this method and set it to return true. More...
 
virtual bool substeppingCapabilityRequested ()
 Has the user requested usage of (possibly) implemented substepping capability for inelastic models. More...
 
virtual int calculateNumberSubsteps (const GR2 &)
 Given the elastic strain increment compute the number of substeps required to bring a substepped trial stress guess distance from the yield surface into the tolerance specified in the individual child class. More...
 
virtual void storeIncrementalMaterialProperties (const unsigned int)
 Properly set up the incremental calculation storage of the stateful material properties in the inheriting classes. More...
 
virtual void resetIncrementalMaterialProperties ()
 Reset material properties. More...
 
virtual Real computeStrainEnergyRateDensity (const GenericMaterialProperty< RankTwoTensor, is_ad > &, const GenericMaterialProperty< RankTwoTensor, is_ad > &)
 Compute the strain energy rate density for this inelastic model for the current step. More...
 
virtual const dof_id_typegetElementID (const std::string &id_parameter_name, unsigned int comp=0) const override
 
dof_id_type getElementID (const Elem *elem, unsigned int elem_id_index) const
 
virtual const dof_id_typegetElementIDNeighbor (const std::string &id_parameter_name, unsigned int comp=0) const override
 
virtual const dof_id_typegetElementIDByName (const std::string &id_parameter_name) const override
 
virtual const dof_id_typegetElementIDNeighborByName (const std::string &id_parameter_name) const override
 
virtual void computeProperties () override
 
MaterialBasegetMaterial (const std::string &name)
 
MaterialBasegetMaterialByName (const std::string &name, bool no_warn=false, bool no_dep=false)
 
MaterialBasegetMaterialByName (const std::string &name, bool no_warn=false)
 
MaterialBasegetMaterialByName (const std::string &name, bool no_warn=false)
 
virtual bool isBoundaryMaterial () const override
 
virtual const std::unordered_set< unsigned int > & getMatPropDependencies () const override
 
virtual void subdomainSetup () override
 
 CreateMooseEnumClass (ConstantTypeEnum, NONE, ELEMENT, SUBDOMAIN)
 
bool ghostable () const override final
 
virtual void resolveOptionalProperties () override
 
const GenericMaterialProperty< T, is_ad > & getGenericZeroMaterialProperty (const std::string &name)
 
const GenericMaterialProperty< T, is_ad > & getGenericZeroMaterialProperty ()
 
const GenericMaterialProperty< T, is_ad > & getGenericZeroMaterialProperty (const std::string &name)
 
const GenericMaterialProperty< T, is_ad > & getGenericZeroMaterialProperty ()
 
const GenericMaterialProperty< T, is_ad > & getGenericZeroMaterialProperty (const std::string &name)
 
const GenericMaterialProperty< T, is_ad > & getGenericZeroMaterialProperty ()
 
const GenericMaterialProperty< T, is_ad > & getGenericZeroMaterialPropertyByName (const std::string &prop_name)
 
const GenericMaterialProperty< T, is_ad > & getGenericZeroMaterialPropertyByName (const std::string &prop_name)
 
const GenericMaterialProperty< T, is_ad > & getGenericZeroMaterialPropertyByName (const std::string &prop_name)
 
const MaterialProperty< T > & getZeroMaterialProperty (Ts... args)
 
const MaterialProperty< T > & getZeroMaterialProperty (Ts... args)
 
const MaterialProperty< T > & getZeroMaterialProperty (Ts... args)
 
virtual void initStatefulProperties (const unsigned int n_points)
 
virtual bool isInterfaceMaterial ()
 
virtual void computePropertiesAtQp (unsigned int qp)
 
const MaterialProperty< T > & getZeroMaterialPropertyByName (Ts... args)
 
virtual const std::set< std::string > & getRequestedItems () override
 
virtual const std::set< std::string > & getSuppliedItems () override
 
const std::set< unsigned int > & getSuppliedPropIDs () const
 
void checkStatefulSanity () const
 
std::set< OutputName > getOutputs ()
 
bool hasStatefulProperties () const
 
bool hasRestoredProperties () const
 
void setFaceInfo (const FaceInfo &fi)
 
void setActiveProperties (const std::unordered_set< unsigned int > &needed_props)
 
bool hasActiveProperties ()
 
bool forceStatefulInit () const
 
virtual bool enabled () const
 
std::shared_ptr< MooseObjectgetSharedPtr ()
 
std::shared_ptr< const MooseObjectgetSharedPtr () const
 
bool isKokkosObject () const
 
MooseAppgetMooseApp () const
 
const std::string & type () const
 
const std::string & name () const
 
std::string typeAndName () const
 
MooseObjectParameterName uniqueParameterName (const std::string &parameter_name) const
 
MooseObjectName uniqueName () const
 
const InputParametersparameters () const
 
const hit::Node * getHitNode () const
 
bool hasBase () const
 
const std::string & getBase () const
 
const TgetParam (const std::string &name) const
 
std::vector< std::pair< T1, T2 > > getParam (const std::string &param1, const std::string &param2) const
 
const TqueryParam (const std::string &name) const
 
const TgetRenamedParam (const std::string &old_name, const std::string &new_name) const
 
T getCheckedPointerParam (const std::string &name, const std::string &error_string="") const
 
bool haveParameter (const std::string &name) const
 
bool isParamValid (const std::string &name) const
 
bool isParamSetByUser (const std::string &name) const
 
void connectControllableParams (const std::string &parameter, const std::string &object_type, const std::string &object_name, const std::string &object_parameter) const
 
void paramError (const std::string &param, Args... args) const
 
void paramWarning (const std::string &param, Args... args) const
 
void paramWarning (const std::string &param, Args... args) const
 
void paramInfo (const std::string &param, Args... args) const
 
std::string messagePrefix (const bool hit_prefix=true) const
 
std::string errorPrefix (const std::string &) const
 
void mooseError (Args &&... args) const
 
void mooseDocumentedError (const std::string &repo_name, const unsigned int issue_num, Args &&... args) const
 
void mooseErrorNonPrefixed (Args &&... args) const
 
void mooseWarning (Args &&... args) const
 
void mooseWarning (Args &&... args) const
 
void mooseWarningNonPrefixed (Args &&... args) const
 
void mooseWarningNonPrefixed (Args &&... args) const
 
void mooseDeprecated (Args &&... args) const
 
void mooseDeprecated (Args &&... args) const
 
void mooseDeprecatedNoTrace (Args &&... args) const
 
void mooseInfo (Args &&... args) const
 
void callMooseError (std::string msg, const bool with_prefix, const hit::Node *node=nullptr, const bool show_trace=true) const
 
std::string getDataFileName (const std::string &param) const
 
std::string getDataFileNameByName (const std::string &relative_path) const
 
std::string getDataFilePath (const std::string &relative_path) const
 
const std::vector< SubdomainName > & blocks () const
 
unsigned int numBlocks () const
 
virtual const std::set< SubdomainID > & blockIDs () const
 
unsigned int blocksMaxDimension () const
 
bool hasBlocks (const SubdomainName &name) const
 
bool hasBlocks (const std::vector< SubdomainName > &names) const
 
bool hasBlocks (const std::set< SubdomainName > &names) const
 
bool hasBlocks (SubdomainID id) const
 
bool hasBlocks (const std::vector< SubdomainID > &ids) const
 
bool hasBlocks (const std::set< SubdomainID > &ids) const
 
bool isBlockSubset (const std::set< SubdomainID > &ids) const
 
bool isBlockSubset (const std::vector< SubdomainID > &ids) const
 
bool hasBlockMaterialProperty (const std::string &prop_name)
 
const std::set< SubdomainID > & meshBlockIDs () const
 
virtual bool blockRestricted () const
 
virtual void checkVariable (const MooseVariableFieldBase &variable) const
 
virtual const std::set< BoundaryID > & boundaryIDs () const
 
const std::vector< BoundaryName > & boundaryNames () const
 
unsigned int numBoundaryIDs () const
 
bool hasBoundary (const BoundaryName &name) const
 
bool hasBoundary (const std::vector< BoundaryName > &names) const
 
bool hasBoundary (const BoundaryID &id) const
 
bool hasBoundary (const std::vector< BoundaryID > &ids, TEST_TYPE type=ALL) const
 
bool hasBoundary (const std::set< BoundaryID > &ids, TEST_TYPE type=ALL) const
 
bool isBoundarySubset (const std::set< BoundaryID > &ids) const
 
bool isBoundarySubset (const std::vector< BoundaryID > &ids) const
 
bool hasBoundaryMaterialProperty (const std::string &prop_name) const
 
virtual bool boundaryRestricted () const
 
const std::set< BoundaryID > & meshBoundaryIDs () const
 
virtual bool checkVariableBoundaryIntegrity () const
 
virtual void initialSetup ()
 
virtual void timestepSetup ()
 
virtual void jacobianSetup ()
 
virtual void residualSetup ()
 
virtual void customSetup (const ExecFlagType &)
 
const ExecFlagEnumgetExecuteOnEnum () const
 
const std::set< MooseVariableFieldBase *> & getMooseVariableDependencies () const
 
std::set< MooseVariableFieldBase *> checkAllVariables (const DofObjectType &dof_object, const std::set< MooseVariableFieldBase * > &vars_to_omit={})
 
std::set< MooseVariableFieldBase *> checkVariables (const DofObjectType &dof_object, const std::set< MooseVariableFieldBase * > &vars_to_check)
 
void addMooseVariableDependency (MooseVariableFieldBase *var)
 
void addMooseVariableDependency (const std::vector< MooseVariableFieldBase * > &vars)
 
const std::vector< MooseVariableScalar *> & getCoupledMooseScalarVars ()
 
const std::set< TagID > & getScalarVariableCoupleableVectorTags () const
 
const std::set< TagID > & getScalarVariableCoupleableMatrixTags () const
 
const FunctiongetFunction (const std::string &name) const
 
const FunctiongetFunctionByName (const FunctionName &name) const
 
bool hasFunction (const std::string &param_name) const
 
bool hasFunctionByName (const FunctionName &name) const
 
Moose::Kokkos::Function getKokkosFunction (const std::string &name) const
 
const TgetKokkosFunction (const std::string &name) const
 
Moose::Kokkos::Function getKokkosFunctionByName (const FunctionName &name) const
 
const TgetKokkosFunctionByName (const FunctionName &name) const
 
bool hasKokkosFunction (const std::string &param_name) const
 
bool hasKokkosFunctionByName (const FunctionName &name) const
 
UserObjectName getUserObjectName (const std::string &param_name) const
 
const TgetUserObject (const std::string &param_name, bool is_dependency=true) const
 
const TgetUserObjectByName (const UserObjectName &object_name, bool is_dependency=true) const
 
const UserObjectBasegetUserObjectBase (const std::string &param_name, bool is_dependency=true) const
 
const UserObjectBasegetUserObjectBaseByName (const UserObjectName &object_name, bool is_dependency=true) const
 
bool isImplicit ()
 
Moose::StateArg determineState () const
 
bool isDefaultPostprocessorValue (const std::string &param_name, const unsigned int index=0) const
 
bool hasPostprocessor (const std::string &param_name, const unsigned int index=0) const
 
bool hasPostprocessorByName (const PostprocessorName &name) const
 
std::size_t coupledPostprocessors (const std::string &param_name) const
 
const PostprocessorName & getPostprocessorName (const std::string &param_name, const unsigned int index=0) const
 
const VectorPostprocessorValuegetVectorPostprocessorValue (const std::string &param_name, const std::string &vector_name) const
 
const VectorPostprocessorValuegetVectorPostprocessorValue (const std::string &param_name, const std::string &vector_name, bool needs_broadcast) const
 
const VectorPostprocessorValuegetVectorPostprocessorValueByName (const VectorPostprocessorName &name, const std::string &vector_name) const
 
const VectorPostprocessorValuegetVectorPostprocessorValueByName (const VectorPostprocessorName &name, const std::string &vector_name, bool needs_broadcast) const
 
const VectorPostprocessorValuegetVectorPostprocessorValueOld (const std::string &param_name, const std::string &vector_name) const
 
const VectorPostprocessorValuegetVectorPostprocessorValueOld (const std::string &param_name, const std::string &vector_name, bool needs_broadcast) const
 
const VectorPostprocessorValuegetVectorPostprocessorValueOldByName (const VectorPostprocessorName &name, const std::string &vector_name) const
 
const VectorPostprocessorValuegetVectorPostprocessorValueOldByName (const VectorPostprocessorName &name, const std::string &vector_name, bool needs_broadcast) const
 
const ScatterVectorPostprocessorValuegetScatterVectorPostprocessorValue (const std::string &param_name, const std::string &vector_name) const
 
const ScatterVectorPostprocessorValuegetScatterVectorPostprocessorValueByName (const VectorPostprocessorName &name, const std::string &vector_name) const
 
const ScatterVectorPostprocessorValuegetScatterVectorPostprocessorValueOld (const std::string &param_name, const std::string &vector_name) const
 
const ScatterVectorPostprocessorValuegetScatterVectorPostprocessorValueOldByName (const VectorPostprocessorName &name, const std::string &vector_name) const
 
bool hasVectorPostprocessor (const std::string &param_name, const std::string &vector_name) const
 
bool hasVectorPostprocessor (const std::string &param_name) const
 
bool hasVectorPostprocessorByName (const VectorPostprocessorName &name, const std::string &vector_name) const
 
bool hasVectorPostprocessorByName (const VectorPostprocessorName &name) const
 
const VectorPostprocessorName & getVectorPostprocessorName (const std::string &param_name) const
 
virtual void meshChanged ()
 
void buildOutputHideVariableList (std::set< std::string > variable_names)
 
void setRandomResetFrequency (ExecFlagType exec_flag)
 
unsigned long getRandomLong () const
 
Real getRandomReal () const
 
unsigned int getSeed (std::size_t id)
 
unsigned int getMasterSeed () const
 
bool isNodal () const
 
ExecFlagType getResetOnTime () const
 
void setRandomDataPointer (RandomData *random_data)
 
virtual unsigned int getElementIDIndex (const std::string &id_parameter_name, unsigned int comp=0) const
 
virtual unsigned int getElementIDIndexByName (const std::string &id_name) const
 
bool hasElementID (const std::string &id_name) const
 
dof_id_type maxElementID (unsigned int elem_id_index) const
 
dof_id_type minElementID (unsigned int elem_id_index) const
 
bool areElemIDsIdentical (const std::string &id_name1, const std::string &id_name2) const
 
std::unordered_map< dof_id_type, std::set< dof_id_type > > getElemIDMapping (const std::string &id_name1, const std::string &id_name2) const
 
std::set< dof_id_typegetAllElemIDs (unsigned int elem_id_index) const
 
std::set< dof_id_typegetElemIDsOnBlocks (unsigned int elem_id_index, const std::set< SubdomainID > &blks) const
 
const std::unordered_map< std::string, std::vector< MooseVariableFieldBase *> > & getCoupledVars () const
 
const std::vector< MooseVariableFieldBase *> & getCoupledMooseVars () const
 
const std::vector< MooseVariable *> & getCoupledStandardMooseVars () const
 
const std::vector< VectorMooseVariable *> & getCoupledVectorMooseVars () const
 
const std::vector< ArrayMooseVariable *> & getCoupledArrayMooseVars () const
 
void addFEVariableCoupleableVectorTag (TagID tag)
 
void addFEVariableCoupleableMatrixTag (TagID tag)
 
std::set< TagID > & getFEVariableCoupleableVectorTags ()
 
const std::set< TagID > & getFEVariableCoupleableVectorTags () const
 
std::set< TagID > & getFEVariableCoupleableMatrixTags ()
 
const std::set< TagID > & getFEVariableCoupleableMatrixTags () const
 
auto & getWritableCoupledVariables () const
 
bool hasWritableCoupledVariables () const
 
const ADVariableValuegetADDefaultValue (const std::string &var_name) const
 
const ADVectorVariableValuegetADDefaultVectorValue (const std::string &var_name) const
 
const ADVariableGradientgetADDefaultGradient () const
 
const ADVectorVariableGradientgetADDefaultVectorGradient () const
 
const ADVariableSecondgetADDefaultSecond () const
 
const ADVectorVariableCurlgetADDefaultCurl () const
 
Moose::Kokkos::VariableValue kokkosCoupledVectorTagValueByName (const std::string &var_name, const std::string &tag_name, unsigned int comp=0) const
 
Moose::Kokkos::VariableValue kokkosCoupledVectorTagValuesByName (const std::string &var_name, const std::string &tag_name) const
 
Moose::Kokkos::VariableGradient kokkosCoupledVectorTagGradientByName (const std::string &var_name, const std::string &tag_name, unsigned int comp=0) const
 
Moose::Kokkos::VariableGradient kokkosCoupledVectorTagGradientsByName (const std::string &var_name, const std::string &tag_name) const
 
Moose::Kokkos::VariableValue kokkosCoupledVectorTagNodalValueByName (const std::string &var_name, const std::string &tag_name, unsigned int comp=0) const
 
Moose::Kokkos::VariableValue kokkosCoupledVectorTagNodalValuesByName (const std::string &var_name, const std::string &tag_name) const
 
Moose::Kokkos::VariableValue kokkosCoupledVectorTagDofValueByName (const std::string &var_name, const std::string &tag_name, unsigned int comp=0) const
 
Moose::Kokkos::VariableValue kokkosCoupledVectorTagDofValuesByName (const std::string &var_name, const std::string &tag_name) const
 
Moose::Kokkos::VariableValue kokkosCoupledVectorTagValue (const std::string &var_name, const std::string &tag_param_name, unsigned int comp=0) const
 
Moose::Kokkos::VariableValue kokkosCoupledVectorTagValues (const std::string &var_name, const std::string &tag_param_name) const
 
Moose::Kokkos::VariableGradient kokkosCoupledVectorTagGradient (const std::string &var_name, const std::string &tag_param_name, unsigned int comp=0) const
 
Moose::Kokkos::VariableGradient kokkosCoupledVectorTagGradients (const std::string &var_name, const std::string &tag_param_name) const
 
Moose::Kokkos::VariableValue kokkosCoupledVectorTagNodalValue (const std::string &var_name, const std::string &tag_param_name, unsigned int comp=0) const
 
Moose::Kokkos::VariableValue kokkosCoupledVectorTagNodalValues (const std::string &var_name, const std::string &tag_param_name) const
 
Moose::Kokkos::VariableValue kokkosCoupledVectorTagDofValue (const std::string &var_name, const std::string &tag_param_name, unsigned int comp=0) const
 
Moose::Kokkos::VariableValue kokkosCoupledVectorTagDofValues (const std::string &var_name, const std::string &tag_param_name) const
 
Moose::Kokkos::VariableValue kokkosCoupledValue (const std::string &var_name, unsigned int comp=0) const
 
Moose::Kokkos::VariableValue kokkosCoupledValues (const std::string &var_name) const
 
Moose::Kokkos::VariableGradient kokkosCoupledGradient (const std::string &var_name, unsigned int comp=0) const
 
Moose::Kokkos::VariableGradient kokkosCoupledGradients (const std::string &var_name) const
 
Moose::Kokkos::VariableValue kokkosCoupledNodalValue (const std::string &var_name, unsigned int comp=0) const
 
Moose::Kokkos::VariableValue kokkosCoupledNodalValues (const std::string &var_name) const
 
Moose::Kokkos::VariableValue kokkosCoupledDofValue (const std::string &var_name, unsigned int comp=0) const
 
Moose::Kokkos::VariableValue kokkosCoupledDofValues (const std::string &var_name) const
 
Moose::Kokkos::VariableValue kokkosCoupledValueOld (const std::string &var_name, unsigned int comp=0) const
 
Moose::Kokkos::VariableValue kokkosCoupledValuesOld (const std::string &var_name) const
 
Moose::Kokkos::VariableGradient kokkosCoupledGradientOld (const std::string &var_name, unsigned int comp=0) const
 
Moose::Kokkos::VariableGradient kokkosCoupledGradientsOld (const std::string &var_name) const
 
Moose::Kokkos::VariableValue kokkosCoupledNodalValueOld (const std::string &var_name, unsigned int comp=0) const
 
Moose::Kokkos::VariableValue kokkosCoupledNodalValuesOld (const std::string &var_name) const
 
Moose::Kokkos::VariableValue kokkosCoupledDofValueOld (const std::string &var_name, unsigned int comp=0) const
 
Moose::Kokkos::VariableValue kokkosCoupledDofValuesOld (const std::string &var_name) const
 
Moose::Kokkos::VariableValue kokkosCoupledValueOlder (const std::string &var_name, unsigned int comp=0) const
 
Moose::Kokkos::VariableValue kokkosCoupledValuesOlder (const std::string &var_name) const
 
Moose::Kokkos::VariableGradient kokkosCoupledGradientOlder (const std::string &var_name, unsigned int comp=0) const
 
Moose::Kokkos::VariableGradient kokkosCoupledGradientsOlder (const std::string &var_name) const
 
Moose::Kokkos::VariableValue kokkosCoupledNodalValueOlder (const std::string &var_name, unsigned int comp=0) const
 
Moose::Kokkos::VariableValue kokkosCoupledNodalValuesOlder (const std::string &var_name) const
 
Moose::Kokkos::VariableValue kokkosCoupledDofValueOlder (const std::string &var_name, unsigned int comp=0) const
 
Moose::Kokkos::VariableValue kokkosCoupledDofValuesOlder (const std::string &var_name) const
 
Moose::Kokkos::VariableValue kokkosCoupledDot (const std::string &var_name, unsigned int comp=0) const
 
Moose::Kokkos::VariableValue kokkosCoupledDots (const std::string &var_name) const
 
Moose::Kokkos::VariableValue kokkosCoupledNodalDot (const std::string &var_name, unsigned int comp=0) const
 
Moose::Kokkos::VariableValue kokkosCoupledNodalDots (const std::string &var_name) const
 
Moose::Kokkos::ADVariableValue kokkosADCoupledVectorTagValueByName (const std::string &var_name, const std::string &tag_name, unsigned int comp=0) const
 
Moose::Kokkos::ADVariableValue kokkosADCoupledVectorTagValuesByName (const std::string &var_name, const std::string &tag_name) const
 
Moose::Kokkos::ADVariableGradient kokkosADCoupledVectorTagGradientByName (const std::string &var_name, const std::string &tag_name, unsigned int comp=0) const
 
Moose::Kokkos::ADVariableGradient kokkosADCoupledVectorTagGradientsByName (const std::string &var_name, const std::string &tag_name) const
 
Moose::Kokkos::ADVariableValue kokkosADCoupledVectorTagNodalValueByName (const std::string &var_name, const std::string &tag_name, unsigned int comp=0) const
 
Moose::Kokkos::ADVariableValue kokkosADCoupledVectorTagNodalValuesByName (const std::string &var_name, const std::string &tag_name) const
 
Moose::Kokkos::ADVariableValue kokkosADCoupledVectorTagDofValueByName (const std::string &var_name, const std::string &tag_name, unsigned int comp=0) const
 
Moose::Kokkos::ADVariableValue kokkosADCoupledVectorTagDofValuesByName (const std::string &var_name, const std::string &tag_name) const
 
Moose::Kokkos::ADVariableValue kokkosADCoupledVectorTagValue (const std::string &var_name, const std::string &tag_param_name, unsigned int comp=0) const
 
Moose::Kokkos::ADVariableValue kokkosADCoupledVectorTagValues (const std::string &var_name, const std::string &tag_param_name) const
 
Moose::Kokkos::ADVariableGradient kokkosADCoupledVectorTagGradient (const std::string &var_name, const std::string &tag_param_name, unsigned int comp=0) const
 
Moose::Kokkos::ADVariableGradient kokkosADCoupledVectorTagGradients (const std::string &var_name, const std::string &tag_param_name) const
 
Moose::Kokkos::ADVariableValue kokkosADCoupledVectorTagNodalValue (const std::string &var_name, const std::string &tag_param_name, unsigned int comp=0) const
 
Moose::Kokkos::ADVariableValue kokkosADCoupledVectorTagNodalValues (const std::string &var_name, const std::string &tag_param_name) const
 
Moose::Kokkos::ADVariableValue kokkosADCoupledVectorTagDofValue (const std::string &var_name, const std::string &tag_param_name, unsigned int comp=0) const
 
Moose::Kokkos::ADVariableValue kokkosADCoupledVectorTagDofValues (const std::string &var_name, const std::string &tag_param_name) const
 
Moose::Kokkos::ADVariableValue kokkosADCoupledValue (const std::string &var_name, unsigned int comp=0) const
 
Moose::Kokkos::ADVariableValue kokkosADCoupledValues (const std::string &var_name) const
 
Moose::Kokkos::ADVariableGradient kokkosADCoupledGradient (const std::string &var_name, unsigned int comp=0) const
 
Moose::Kokkos::ADVariableGradient kokkosADCoupledGradients (const std::string &var_name) const
 
Moose::Kokkos::ADVariableValue kokkosADCoupledNodalValue (const std::string &var_name, unsigned int comp=0) const
 
Moose::Kokkos::ADVariableValue kokkosADCoupledNodalValues (const std::string &var_name) const
 
Moose::Kokkos::ADVariableValue kokkosADCoupledDofValue (const std::string &var_name, unsigned int comp=0) const
 
Moose::Kokkos::ADVariableValue kokkosADCoupledDofValues (const std::string &var_name) const
 
Moose::Kokkos::ADVariableValue kokkosADCoupledValueOld (const std::string &var_name, unsigned int comp=0) const
 
Moose::Kokkos::ADVariableValue kokkosADCoupledValuesOld (const std::string &var_name) const
 
Moose::Kokkos::ADVariableGradient kokkosADCoupledGradientOld (const std::string &var_name, unsigned int comp=0) const
 
Moose::Kokkos::ADVariableGradient kokkosADCoupledGradientsOld (const std::string &var_name) const
 
Moose::Kokkos::ADVariableValue kokkosADCoupledNodalValueOld (const std::string &var_name, unsigned int comp=0) const
 
Moose::Kokkos::ADVariableValue kokkosADCoupledNodalValuesOld (const std::string &var_name) const
 
Moose::Kokkos::ADVariableValue kokkosADCoupledDofValueOld (const std::string &var_name, unsigned int comp=0) const
 
Moose::Kokkos::ADVariableValue kokkosADCoupledDofValuesOld (const std::string &var_name) const
 
Moose::Kokkos::ADVariableValue kokkosADCoupledValueOlder (const std::string &var_name, unsigned int comp=0) const
 
Moose::Kokkos::ADVariableValue kokkosADCoupledValuesOlder (const std::string &var_name) const
 
Moose::Kokkos::ADVariableGradient kokkosADCoupledGradientOlder (const std::string &var_name, unsigned int comp=0) const
 
Moose::Kokkos::ADVariableGradient kokkosADCoupledGradientsOlder (const std::string &var_name) const
 
Moose::Kokkos::ADVariableValue kokkosADCoupledNodalValueOlder (const std::string &var_name, unsigned int comp=0) const
 
Moose::Kokkos::ADVariableValue kokkosADCoupledNodalValuesOlder (const std::string &var_name) const
 
Moose::Kokkos::ADVariableValue kokkosADCoupledDofValueOlder (const std::string &var_name, unsigned int comp=0) const
 
Moose::Kokkos::ADVariableValue kokkosADCoupledDofValuesOlder (const std::string &var_name) const
 
Moose::Kokkos::ADVariableValue kokkosADCoupledDot (const std::string &var_name, unsigned int comp=0) const
 
Moose::Kokkos::ADVariableValue kokkosADCoupledDots (const std::string &var_name) const
 
Moose::Kokkos::ADVariableValue kokkosADCoupledNodalDot (const std::string &var_name, unsigned int comp=0) const
 
Moose::Kokkos::ADVariableValue kokkosADCoupledNodalDots (const std::string &var_name) const
 
Moose::Kokkos::Scalar< const RealkokkosCoupledDotDu (const std::string &var_name, unsigned int comp=0) const
 
Moose::Kokkos::VariableValue kokkosZeroValue () const
 
Moose::Kokkos::VariableGradient kokkosZeroGradient () const
 
Moose::Kokkos::VariableValue kokkosZeroNodalValue () const
 
const GenericMaterialProperty< T, is_ad > & getGenericMaterialProperty (const std::string &name, MaterialData &material_data, const unsigned int state=0)
 
const GenericMaterialProperty< T, is_ad > & getGenericMaterialProperty (const std::string &name, const unsigned int state=0)
 
const GenericMaterialProperty< T, is_ad > & getGenericMaterialProperty (const std::string &name, const unsigned int state=0)
 
const MaterialProperty< T > & getMaterialProperty (const std::string &name, MaterialData &material_data, const unsigned int state=0)
 
const MaterialProperty< T > & getMaterialProperty (const std::string &name, const unsigned int state=0)
 
const MaterialProperty< T > & getMaterialProperty (const std::string &name, const unsigned int state=0)
 
const ADMaterialProperty< T > & getADMaterialProperty (const std::string &name, MaterialData &material_data)
 
const ADMaterialProperty< T > & getADMaterialProperty (const std::string &name)
 
const ADMaterialProperty< T > & getADMaterialProperty (const std::string &name)
 
const MaterialProperty< T > & getMaterialPropertyOld (const std::string &name, MaterialData &material_data)
 
const MaterialProperty< T > & getMaterialPropertyOld (const std::string &name)
 
const MaterialProperty< T > & getMaterialPropertyOld (const std::string &name)
 
const MaterialProperty< T > & getMaterialPropertyOlder (const std::string &name, MaterialData &material_data)
 
const MaterialProperty< T > & getMaterialPropertyOlder (const std::string &name)
 
const MaterialProperty< T > & getMaterialPropertyOlder (const std::string &name)
 
const GenericMaterialProperty< T, is_ad > & getGenericMaterialPropertyByName (const MaterialPropertyName &name, MaterialData &material_data, const unsigned int state)
 
const GenericMaterialProperty< T, is_ad > & getGenericMaterialPropertyByName (const std::string &name, const unsigned int state=0)
 
const GenericMaterialProperty< T, is_ad > & getGenericMaterialPropertyByName (const MaterialPropertyName &name, const unsigned int state=0)
 
const GenericMaterialProperty< T, is_ad > & getGenericMaterialPropertyByName (const std::string &name, const unsigned int state=0)
 
const GenericMaterialProperty< T, is_ad > & getGenericMaterialPropertyByName (const MaterialPropertyName &name, const unsigned int state=0)
 
const MaterialProperty< T > & getMaterialPropertyByName (const MaterialPropertyName &name, MaterialData &material_data, const unsigned int state=0)
 
const MaterialProperty< T > & getMaterialPropertyByName (const std::string &prop_name, const unsigned int state=0)
 
const MaterialProperty< T > & getMaterialPropertyByName (const MaterialPropertyName &name, const unsigned int state=0)
 
const MaterialProperty< T > & getMaterialPropertyByName (const std::string &prop_name, const unsigned int state=0)
 
const MaterialProperty< T > & getMaterialPropertyByName (const MaterialPropertyName &name, const unsigned int state=0)
 
const ADMaterialProperty< T > & getADMaterialPropertyByName (const MaterialPropertyName &name, MaterialData &material_data)
 
const ADMaterialProperty< T > & getADMaterialPropertyByName (const std::string &prop_name)
 
const ADMaterialProperty< T > & getADMaterialPropertyByName (const MaterialPropertyName &name)
 
const ADMaterialProperty< T > & getADMaterialPropertyByName (const std::string &prop_name)
 
const ADMaterialProperty< T > & getADMaterialPropertyByName (const MaterialPropertyName &name)
 
const MaterialProperty< T > & getMaterialPropertyOldByName (const MaterialPropertyName &name, MaterialData &material_data)
 
const MaterialProperty< T > & getMaterialPropertyOldByName (const std::string &prop_name)
 
const MaterialProperty< T > & getMaterialPropertyOldByName (const MaterialPropertyName &name)
 
const MaterialProperty< T > & getMaterialPropertyOldByName (const std::string &prop_name)
 
const MaterialProperty< T > & getMaterialPropertyOldByName (const MaterialPropertyName &name)
 
const MaterialProperty< T > & getMaterialPropertyOlderByName (const MaterialPropertyName &name, MaterialData &material_data)
 
const MaterialProperty< T > & getMaterialPropertyOlderByName (const std::string &prop_name)
 
const MaterialProperty< T > & getMaterialPropertyOlderByName (const MaterialPropertyName &name)
 
const MaterialProperty< T > & getMaterialPropertyOlderByName (const std::string &prop_name)
 
const MaterialProperty< T > & getMaterialPropertyOlderByName (const MaterialPropertyName &name)
 
Moose::Kokkos::MaterialProperty< T, dimension > getKokkosMaterialPropertyByName (const std::string &prop_name_in)
 
Moose::Kokkos::MaterialProperty< T, dimension > getKokkosMaterialPropertyOldByName (const std::string &prop_name)
 
Moose::Kokkos::MaterialProperty< T, dimension > getKokkosMaterialPropertyOlderByName (const std::string &prop_name)
 
Moose::Kokkos::MaterialProperty< T, dimension > getKokkosMaterialProperty (const std::string &name)
 
Moose::Kokkos::MaterialProperty< T, dimension > getKokkosMaterialPropertyOld (const std::string &name)
 
Moose::Kokkos::MaterialProperty< T, dimension > getKokkosMaterialPropertyOlder (const std::string &name)
 
std::pair< const MaterialProperty< T > *, std::set< SubdomainID > > getBlockMaterialProperty (const MaterialPropertyName &name)
 
std::pair< Moose::Kokkos::MaterialProperty< T, dimension >, std::set< SubdomainID > > getKokkosBlockMaterialProperty (const MaterialPropertyName &name)
 
std::set< SubdomainIDgetMaterialPropertyBlocks (const std::string &name)
 
std::vector< SubdomainName > getMaterialPropertyBlockNames (const std::string &name)
 
std::set< BoundaryIDgetMaterialPropertyBoundaryIDs (const std::string &name)
 
std::vector< BoundaryName > getMaterialPropertyBoundaryNames (const std::string &name)
 
void checkBlockAndBoundaryCompatibility (std::shared_ptr< MaterialBase > discrete)
 
std::unordered_map< SubdomainID, std::vector< MaterialBase *> > buildRequiredMaterials (bool allow_stateful=true)
 
void statefulPropertiesAllowed (bool)
 
virtual bool getMaterialPropertyCalled () const
 
const GenericMaterialProperty< T, is_ad > & getPossiblyConstantGenericMaterialPropertyByName (const MaterialPropertyName &prop_name, MaterialData &material_data, const unsigned int state)
 
const GenericOptionalMaterialProperty< T, is_ad > & getGenericOptionalMaterialProperty (const std::string &name, const unsigned int state=0)
 
const GenericOptionalMaterialProperty< T, is_ad > & getGenericOptionalMaterialProperty (const std::string &name, const unsigned int state=0)
 
const OptionalMaterialProperty< T > & getOptionalMaterialProperty (const std::string &name, const unsigned int state=0)
 
const OptionalMaterialProperty< T > & getOptionalMaterialProperty (const std::string &name, const unsigned int state=0)
 
const OptionalADMaterialProperty< T > & getOptionalADMaterialProperty (const std::string &name)
 
const OptionalADMaterialProperty< T > & getOptionalADMaterialProperty (const std::string &name)
 
const OptionalMaterialProperty< T > & getOptionalMaterialPropertyOld (const std::string &name)
 
const OptionalMaterialProperty< T > & getOptionalMaterialPropertyOld (const std::string &name)
 
const OptionalMaterialProperty< T > & getOptionalMaterialPropertyOlder (const std::string &name)
 
const OptionalMaterialProperty< T > & getOptionalMaterialPropertyOlder (const std::string &name)
 
MaterialProperty< T > & declarePropertyByName (const std::string &prop_name)
 
MaterialProperty< T > & declarePropertyByName (const std::string &prop_name)
 
MaterialProperty< T > & declareProperty (const std::string &name)
 
MaterialProperty< T > & declareProperty (const std::string &name)
 
ADMaterialProperty< T > & declareADPropertyByName (const std::string &prop_name)
 
ADMaterialProperty< T > & declareADPropertyByName (const std::string &prop_name)
 
ADMaterialProperty< T > & declareADProperty (const std::string &name)
 
ADMaterialProperty< T > & declareADProperty (const std::string &name)
 
auto & declareGenericProperty (const std::string &prop_name)
 
auto & declareGenericProperty (const std::string &prop_name)
 
GenericMaterialProperty< T, is_ad > & declareGenericPropertyByName (const std::string &prop_name)
 
GenericMaterialProperty< T, is_ad > & declareGenericPropertyByName (const std::string &prop_name)
 
const DistributiongetDistribution (const std::string &name) const
 
const TgetDistribution (const std::string &name) const
 
const DistributiongetDistribution (const std::string &name) const
 
const TgetDistribution (const std::string &name) const
 
const DistributiongetDistributionByName (const DistributionName &name) const
 
const TgetDistributionByName (const std::string &name) const
 
const DistributiongetDistributionByName (const DistributionName &name) const
 
const TgetDistributionByName (const std::string &name) const
 
bool hasUserObject (const std::string &param_name) const
 
bool hasUserObject (const std::string &param_name) const
 
bool hasUserObject (const std::string &param_name) const
 
bool hasUserObject (const std::string &param_name) const
 
bool hasUserObjectByName (const UserObjectName &object_name) const
 
bool hasUserObjectByName (const UserObjectName &object_name) const
 
bool hasUserObjectByName (const UserObjectName &object_name) const
 
bool hasUserObjectByName (const UserObjectName &object_name) const
 
const PostprocessorValuegetPostprocessorValue (const std::string &param_name, const unsigned int index=0) const
 
const PostprocessorValuegetPostprocessorValue (const std::string &param_name, const unsigned int index=0) const
 
const PostprocessorValuegetPostprocessorValueOld (const std::string &param_name, const unsigned int index=0) const
 
const PostprocessorValuegetPostprocessorValueOld (const std::string &param_name, const unsigned int index=0) const
 
const PostprocessorValuegetPostprocessorValueOlder (const std::string &param_name, const unsigned int index=0) const
 
const PostprocessorValuegetPostprocessorValueOlder (const std::string &param_name, const unsigned int index=0) const
 
virtual const PostprocessorValuegetPostprocessorValueByName (const PostprocessorName &name) const
 
virtual const PostprocessorValuegetPostprocessorValueByName (const PostprocessorName &name) const
 
const PostprocessorValuegetPostprocessorValueOldByName (const PostprocessorName &name) const
 
const PostprocessorValuegetPostprocessorValueOldByName (const PostprocessorName &name) const
 
const PostprocessorValuegetPostprocessorValueOlderByName (const PostprocessorName &name) const
 
const PostprocessorValuegetPostprocessorValueOlderByName (const PostprocessorName &name) const
 
bool isVectorPostprocessorDistributed (const std::string &param_name) const
 
bool isVectorPostprocessorDistributed (const std::string &param_name) const
 
bool isVectorPostprocessorDistributedByName (const VectorPostprocessorName &name) const
 
bool isVectorPostprocessorDistributedByName (const VectorPostprocessorName &name) const
 
bool hasMaterialProperty (const std::string &name)
 
bool hasMaterialProperty (const std::string &name)
 
bool hasMaterialPropertyByName (const std::string &name)
 
bool hasMaterialPropertyByName (const std::string &name)
 
bool hasADMaterialProperty (const std::string &name)
 
bool hasADMaterialProperty (const std::string &name)
 
bool hasADMaterialPropertyByName (const std::string &name)
 
bool hasADMaterialPropertyByName (const std::string &name)
 
bool hasKokkosMaterialProperty (const std::string &name)
 
bool hasKokkosMaterialProperty (const std::string &name)
 
bool hasKokkosMaterialPropertyByName (const std::string &name)
 
bool hasKokkosMaterialPropertyByName (const std::string &name)
 
bool hasGenericMaterialProperty (const std::string &name)
 
bool hasGenericMaterialProperty (const std::string &name)
 
bool hasGenericMaterialPropertyByName (const std::string &name)
 
bool hasGenericMaterialPropertyByName (const std::string &name)
 
PenetrationLocatorgetPenetrationLocator (const BoundaryName &primary, const BoundaryName &secondary, Order order)
 
PenetrationLocatorgetQuadraturePenetrationLocator (const BoundaryName &primary, const BoundaryName &secondary, Order order)
 
NearestNodeLocatorgetNearestNodeLocator (const BoundaryName &primary, const BoundaryName &secondary)
 
NearestNodeLocatorgetQuadratureNearestNodeLocator (const BoundaryName &primary, const BoundaryName &secondary)
 
bool requiresGeometricSearch () const
 
const Parallel::Communicator & comm () const
 
processor_id_type n_processors () const
 
processor_id_type processor_id () const
 
void resetQpProperties () final
 Retained as empty methods to avoid a warning from Material.C in framework. These methods are unused in all inheriting classes and should not be overwritten. More...
 
void resetProperties () final
 

Static Public Member Functions

static InputParameters validParams ()
 
static void callMooseError (MooseApp *const app, const InputParameters &params, std::string msg, const bool with_prefix, const hit::Node *node, const bool show_trace=true)
 
static std::deque< MaterialBase *> buildRequiredMaterials (const Consumers &mat_consumers, const std::vector< std::shared_ptr< MaterialBase >> &mats, const bool allow_stateful)
 
static bool restricted (const std::set< BoundaryID > &ids)
 
static void sort (typename std::vector< T > &vector)
 
static void sortDFS (typename std::vector< T > &vector)
 
static void cyclicDependencyError (CyclicDependencyException< T2 > &e, const std::string &header, NameFunc &&name_func)
 
static void cyclicDependencyError (CyclicDependencyException< T2 > &e, const std::string &header)
 
static std::string deduceFunctorName (const std::string &name, const InputParameters &params)
 

Public Attributes

const Elem *const & _current_elem
 
Real_dt
 
const MooseArray< Point > & _q_point
 
unsigned int _qp
 
 ALL
 
 ANY
 
 usingCombinedWarningSolutionWarnings
 
const ConsoleStream _console
 

Static Public Attributes

static const std::string type_param
 
static const std::string name_param
 
static const std::string unique_name_param
 
static const std::string app_param
 
static const std::string moose_base_param
 
static const std::string kokkos_object_param
 
static constexpr PropertyValue::id_type default_property_id
 
static constexpr PropertyValue::id_type zero_property_id
 

Protected Types

enum  QP_Data_Type
 

Protected Member Functions

virtual void yieldFunctionValues (Real p, Real q, const std::vector< Real > &intnl, std::vector< Real > &yf) const =0
 Computes the values of the yield functions, given p, q and intnl parameters. More...
 
void yieldFunctionValuesV (const std::vector< Real > &stress_params, const std::vector< Real > &intnl, std::vector< Real > &yf) const override
 Computes the values of the yield functions, given stress_params and intnl parameters. More...
 
virtual void computeAllQ (Real p, Real q, const std::vector< Real > &intnl, std::vector< yieldAndFlow > &all_q) const =0
 Completely fills all_q with correct values. More...
 
void computeAllQV (const std::vector< Real > &stress_params, const std::vector< Real > &intnl, std::vector< yieldAndFlow > &all_q) const override
 Completely fills all_q with correct values. More...
 
virtual void preReturnMap (Real p_trial, Real q_trial, const RankTwoTensor &stress_trial, const std::vector< Real > &intnl_old, const std::vector< Real > &yf, const RankFourTensor &Eijkl)
 Derived classes may employ this function to record stuff or do other computations prior to the return-mapping algorithm. More...
 
void preReturnMapV (const std::vector< Real > &trial_stress_params, const RankTwoTensor &stress_trial, const std::vector< Real > &intnl_old, const std::vector< Real > &yf, const RankFourTensor &Eijkl) override
 Derived classes may employ this function to record stuff or do other computations prior to the return-mapping algorithm. More...
 
virtual void initializeVars (Real p_trial, Real q_trial, const std::vector< Real > &intnl_old, Real &p, Real &q, Real &gaE, std::vector< Real > &intnl) const
 Sets (p, q, gaE, intnl) at "good guesses" of the solution to the Return-Map algorithm. More...
 
void initializeVarsV (const std::vector< Real > &trial_stress_params, const std::vector< Real > &intnl_old, std::vector< Real > &stress_params, Real &gaE, std::vector< Real > &intnl) const override
 Sets (stress_params, intnl) at "good guesses" of the solution to the Return-Map algorithm. More...
 
virtual void setIntnlValues (Real p_trial, Real q_trial, Real p, Real q, const std::vector< Real > &intnl_old, std::vector< Real > &intnl) const =0
 Sets the internal parameters based on the trial values of p and q, their current values, and the old values of the internal parameters. More...
 
void setIntnlValuesV (const std::vector< Real > &trial_stress_params, const std::vector< Real > &current_stress_params, const std::vector< Real > &intnl_old, std::vector< Real > &intnl) const override
 Sets the internal parameters based on the trial values of stress_params, their current values, and the old values of the internal parameters. More...
 
virtual void setIntnlDerivatives (Real p_trial, Real q_trial, Real p, Real q, const std::vector< Real > &intnl, std::vector< std::vector< Real >> &dintnl) const =0
 Sets the derivatives of internal parameters, based on the trial values of p and q, their current values, and the old values of the internal parameters. More...
 
virtual void setIntnlDerivativesV (const std::vector< Real > &trial_stress_params, const std::vector< Real > &current_stress_params, const std::vector< Real > &intnl, std::vector< std::vector< Real >> &dintnl) const override
 Sets the derivatives of internal parameters, based on the trial values of stress_params, their current values, and the current values of the internal parameters. More...
 
virtual void computePQ (const RankTwoTensor &stress, Real &p, Real &q) const =0
 Computes p and q, given stress. More...
 
virtual void computeStressParams (const RankTwoTensor &stress, std::vector< Real > &stress_params) const override
 Computes stress_params, given stress. More...
 
virtual void setEppEqq (const RankFourTensor &Eijkl, Real &Epp, Real &Eqq) const =0
 Set Epp and Eqq based on the elasticity tensor Derived classes must override this. More...
 
virtual void setEffectiveElasticity (const RankFourTensor &Eijkl) override
 Sets _Eij and _En and _Cij. More...
 
virtual void setStressAfterReturn (const RankTwoTensor &stress_trial, Real p_ok, Real q_ok, Real gaE, const std::vector< Real > &intnl, const yieldAndFlow &smoothed_q, const RankFourTensor &Eijkl, RankTwoTensor &stress) const =0
 Sets stress from the admissible parameters. More...
 
void setStressAfterReturnV (const RankTwoTensor &stress_trial, const std::vector< Real > &stress_params, Real gaE, const std::vector< Real > &intnl, const yieldAndFlow &smoothed_q, const RankFourTensor &Eijkl, RankTwoTensor &stress) const override
 Sets stress from the admissible parameters. More...
 
void setInelasticStrainIncrementAfterReturn (const RankTwoTensor &stress_trial, Real gaE, const yieldAndFlow &smoothed_q, const RankFourTensor &elasticity_tensor, const RankTwoTensor &returned_stress, RankTwoTensor &inelastic_strain_increment) override
 Sets inelastic strain increment from the returned configuration This is called after the return-map process has completed successfully in stress_param space, just after finalizeReturnProcess has been called. More...
 
virtual void consistentTangentOperator (const RankTwoTensor &stress_trial, Real p_trial, Real q_trial, const RankTwoTensor &stress, Real p, Real q, Real gaE, const yieldAndFlow &smoothed_q, const RankFourTensor &Eijkl, bool compute_full_tangent_operator, RankFourTensor &cto) const
 Calculates the consistent tangent operator. More...
 
void consistentTangentOperatorV (const RankTwoTensor &stress_trial, const std::vector< Real > &trial_stress_params, const RankTwoTensor &stress, const std::vector< Real > &stress_params, Real gaE, const yieldAndFlow &smoothed_q, const RankFourTensor &Eijkl, bool compute_full_tangent_operator, const std::vector< std::vector< Real >> &dvar_dtrial, RankFourTensor &cto) override
 Calculates the consistent tangent operator. More...
 
virtual void dstressparam_dstress (const RankTwoTensor &stress, std::vector< RankTwoTensor > &dsp) const override
 d(stress_param[i])/d(stress) at given stress. More...
 
virtual void d2stressparam_dstress (const RankTwoTensor &stress, std::vector< RankFourTensor > &d2sp) const override
 d2(stress_param[i])/d(stress)/d(stress) at given stress. More...
 
virtual RankTwoTensor dpdstress (const RankTwoTensor &stress) const =0
 d(p)/d(stress) Derived classes must override this More...
 
virtual RankFourTensor d2pdstress2 (const RankTwoTensor &stress) const =0
 d2(p)/d(stress)/d(stress) Derived classes must override this More...
 
virtual RankTwoTensor dqdstress (const RankTwoTensor &stress) const =0
 d(q)/d(stress) Derived classes must override this More...
 
virtual RankFourTensor d2qdstress2 (const RankTwoTensor &stress) const =0
 d2(q)/d(stress)/d(stress) Derived classes must override this More...
 
virtual void initQpStatefulProperties () override
 
virtual void updateState (RankTwoTensor &strain_increment, RankTwoTensor &inelastic_strain_increment, const RankTwoTensor &rotation_increment, RankTwoTensor &stress_new, const RankTwoTensor &stress_old, const RankFourTensor &elasticity_tensor, const RankTwoTensor &elastic_strain_old, bool compute_full_tangent_operator, RankFourTensor &tangent_operator) override
 
virtual void updateState (GR2 &strain_increment, GR2 &inelastic_strain_increment, const GR2 &rotation_increment, GR2 &stress_new, const RankTwoTensor &stress_old, const GR4 &elasticity_tensor, const RankTwoTensor &elastic_strain_old, bool compute_full_tangent_operator=false, RankFourTensor &tangent_operator=StressUpdateBaseTempl< is_ad >::_identityTensor)
 Given a strain increment that results in a trial stress, perform some procedure (such as an iterative return-mapping process) to produce an admissible stress, an elastic strain increment and an inelastic strain increment. More...
 
virtual void propagateQpStatefulProperties () override
 If updateState is not called during a timestep, this will be. More...
 
virtual TangentCalculationMethod getTangentCalculationMethod () override
 
Real yieldF (const std::vector< Real > &stress_params, const std::vector< Real > &intnl) const
 Computes the smoothed yield function. More...
 
Real yieldF (const std::vector< Real > &yfs) const
 Computes the smoothed yield function. More...
 
Real ismoother (Real f_diff) const
 Smooths yield functions. More...
 
Real smoother (Real f_diff) const
 Derivative of ismoother. More...
 
Real dsmoother (Real f_diff) const
 Derivative of smoother. More...
 
yieldAndFlow smoothAllQuantities (const std::vector< Real > &stress_params, const std::vector< Real > &intnl) const
 Calculates all yield functions and derivatives, and then performs the smoothing scheme. More...
 
int lineSearch (Real &res2, std::vector< Real > &stress_params, Real &gaE, const std::vector< Real > &trial_stress_params, yieldAndFlow &smoothed_q, const std::vector< Real > &intnl_ok, std::vector< Real > &intnl, std::vector< Real > &rhs, Real &linesearch_needed) const
 Performs a line-search to find stress_params and gaE Upon entry: More...
 
int nrStep (const yieldAndFlow &smoothed_q, const std::vector< Real > &trial_stress_params, const std::vector< Real > &stress_params, const std::vector< Real > &intnl, Real gaE, std::vector< Real > &rhs) const
 Performs a Newton-Raphson step to attempt to zero rhs Upon return, rhs will contain the solution. More...
 
Real calculateRes2 (const std::vector< Real > &rhs) const
 Calculates the residual-squared for the Newton-Raphson + line-search. More...
 
void calculateRHS (const std::vector< Real > &trial_stress_params, const std::vector< Real > &stress_params, Real gaE, const yieldAndFlow &smoothed_q, std::vector< Real > &rhs) const
 Calculates the RHS in the following 0 = rhs[0] = S[0] - S[0]^trial + ga * E[0, j] * dg/dS[j] 0 = rhs[1] = S[1] - S[1]^trial + ga * E[1, j] * dg/dS[j] ... More...
 
void dnRHSdVar (const yieldAndFlow &smoothed_q, const std::vector< std::vector< Real >> &dintnl, const std::vector< Real > &stress_params, Real gaE, std::vector< double > &jac) const
 Derivative of -RHS with respect to the stress_params and gaE, placed into an array ready for solving the linear system using LAPACK gsev. More...
 
virtual void errorHandler (const std::string &message) const
 Performs any necessary cleaning-up, then throw MooseException(message) More...
 
virtual void initializeReturnProcess ()
 Derived classes may use this to perform calculations before any return-map process is performed, for instance, to initialize variables. More...
 
virtual void finalizeReturnProcess (const RankTwoTensor &rotation_increment)
 Derived classes may use this to perform calculations after the return-map process has completed successfully in stress_param space but before the returned stress tensor has been calculcated. More...
 
void dVardTrial (bool elastic_only, const std::vector< Real > &trial_stress_params, const std::vector< Real > &stress_params, Real gaE, const std::vector< Real > &intnl, const yieldAndFlow &smoothed_q, Real step_size, bool compute_full_tangent_operator, std::vector< std::vector< Real >> &dvar_dtrial) const
 Calculates derivatives of the stress_params and gaE with repect to the trial values of the stress_params for the (sub)strain increment. More...
 
bool precisionLoss (const std::vector< Real > &solution, const std::vector< Real > &stress_params, Real gaE) const
 Check whether precision loss has occurred. More...
 
virtual void checkMaterialProperty (const std::string &name, const unsigned int state) override
 
virtual const MaterialDatamaterialData () const override
 
virtual MaterialDatamaterialData () override
 
virtual Moose::MaterialDataType materialDataType () override
 
virtual const QBase & qRule () const override
 
virtual void computeQpProperties ()
 
virtual const FEProblemBasemiProblem () const
 
virtual FEProblemBasemiProblem ()
 
bool isPropertyActive (const unsigned int prop_id) const
 
void registerPropName (const std::string &prop_name, bool is_get, const unsigned int state)
 
void checkExecutionStage ()
 
void checkExecutionStage ()
 
void flagInvalidSolutionInternal (const InvalidSolutionID invalid_solution_id) const
 
InvalidSolutionID registerInvalidSolutionInternal (const std::string &message, const bool warning) const
 
virtual bool hasBlockMaterialPropertyHelper (const std::string &prop_name)
 
void initializeBlockRestrictable (const MooseObject *moose_object)
 
void initializeKokkosBlockRestrictable ()
 
Moose::CoordinateSystemType getBlockCoordSystem ()
 
KOKKOS_FUNCTION dof_id_type numKokkosBlockElements () const
 
KOKKOS_FUNCTION dof_id_type numKokkosBlockNodes () const
 
KOKKOS_FUNCTION dof_id_type numKokkosBlockSides () const
 
KOKKOS_FUNCTION ContiguousElementID kokkosBlockElementID (Moose::Kokkos::ThreadID tid) const
 
KOKKOS_FUNCTION ContiguousElementID kokkosBlockNodeID (Moose::Kokkos::ThreadID tid) const
 
KOKKOS_FUNCTION auto kokkosBlockElementSideID (Moose::Kokkos::ThreadID tid) const
 
bool hasBoundaryMaterialPropertyHelper (const std::string &prop_name) const
 
KOKKOS_FUNCTION dof_id_type numKokkosBoundaryNodes () const
 
KOKKOS_FUNCTION dof_id_type numKokkosBoundarySides () const
 
KOKKOS_FUNCTION ContiguousNodeID kokkosBoundaryNodeID (Moose::Kokkos::ThreadID tid) const
 
KOKKOS_FUNCTION auto kokkosBoundaryElementSideID (Moose::Kokkos::ThreadID tid) const
 
bool isCoupledScalar (const std::string &var_name, unsigned int i=0) const
 
unsigned int coupledScalarComponents (const std::string &var_name) const
 
unsigned int coupledScalar (const std::string &var_name, unsigned int comp=0) const
 
libMesh::Order coupledScalarOrder (const std::string &var_name, unsigned int comp=0) const
 
const VariableValuecoupledScalarValue (const std::string &var_name, unsigned int comp=0) const
 
const ADVariableValueadCoupledScalarValue (const std::string &var_name, unsigned int comp=0) const
 
const GenericVariableValue< is_ad > & coupledGenericScalarValue (const std::string &var_name, unsigned int comp=0) const
 
const GenericVariableValue< false > & coupledGenericScalarValue (const std::string &var_name, const unsigned int comp) const
 
const GenericVariableValue< true > & coupledGenericScalarValue (const std::string &var_name, const unsigned int comp) const
 
const VariableValuecoupledVectorTagScalarValue (const std::string &var_name, TagID tag, unsigned int comp=0) const
 
const VariableValuecoupledMatrixTagScalarValue (const std::string &var_name, TagID tag, unsigned int comp=0) const
 
const VariableValuecoupledScalarValueOld (const std::string &var_name, unsigned int comp=0) const
 
const VariableValuecoupledScalarValueOlder (const std::string &var_name, unsigned int comp=0) const
 
const VariableValuecoupledScalarDot (const std::string &var_name, unsigned int comp=0) const
 
const ADVariableValueadCoupledScalarDot (const std::string &var_name, unsigned int comp=0) const
 
const VariableValuecoupledScalarDotDot (const std::string &var_name, unsigned int comp=0) const
 
const VariableValuecoupledScalarDotOld (const std::string &var_name, unsigned int comp=0) const
 
const VariableValuecoupledScalarDotDotOld (const std::string &var_name, unsigned int comp=0) const
 
const VariableValuecoupledScalarDotDu (const std::string &var_name, unsigned int comp=0) const
 
const VariableValuecoupledScalarDotDotDu (const std::string &var_name, unsigned int comp=0) const
 
const MooseVariableScalargetScalarVar (const std::string &var_name, unsigned int comp) const
 
virtual void addUserObjectDependencyHelper (const UserObjectBase &) const
 
virtual void addPostprocessorDependencyHelper (const PostprocessorName &) const
 
virtual void addVectorPostprocessorDependencyHelper (const VectorPostprocessorName &) const
 
TdeclareRestartableData (const std::string &data_name, Args &&... args)
 
ManagedValue< TdeclareManagedRestartableDataWithContext (const std::string &data_name, void *context, Args &&... args)
 
const TgetRestartableData (const std::string &data_name) const
 
TdeclareRestartableDataWithContext (const std::string &data_name, void *context, Args &&... args)
 
TdeclareRecoverableData (const std::string &data_name, Args &&... args)
 
TdeclareRestartableDataWithObjectName (const std::string &data_name, const std::string &object_name, Args &&... args)
 
TdeclareRestartableDataWithObjectNameWithContext (const std::string &data_name, const std::string &object_name, void *context, Args &&... args)
 
std::string restartableName (const std::string &data_name) const
 
std::string deduceFunctorName (const std::string &name) const
 
const Moose::Functor< T > & getFunctor (const std::string &name)
 
const Moose::Functor< T > & getFunctor (const std::string &name, THREAD_ID tid)
 
const Moose::Functor< T > & getFunctor (const std::string &name, SubProblem &subproblem)
 
const Moose::Functor< T > & getFunctor (const std::string &name, SubProblem &subproblem, THREAD_ID tid)
 
bool isFunctor (const std::string &name) const
 
bool isFunctor (const std::string &name, const SubProblem &subproblem) const
 
Moose::ElemArg makeElemArg (const Elem *elem, bool correct_skewnewss=false) const
 
void checkFunctorSupportsSideIntegration (const std::string &name, bool qp_integration)
 
const Moose::Functor< T > & getFunctorByName (const std::string &name)
 
virtual void coupledCallback (const std::string &, bool) const
 
virtual bool isCoupled (const std::string &var_name, unsigned int i=0) const
 
virtual bool isCoupledConstant (const std::string &var_name) const
 
unsigned int coupledComponents (const std::string &var_name) const
 
VariableName coupledName (const std::string &var_name, unsigned int comp=0) const
 
std::vector< VariableName > coupledNames (const std::string &var_name) const
 
virtual unsigned int coupled (const std::string &var_name, unsigned int comp=0) const
 
std::vector< unsigned intcoupledIndices (const std::string &var_name) const
 
virtual const VariableValuecoupledValue (const std::string &var_name, unsigned int comp=0) const
 
std::vector< const VariableValue *> coupledValues (const std::string &var_name) const
 
std::vector< const VectorVariableValue *> coupledVectorValues (const std::string &var_name) const
 
const GenericVariableValue< is_ad > & coupledGenericValue (const std::string &var_name, unsigned int comp=0) const
 
const GenericVariableValue< false > & coupledGenericValue (const std::string &var_name, unsigned int comp) const
 
const GenericVariableValue< true > & coupledGenericValue (const std::string &var_name, unsigned int comp) const
 
const GenericVectorVariableValue< is_ad > & coupledGenericVectorValue (const std::string &var_name, unsigned int comp=0) const
 
const GenericVectorVariableValue< false > & coupledGenericVectorValue (const std::string &var_name, unsigned int comp) const
 
const GenericVectorVariableValue< true > & coupledGenericVectorValue (const std::string &var_name, unsigned int comp) const
 
std::vector< const GenericVariableValue< is_ad > *> coupledGenericValues (const std::string &var_name) const
 
std::vector< const GenericVariableValue< false > *> coupledGenericValues (const std::string &var_name) const
 
std::vector< const GenericVariableValue< true > *> coupledGenericValues (const std::string &var_name) const
 
const GenericVariableValue< is_ad > & coupledGenericDofValue (const std::string &var_name, unsigned int comp=0) const
 
const GenericVariableValue< false > & coupledGenericDofValue (const std::string &var_name, unsigned int comp) const
 
const GenericVariableValue< true > & coupledGenericDofValue (const std::string &var_name, unsigned int comp) const
 
const GenericVariableValue< is_ad > & coupledGenericDot (const std::string &var_name, unsigned int comp=0) const
 
const GenericVariableValue< false > & coupledGenericDot (const std::string &var_name, unsigned int comp) const
 
const GenericVariableValue< true > & coupledGenericDot (const std::string &var_name, unsigned int comp) const
 
const GenericVariableValue< is_ad > & coupledGenericDotDot (const std::string &var_name, unsigned int comp=0) const
 
const GenericVariableValue< false > & coupledGenericDotDot (const std::string &var_name, unsigned int comp) const
 
const GenericVariableValue< true > & coupledGenericDotDot (const std::string &var_name, unsigned int comp) const
 
virtual const VariableValuecoupledValueLower (const std::string &var_name, unsigned int comp=0) const
 
const ADVariableValueadCoupledValue (const std::string &var_name, unsigned int comp=0) const
 
std::vector< const ADVariableValue *> adCoupledValues (const std::string &var_name) const
 
const ADVariableValueadCoupledLowerValue (const std::string &var_name, unsigned int comp=0) const
 
const ADVectorVariableValueadCoupledVectorValue (const std::string &var_name, unsigned int comp=0) const
 
std::vector< const ADVectorVariableValue *> adCoupledVectorValues (const std::string &var_name) const
 
virtual const VariableValuecoupledVectorTagValue (const std::string &var_names, TagID tag, unsigned int index=0) const
 
virtual const VariableValuecoupledVectorTagValue (const std::string &var_names, const std::string &tag_name, unsigned int index=0) const
 
std::vector< const VariableValue *> coupledVectorTagValues (const std::string &var_names, TagID tag) const
 
std::vector< const VariableValue *> coupledVectorTagValues (const std::string &var_names, const std::string &tag_name) const
 
virtual const ArrayVariableValuecoupledVectorTagArrayValue (const std::string &var_names, TagID tag, unsigned int index=0) const
 
virtual const ArrayVariableValuecoupledVectorTagArrayValue (const std::string &var_names, const std::string &tag_name, unsigned int index=0) const
 
std::vector< const ArrayVariableValue *> coupledVectorTagArrayValues (const std::string &var_names, TagID tag) const
 
std::vector< const ArrayVariableValue *> coupledVectorTagArrayValues (const std::string &var_names, const std::string &tag_name) const
 
virtual const VariableGradientcoupledVectorTagGradient (const std::string &var_names, TagID tag, unsigned int index=0) const
 
virtual const VariableGradientcoupledVectorTagGradient (const std::string &var_names, const std::string &tag_name, unsigned int index=0) const
 
std::vector< const VariableGradient *> coupledVectorTagGradients (const std::string &var_names, TagID tag) const
 
std::vector< const VariableGradient *> coupledVectorTagGradients (const std::string &var_names, const std::string &tag_name) const
 
virtual const ArrayVariableGradientcoupledVectorTagArrayGradient (const std::string &var_names, TagID tag, unsigned int index=0) const
 
virtual const ArrayVariableGradientcoupledVectorTagArrayGradient (const std::string &var_names, const std::string &tag_name, unsigned int index=0) const
 
std::vector< const ArrayVariableGradient *> coupledVectorTagArrayGradients (const std::string &var_names, TagID tag) const
 
std::vector< const ArrayVariableGradient *> coupledVectorTagArrayGradients (const std::string &var_names, const std::string &tag_name) const
 
virtual const VariableValuecoupledVectorTagDofValue (const std::string &var_name, TagID tag, unsigned int index=0) const
 
virtual const VariableValuecoupledVectorTagDofValue (const std::string &var_names, const std::string &tag_name, unsigned int index=0) const
 
const ArrayVariableValuecoupledVectorTagArrayDofValue (const std::string &var_name, const std::string &tag_name, unsigned int comp=0) const
 
std::vector< const VariableValue *> coupledVectorTagDofValues (const std::string &var_names, TagID tag) const
 
std::vector< const VariableValue *> coupledVectorTagDofValues (const std::string &var_names, const std::string &tag_name) const
 
virtual const VariableValuecoupledMatrixTagValue (const std::string &var_names, TagID tag, unsigned int index=0) const
 
virtual const VariableValuecoupledMatrixTagValue (const std::string &var_names, const std::string &tag_name, unsigned int index=0) const
 
std::vector< const VariableValue *> coupledMatrixTagValues (const std::string &var_names, TagID tag) const
 
std::vector< const VariableValue *> coupledMatrixTagValues (const std::string &var_names, const std::string &tag_name) const
 
virtual const VectorVariableValuecoupledVectorValue (const std::string &var_name, unsigned int comp=0) const
 
virtual const ArrayVariableValuecoupledArrayValue (const std::string &var_name, unsigned int comp=0) const
 
std::vector< const ArrayVariableValue *> coupledArrayValues (const std::string &var_name) const
 
MooseWritableVariablewritableVariable (const std::string &var_name, unsigned int comp=0)
 
virtual VariableValuewritableCoupledValue (const std::string &var_name, unsigned int comp=0)
 
void checkWritableVar (MooseWritableVariable *var)
 
virtual const VariableValuecoupledValueOld (const std::string &var_name, unsigned int comp=0) const
 
std::vector< const VariableValue *> coupledValuesOld (const std::string &var_name) const
 
std::vector< const VectorVariableValue *> coupledVectorValuesOld (const std::string &var_name) const
 
virtual const VariableValuecoupledValueOlder (const std::string &var_name, unsigned int comp=0) const
 
std::vector< const VariableValue *> coupledValuesOlder (const std::string &var_name) const
 
virtual const VariableValuecoupledValuePreviousNL (const std::string &var_name, unsigned int comp=0) const
 
virtual const VectorVariableValuecoupledVectorValueOld (const std::string &var_name, unsigned int comp=0) const
 
virtual const VectorVariableValuecoupledVectorValueOlder (const std::string &var_name, unsigned int comp=0) const
 
virtual const ArrayVariableValuecoupledArrayValueOld (const std::string &var_name, unsigned int comp=0) const
 
virtual const ArrayVariableValuecoupledArrayValueOlder (const std::string &var_name, unsigned int comp=0) const
 
virtual const VariableGradientcoupledGradient (const std::string &var_name, unsigned int comp=0) const
 
std::vector< const VariableGradient *> coupledGradients (const std::string &var_name) const
 
const ADVariableGradientadCoupledGradient (const std::string &var_name, unsigned int comp=0) const
 
const ADVariableGradientadCoupledGradientDot (const std::string &var_name, unsigned int comp=0) const
 
std::vector< const ADVariableGradient *> adCoupledGradients (const std::string &var_name) const
 
const GenericVariableGradient< is_ad > & coupledGenericGradient (const std::string &var_name, unsigned int comp=0) const
 
const GenericVariableGradient< false > & coupledGenericGradient (const std::string &var_name, unsigned int comp) const
 
const GenericVariableGradient< true > & coupledGenericGradient (const std::string &var_name, unsigned int comp) const
 
std::vector< const GenericVariableGradient< is_ad > *> coupledGenericGradients (const std::string &var_name) const
 
std::vector< const GenericVariableGradient< false > *> coupledGenericGradients (const std::string &var_name) const
 
std::vector< const GenericVariableGradient< true > *> coupledGenericGradients (const std::string &var_name) const
 
const ADVectorVariableGradientadCoupledVectorGradient (const std::string &var_name, unsigned int comp=0) const
 
const ADVariableSecondadCoupledSecond (const std::string &var_name, unsigned int comp=0) const
 
const ADVectorVariableSecondadCoupledVectorSecond (const std::string &var_name, unsigned int comp=0) const
 
virtual const VariableGradientcoupledGradientOld (const std::string &var_name, unsigned int comp=0) const
 
std::vector< const VariableGradient *> coupledGradientsOld (const std::string &var_name) const
 
virtual const VariableGradientcoupledGradientOlder (const std::string &var_name, unsigned int comp=0) const
 
virtual const VariableGradientcoupledGradientPreviousNL (const std::string &var_name, unsigned int comp=0) const
 
virtual const VariableGradientcoupledGradientDot (const std::string &var_name, unsigned int comp=0) const
 
virtual const VariableGradientcoupledGradientDotDot (const std::string &var_name, unsigned int comp=0) const
 
virtual const VectorVariableGradientcoupledVectorGradient (const std::string &var_name, unsigned int comp=0) const
 
virtual const VectorVariableGradientcoupledVectorGradientOld (const std::string &var_name, unsigned int comp=0) const
 
virtual const VectorVariableGradientcoupledVectorGradientOlder (const std::string &var_name, unsigned int comp=0) const
 
virtual const ArrayVariableGradientcoupledArrayGradient (const std::string &var_name, unsigned int comp=0) const
 
virtual const ArrayVariableGradientcoupledArrayGradientOld (const std::string &var_name, unsigned int comp=0) const
 
virtual const ArrayVariableGradientcoupledArrayGradientOlder (const std::string &var_name, unsigned int comp=0) const
 
virtual const ArrayVariableGradientcoupledArrayGradientDot (const std::string &var_name, unsigned int comp=0) const
 
virtual const VectorVariableCurlcoupledCurl (const std::string &var_name, unsigned int comp=0) const
 
virtual const VectorVariableCurlcoupledCurlOld (const std::string &var_name, unsigned int comp=0) const
 
virtual const VectorVariableCurlcoupledCurlOlder (const std::string &var_name, unsigned int comp=0) const
 
const ADVectorVariableCurladCoupledCurl (const std::string &var_name, unsigned int comp=0) const
 
virtual const VectorVariableDivergencecoupledDiv (const std::string &var_name, unsigned int comp=0) const
 
virtual const VectorVariableDivergencecoupledDivOld (const std::string &var_name, unsigned int comp=0) const
 
virtual const VectorVariableDivergencecoupledDivOlder (const std::string &var_name, unsigned int comp=0) const
 
virtual const VariableSecondcoupledSecond (const std::string &var_name, unsigned int comp=0) const
 
virtual const VariableSecondcoupledSecondOld (const std::string &var_name, unsigned int comp=0) const
 
virtual const VariableSecondcoupledSecondOlder (const std::string &var_name, unsigned int comp=0) const
 
virtual const VariableSecondcoupledSecondPreviousNL (const std::string &var_name, unsigned int comp=0) const
 
virtual const VariableValuecoupledDot (const std::string &var_name, unsigned int comp=0) const
 
std::vector< const VariableValue *> coupledDots (const std::string &var_name) const
 
virtual const VariableValuecoupledDotDot (const std::string &var_name, unsigned int comp=0) const
 
virtual const VariableValuecoupledDotOld (const std::string &var_name, unsigned int comp=0) const
 
virtual const VariableValuecoupledDotDotOld (const std::string &var_name, unsigned int comp=0) const
 
const ADVariableValueadCoupledDot (const std::string &var_name, unsigned int comp=0) const
 
std::vector< const ADVariableValue *> adCoupledDots (const std::string &var_name) const
 
const ADVariableValueadCoupledDotDot (const std::string &var_name, unsigned int comp=0) const
 
const ADVectorVariableValueadCoupledVectorDot (const std::string &var_name, unsigned int comp=0) const
 
virtual const VectorVariableValuecoupledVectorDot (const std::string &var_name, unsigned int comp=0) const
 
virtual const VectorVariableValuecoupledVectorDotDot (const std::string &var_name, unsigned int comp=0) const
 
virtual const VectorVariableValuecoupledVectorDotOld (const std::string &var_name, unsigned int comp=0) const
 
virtual const VectorVariableValuecoupledVectorDotDotOld (const std::string &var_name, unsigned int comp=0) const
 
virtual const VariableValuecoupledVectorDotDu (const std::string &var_name, unsigned int comp=0) const
 
virtual const VariableValuecoupledVectorDotDotDu (const std::string &var_name, unsigned int comp=0) const
 
virtual const ArrayVariableValuecoupledArrayDot (const std::string &var_name, unsigned int comp=0) const
 
virtual const ArrayVariableValuecoupledArrayDotDot (const std::string &var_name, unsigned int comp=0) const
 
virtual const ArrayVariableValuecoupledArrayDotOld (const std::string &var_name, unsigned int comp=0) const
 
virtual const ArrayVariableValuecoupledArrayDotDotOld (const std::string &var_name, unsigned int comp=0) const
 
virtual const VariableValuecoupledDotDu (const std::string &var_name, unsigned int comp=0) const
 
virtual const VariableValuecoupledDotDotDu (const std::string &var_name, unsigned int comp=0) const
 
const VariableValuecoupledArrayDotDu (const std::string &var_name, unsigned int comp=0) const
 
const TcoupledNodalValue (const std::string &var_name, unsigned int comp=0) const
 
const Moose::ADType< T >::typeadCoupledNodalValue (const std::string &var_name, unsigned int comp=0) const
 
const TcoupledNodalValueOld (const std::string &var_name, unsigned int comp=0) const
 
const TcoupledNodalValueOlder (const std::string &var_name, unsigned int comp=0) const
 
const TcoupledNodalValuePreviousNL (const std::string &var_name, unsigned int comp=0) const
 
const TcoupledNodalDot (const std::string &var_name, unsigned int comp=0) const
 
virtual const VariableValuecoupledNodalDotDot (const std::string &var_name, unsigned int comp=0) const
 
virtual const VariableValuecoupledNodalDotOld (const std::string &var_name, unsigned int comp=0) const
 
virtual const VariableValuecoupledNodalDotDotOld (const std::string &var_name, unsigned int comp=0) const
 
virtual const VariableValuecoupledDofValues (const std::string &var_name, unsigned int comp=0) const
 
std::vector< const VariableValue *> coupledAllDofValues (const std::string &var_name) const
 
virtual const VariableValuecoupledDofValuesOld (const std::string &var_name, unsigned int comp=0) const
 
std::vector< const VariableValue *> coupledAllDofValuesOld (const std::string &var_name) const
 
virtual const VariableValuecoupledDofValuesOlder (const std::string &var_name, unsigned int comp=0) const
 
std::vector< const VariableValue *> coupledAllDofValuesOlder (const std::string &var_name) const
 
virtual const ArrayVariableValuecoupledArrayDofValues (const std::string &var_name, unsigned int comp=0) const
 
virtual const ADVariableValueadCoupledDofValues (const std::string &var_name, unsigned int comp=0) const
 
const ADVariableValueadZeroValue () const
 
const ADVariableGradientadZeroGradient () const
 
const ADVariableSecondadZeroSecond () const
 
const GenericVariableValue< is_ad > & genericZeroValue ()
 
const GenericVariableValue< false > & genericZeroValue ()
 
const GenericVariableValue< true > & genericZeroValue ()
 
const GenericVariableGradient< is_ad > & genericZeroGradient ()
 
const GenericVariableGradient< false > & genericZeroGradient ()
 
const GenericVariableGradient< true > & genericZeroGradient ()
 
const GenericVariableSecond< is_ad > & genericZeroSecond ()
 
const GenericVariableSecond< false > & genericZeroSecond ()
 
const GenericVariableSecond< true > & genericZeroSecond ()
 
bool checkVar (const std::string &var_name, unsigned int comp=0, unsigned int comp_bound=0) const
 
const MooseVariableFieldBasegetFEVar (const std::string &var_name, unsigned int comp) const
 
const MooseVariableFieldBasegetFieldVar (const std::string &var_name, unsigned int comp) const
 
MooseVariableFieldBasegetFieldVar (const std::string &var_name, unsigned int comp)
 
std::vector< const MooseVariableFieldBase *> getFieldVars (const std::string &var_name) const
 
const TgetVarHelper (const std::string &var_name, unsigned int comp) const
 
TgetVarHelper (const std::string &var_name, unsigned int comp)
 
std::vector< const T *> getVarsHelper (const std::string &var_name) const
 
MooseVariablegetVar (const std::string &var_name, unsigned int comp)
 
const MooseVariablegetVar (const std::string &var_name, unsigned int comp) const
 
VectorMooseVariablegetVectorVar (const std::string &var_name, unsigned int comp)
 
const VectorMooseVariablegetVectorVar (const std::string &var_name, unsigned int comp) const
 
ArrayMooseVariablegetArrayVar (const std::string &var_name, unsigned int comp)
 
const ArrayMooseVariablegetArrayVar (const std::string &var_name, unsigned int comp) const
 
void validateExecutionerType (const std::string &name, const std::string &fn_name) const
 
std::vector< TcoupledVectorHelper (const std::string &var_name, const Func &func) const
 
virtual void getKokkosMaterialPropertyHook (const std::string &, const unsigned int)
 
void markMatPropRequested (const std::string &)
 
MaterialPropertyName getMaterialPropertyName (const std::string &name) const
 
const GenericMaterialProperty< T, is_ad > * defaultGenericMaterialProperty (const std::string &name)
 
const GenericMaterialProperty< T, is_ad > * defaultGenericMaterialProperty (const std::string &name)
 
const MaterialProperty< T > * defaultMaterialProperty (const std::string &name)
 
const MaterialProperty< T > * defaultMaterialProperty (const std::string &name)
 
const ADMaterialProperty< T > * defaultADMaterialProperty (const std::string &name)
 
const ADMaterialProperty< T > * defaultADMaterialProperty (const std::string &name)
 

Protected Attributes

Real _p_trial
 Trial value of p. More...
 
Real _q_trial
 Trial value of q. More...
 
Real _Epp
 elasticity tensor in p direction More...
 
Real _Eqq
 elasticity tensor in q direction More...
 
Real _dgaE_dpt
 derivative of Variable with respect to trial variable (used in consistent-tangent-operator calculation) More...
 
Real _dgaE_dqt
 derivative of Variable with respect to trial variable (used in consistent-tangent-operator calculation) More...
 
Real _dp_dpt
 derivative of Variable with respect to trial variable (used in consistent-tangent-operator calculation) More...
 
Real _dq_dpt
 derivative of Variable with respect to trial variable (used in consistent-tangent-operator calculation) More...
 
Real _dp_dqt
 derivative of Variable with respect to trial variable (used in consistent-tangent-operator calculation) More...
 
Real _dq_dqt
 derivative of Variable with respect to trial variable (used in consistent-tangent-operator calculation) More...
 
const unsigned _num_sp
 Number of stress parameters. More...
 
const std::vector< Real_definitely_ok_sp
 An admissible value of stress_params at the initial time. More...
 
std::vector< std::vector< Real > > _Eij
 E[i, j] in the system of equations to be solved. More...
 
Real _En
 normalising factor More...
 
std::vector< std::vector< Real > > _Cij
 _Cij[i, j] * _Eij[j, k] = 1 iff j == k More...
 
const unsigned _num_yf
 Number of yield functions. More...
 
const unsigned _num_intnl
 Number of internal parameters. More...
 
const unsigned _max_nr_its
 Maximum number of Newton-Raphson iterations allowed in the return-map process. More...
 
const bool _perform_finite_strain_rotations
 Whether to perform finite-strain rotations. More...
 
const Real _smoothing_tol
 Smoothing tolerance: edges of the yield surface get smoothed by this amount. More...
 
const Real _smoothing_tol2
 Square of the smoothing tolerance. More...
 
const Real _f_tol
 The yield-function tolerance. More...
 
const Real _f_tol2
 Square of the yield-function tolerance. More...
 
const Real _min_step_size
 In order to help the Newton-Raphson procedure, the applied strain increment may be applied in sub-increments of size greater than this value. More...
 
bool _step_one
 handles case of initial_stress that is inadmissible being supplied More...
 
const bool _warn_about_precision_loss
 Output a warning message if precision loss is encountered during the return-map process. More...
 
MaterialProperty< RankTwoTensor > & _plastic_strain
 plastic strain More...
 
const MaterialProperty< RankTwoTensor > & _plastic_strain_old
 Old value of plastic strain. More...
 
MaterialProperty< std::vector< Real > > & _intnl
 internal parameters More...
 
const MaterialProperty< std::vector< Real > > & _intnl_old
 old values of internal parameters More...
 
MaterialProperty< std::vector< Real > > & _yf
 yield functions More...
 
MaterialProperty< Real > & _iter
 Number of Newton-Raphson iterations used in the return-map. More...
 
MaterialProperty< Real > & _max_iter_used
 Maximum number of Newton-Raphson iterations used in the return-map during the course of the entire simulation. More...
 
const MaterialProperty< Real > & _max_iter_used_old
 Old value of maximum number of Newton-Raphson iterations used in the return-map during the course of the entire simulation. More...
 
MaterialProperty< Real > & _linesearch_needed
 Whether a line-search was needed in the latest Newton-Raphson process (1 if true, 0 otherwise) More...
 
const std::string _base_name
 Name used as a prefix for all material properties related to the stress update model. More...
 
 CURR
 
 PREV
 
bool _bnd
 
bool _neighbor
 
const QBase *const & _qrule
 
const MooseArray< Real > & _JxW
 
const SubdomainID_current_subdomain_id
 
const unsigned int_current_side
 
const ConstantTypeEnum _constant_option
 
SubProblem_subproblem
 
FEProblemBase_fe_problem
 
THREAD_ID _tid
 
Assembly_assembly
 
const MooseArray< Real > & _coord
 
const MooseArray< Point > & _normals
 
MooseMesh_mesh
 
const Moose::CoordinateSystemType_coord_sys
 
std::set< std::string > _requested_props
 
std::set< std::string > _supplied_props
 
std::set< unsigned int_supplied_prop_ids
 
std::unordered_set< unsigned int_active_prop_ids
 
const bool _compute
 
std::unordered_map< unsigned int, unsigned int_props_to_min_states
 
std::vector< unsigned int_displacements
 
bool _has_stateful_property
 
bool _overrides_init_stateful_props
 
const FaceInfo_face_info
 
const MaterialPropertyName _declare_suffix
 
const bool & _enabled
 
MooseApp_app
 
Factory_factory
 
ActionFactory_action_factory
 
const std::string & _type
 
const std::string & _name
 
const InputParameters_pars
 
const MaterialData_blk_material_data
 
const ExecFlagEnum_execute_enum
 
const ExecFlagType_current_execute_flag
 
FEProblemBase_sc_fe_problem
 
const THREAD_ID _sc_tid
 
const Real_real_zero
 
const VariableValue_scalar_zero
 
const Point & _point_zero
 
const InputParameters_ti_params
 
FEProblemBase_ti_feproblem
 
bool _is_implicit
 
Real_t
 
const Real_t_old
 
int_t_step
 
Real_dt_old
 
bool _is_transient
 
MooseApp_restartable_app
 
const std::string _restartable_system_name
 
const THREAD_ID _restartable_tid
 
const bool _restartable_read_only
 
FEProblemBase_mci_feproblem
 
GeometricSearchData_geometric_search_data
 
bool _requires_geometric_search
 
const InputParameters_c_parameters
 
const std::string & _c_name
 
const std::string & _c_type
 
FEProblemBase_c_fe_problem
 
const SystemBase *const _c_sys
 
std::unordered_map< std::string, std::vector< MooseVariableFieldBase *> > _coupled_vars
 
std::vector< MooseVariableFieldBase *> _coupled_moose_vars
 
std::vector< MooseVariable *> _coupled_standard_moose_vars
 
std::vector< VectorMooseVariable *> _coupled_vector_moose_vars
 
std::vector< ArrayMooseVariable *> _coupled_array_moose_vars
 
std::vector< MooseVariableField< Real > *> _coupled_fv_moose_vars
 
const std::unordered_map< std::string, std::string > & _new_to_deprecated_coupled_vars
 
bool _c_nodal
 
bool _c_is_implicit
 
const bool _c_allow_element_to_nodal_coupling
 
THREAD_ID _c_tid
 
std::unordered_map< std::string, std::vector< std::unique_ptr< VariableValue > > > _default_value
 
std::unordered_map< std::string, std::unique_ptr< MooseArray< ADReal > > > _ad_default_value
 
std::unordered_map< std::string, std::unique_ptr< VectorVariableValue > > _default_vector_value
 
std::unordered_map< std::string, std::unique_ptr< ArrayVariableValue > > _default_array_value
 
std::unordered_map< std::string, std::unique_ptr< MooseArray< ADRealVectorValue > > > _ad_default_vector_value
 
VariableValue _default_value_zero
 
VariableGradient _default_gradient
 
MooseArray< ADRealVectorValue_ad_default_gradient
 
MooseArray< ADRealTensorValue_ad_default_vector_gradient
 
VariableSecond _default_second
 
MooseArray< ADRealTensorValue_ad_default_second
 
MooseArray< ADRealVectorValue_ad_default_curl
 
const VariableValue_zero
 
const VariablePhiValue_phi_zero
 
const MooseArray< ADReal > & _ad_zero
 
const VariableGradient_grad_zero
 
const MooseArray< ADRealVectorValue > & _ad_grad_zero
 
const VariablePhiGradient_grad_phi_zero
 
const VariableSecond_second_zero
 
const MooseArray< ADRealTensorValue > & _ad_second_zero
 
const VariablePhiSecond_second_phi_zero
 
const VectorVariableValue_vector_zero
 
const VectorVariableCurl_vector_curl_zero
 
VectorVariableValue _default_vector_value_zero
 
VectorVariableGradient _default_vector_gradient
 
VectorVariableCurl _default_vector_curl
 
VectorVariableDivergence _default_div
 
ArrayVariableValue _default_array_value_zero
 
ArrayVariableGradient _default_array_gradient
 
bool _coupleable_neighbor
 
const InputParameters_mi_params
 
const std::string _mi_name
 
const MooseObjectName _mi_moose_object_name
 
FEProblemBase_mi_feproblem
 
SubProblem_mi_subproblem
 
const THREAD_ID _mi_tid
 
const bool _is_kokkos_object
 
const Moose::MaterialDataType _material_data_type
 
MaterialData_material_data
 
bool _stateful_allowed
 
bool _get_material_property_called
 
std::vector< std::unique_ptr< PropertyValue > > _default_properties
 
std::unordered_set< unsigned int_material_property_dependencies
 
const MaterialPropertyName _get_suffix
 
const bool _use_interpolated_state
 
const Parallel::Communicator & _communicator
 

Static Protected Attributes

static constexpr int _num_pq = 2
 Number of variables = 2 = (p, q) More...
 
static constexpr unsigned _tensor_dimensionality = 3
 Internal dimensionality of tensors (currently this is 3 throughout solid mechanics) More...
 
static RankFourTensor _identityTensor
 
static const std::string _interpolated_old
 
static const std::string _interpolated_older
 

Private Attributes

std::vector< RankTwoTensor_dsp_scratch
 d(stress_param[:])/d(stress) used in dstressparam_dstress to avoid repeatedly allocating/deallocating this vector More...
 
std::vector< RankTwoTensor_dsp_trial_scratch
 d(stress_param[:])/d(stress_trial) used in dstressparam_dstress to avoid repeatedly allocating/deallocating this vector More...
 
std::vector< RankFourTensor_d2sp_scratch
 d2(stress_param[:])/d(stress)/d(stress) used in d2stressparam_dstress to avoid repeatedly allocating/deallocating this vector More...
 

Detailed Description

TwoParameterPlasticityStressUpdate performs the return-map algorithm and associated stress updates for plastic models that describe (p, q) plasticity.

That is, for plastic models where the yield function and flow directions only depend on two parameters, p and q, that are themselves functions of stress.

Definition at line 24 of file TwoParameterPlasticityStressUpdate.h.

Member Typedef Documentation

◆ GR2

template<bool is_ad, typename R2 = RankTwoTensor, typename R4 = RankFourTensor>
using StressUpdateBaseTempl< is_ad, R2, R4 >::GR2 = GenericRankTwoTensor<is_ad>
inherited

Definition at line 57 of file StressUpdateBase.h.

◆ GR4

template<bool is_ad, typename R2 = RankTwoTensor, typename R4 = RankFourTensor>
using StressUpdateBaseTempl< is_ad, R2, R4 >::GR4 = GenericRankFourTensor<is_ad>
inherited

Definition at line 59 of file StressUpdateBase.h.

◆ GSR2

template<bool is_ad, typename R2 = RankTwoTensor, typename R4 = RankFourTensor>
using StressUpdateBaseTempl< is_ad, R2, R4 >::GSR2 = Moose::GenericType<R2, is_ad>
inherited

Definition at line 58 of file StressUpdateBase.h.

◆ GSR4

template<bool is_ad, typename R2 = RankTwoTensor, typename R4 = RankFourTensor>
using StressUpdateBaseTempl< is_ad, R2, R4 >::GSR4 = Moose::GenericType<R4, is_ad>
inherited

Definition at line 60 of file StressUpdateBase.h.

Constructor & Destructor Documentation

◆ TwoParameterPlasticityStressUpdate()

TwoParameterPlasticityStressUpdate::TwoParameterPlasticityStressUpdate ( const InputParameters parameters,
unsigned  num_yf,
unsigned  num_intnl 
)

Definition at line 23 of file TwoParameterPlasticityStressUpdate.C.

26  _p_trial(0.0),
27  _q_trial(0.0),
28  _Epp(0.0),
29  _Eqq(0.0),
30  _dgaE_dpt(0.0),
31  _dgaE_dqt(0.0),
32  _dp_dpt(0.0),
33  _dq_dpt(0.0),
34  _dp_dqt(0.0),
35  _dq_dqt(0.0),
39 {
40 }
static constexpr int _num_pq
Number of variables = 2 = (p, q)
MultiParameterPlasticityStressUpdate(const InputParameters &parameters, unsigned num_sp, unsigned num_yf, unsigned num_intnl)
Real _dp_dpt
derivative of Variable with respect to trial variable (used in consistent-tangent-operator calculatio...
Real _dq_dpt
derivative of Variable with respect to trial variable (used in consistent-tangent-operator calculatio...
const InputParameters & parameters() const
Real _dgaE_dqt
derivative of Variable with respect to trial variable (used in consistent-tangent-operator calculatio...
Real _dgaE_dpt
derivative of Variable with respect to trial variable (used in consistent-tangent-operator calculatio...
Real _dq_dqt
derivative of Variable with respect to trial variable (used in consistent-tangent-operator calculatio...
std::vector< RankFourTensor > _d2sp_scratch
d2(stress_param[:])/d(stress)/d(stress) used in d2stressparam_dstress to avoid repeatedly allocating/...
Real _Epp
elasticity tensor in p direction
Real _Eqq
elasticity tensor in q direction
std::vector< RankTwoTensor > _dsp_trial_scratch
d(stress_param[:])/d(stress_trial) used in dstressparam_dstress to avoid repeatedly allocating/deallo...
std::vector< RankTwoTensor > _dsp_scratch
d(stress_param[:])/d(stress) used in dstressparam_dstress to avoid repeatedly allocating/deallocating...
Real _dp_dqt
derivative of Variable with respect to trial variable (used in consistent-tangent-operator calculatio...

Member Function Documentation

◆ calculateNumberSubsteps()

template<bool is_ad, typename R2 = RankTwoTensor, typename R4 = RankFourTensor>
virtual int StressUpdateBaseTempl< is_ad, R2, R4 >::calculateNumberSubsteps ( const GR2 )
inlinevirtualinherited

Given the elastic strain increment compute the number of substeps required to bring a substepped trial stress guess distance from the yield surface into the tolerance specified in the individual child class.

Definition at line 160 of file StressUpdateBase.h.

160 { return 1; }

◆ calculateRes2()

Real MultiParameterPlasticityStressUpdate::calculateRes2 ( const std::vector< Real > &  rhs) const
protectedinherited

Calculates the residual-squared for the Newton-Raphson + line-search.

Parameters
rhs[in]The RHS vector
Returns
sum_i (rhs[i] * rhs[i])

Definition at line 829 of file MultiParameterPlasticityStressUpdate.C.

Referenced by MultiParameterPlasticityStressUpdate::lineSearch(), and MultiParameterPlasticityStressUpdate::updateState().

830 {
831  Real res2 = 0.0;
832  for (const auto & r : rhs)
833  res2 += r * r;
834  return res2;
835 }
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real

◆ calculateRHS()

void MultiParameterPlasticityStressUpdate::calculateRHS ( const std::vector< Real > &  trial_stress_params,
const std::vector< Real > &  stress_params,
Real  gaE,
const yieldAndFlow smoothed_q,
std::vector< Real > &  rhs 
) const
protectedinherited

Calculates the RHS in the following 0 = rhs[0] = S[0] - S[0]^trial + ga * E[0, j] * dg/dS[j] 0 = rhs[1] = S[1] - S[1]^trial + ga * E[1, j] * dg/dS[j] ...

0 = rhs[N-1] = S[N-1] - S[N-1]^trial + ga * E[N-1, j] * dg/dS[j] 0 = rhs[N] = f(S, intnl) where N = _num_sp

Parameters
trial_stress_params[in]The trial stress parameters for this (sub)strain increment, S[:]^trial
stress_params[in]The current stress parameters, S[:]
gaE[in]ga*_En (the normalisation with _En is so that gaE is of similar magnitude to S)
smoothed_q[in]Holds the current value of yield function and derivatives evaluated at the current stress parameters and the current internal parameters
rhs[out]The result

Definition at line 838 of file MultiParameterPlasticityStressUpdate.C.

Referenced by MultiParameterPlasticityStressUpdate::lineSearch(), and MultiParameterPlasticityStressUpdate::updateState().

843 {
844  const Real ga = gaE / _En;
845  for (unsigned i = 0; i < _num_sp; ++i)
846  {
847  rhs[i] = stress_params[i] - trial_stress_params[i];
848  for (unsigned j = 0; j < _num_sp; ++j)
849  rhs[i] += ga * _Eij[i][j] * smoothed_q.dg[j];
850  }
851  rhs[_num_sp] = smoothed_q.f;
852 }
std::vector< std::vector< Real > > _Eij
E[i, j] in the system of equations to be solved.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
static const std::complex< double > j(0, 1)
Complex number "j" (also known as "i")
const unsigned _num_sp
Number of stress parameters.

◆ computeAllQ()

virtual void TwoParameterPlasticityStressUpdate::computeAllQ ( Real  p,
Real  q,
const std::vector< Real > &  intnl,
std::vector< yieldAndFlow > &  all_q 
) const
protectedpure virtual

Completely fills all_q with correct values.

These values are: (1) the yield function values, yf[i] (2) d(yf[i])/d(p, q) (3) d(yf[i])/d(intnl[j]) (4) d(flowPotential[i])/d(p, q) (5) d2(flowPotential[i])/d(p, q)/d(p, q) (6) d2(flowPotential[i])/d(p, q)/d(intnl[j])

Parameters
pp stress
qq stress
intnlThe internal parameters
[out]all_qAll the desired quantities

Implemented in CappedDruckerPragerStressUpdate, and CappedWeakPlaneStressUpdate.

Referenced by computeAllQV().

◆ computeAllQV()

void TwoParameterPlasticityStressUpdate::computeAllQV ( const std::vector< Real > &  stress_params,
const std::vector< Real > &  intnl,
std::vector< yieldAndFlow > &  all_q 
) const
overrideprotectedvirtual

Completely fills all_q with correct values.

These values are: (1) the yield function values, yf[i] (2) d(yf[i])/d(stress_params[j]) (3) d(yf[i])/d(intnl[j]) (4) d(flowPotential[i])/d(stress_params[j]) (5) d2(flowPotential[i])/d(stress_params[j])/d(stress_params[k]) (6) d2(flowPotential[i])/d(stress_params[j])/d(intnl[k])

Parameters
stress_params[in]The stress parameters
intnl[in]The internal parameters
[out]all_qAll the desired quantities

Implements MultiParameterPlasticityStressUpdate.

Definition at line 104 of file TwoParameterPlasticityStressUpdate.C.

107 {
108  const Real p = stress_params[0];
109  const Real q = stress_params[1];
110  computeAllQ(p, q, intnl, all_q);
111 }
virtual void computeAllQ(Real p, Real q, const std::vector< Real > &intnl, std::vector< yieldAndFlow > &all_q) const =0
Completely fills all_q with correct values.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const Real p

◆ computePQ()

virtual void TwoParameterPlasticityStressUpdate::computePQ ( const RankTwoTensor stress,
Real p,
Real q 
) const
protectedpure virtual

Computes p and q, given stress.

Derived classes must override this

Parameters
stressStress tensor
pp stress
qq q stress

Implemented in CappedDruckerPragerStressUpdate, CappedWeakPlaneStressUpdate, and CappedWeakInclinedPlaneStressUpdate.

Referenced by computeStressParams().

◆ computeStrainEnergyRateDensity()

template<bool is_ad, typename R2 = RankTwoTensor, typename R4 = RankFourTensor>
virtual Real StressUpdateBaseTempl< is_ad, R2, R4 >::computeStrainEnergyRateDensity ( const GenericMaterialProperty< RankTwoTensor, is_ad > &  ,
const GenericMaterialProperty< RankTwoTensor, is_ad > &   
)
inlinevirtualinherited

Compute the strain energy rate density for this inelastic model for the current step.

Parameters
stressThe stress tensor at the end of the step
strain_rateThe strain rate at the end of the step
Returns
The computed strain energy rate density

Reimplemented in CompositePowerLawCreepStressUpdateTempl< is_ad >, and PowerLawCreepStressUpdateTempl< is_ad >.

Definition at line 180 of file StressUpdateBase.h.

183  {
184  mooseError(
185  "The computation of strain energy rate density needs to be implemented by a child class");
186  return 0.0;
187  }
void mooseError(Args &&... args) const

◆ computeStressParams()

void TwoParameterPlasticityStressUpdate::computeStressParams ( const RankTwoTensor stress,
std::vector< Real > &  stress_params 
) const
overrideprotectedvirtual

Computes stress_params, given stress.

Derived classes must override this

Parameters
stress[in]Stress tensor
stress_params[out]The compute stress_params

Implements MultiParameterPlasticityStressUpdate.

Definition at line 157 of file TwoParameterPlasticityStressUpdate.C.

159 {
160  Real p;
161  Real q;
162  computePQ(stress, p, q);
163  stress_params[0] = p;
164  stress_params[1] = q;
165 }
virtual void computePQ(const RankTwoTensor &stress, Real &p, Real &q) const =0
Computes p and q, given stress.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const Real p

◆ computeTimeStepLimit()

template<bool is_ad, typename R2 , typename R4 >
Real StressUpdateBaseTempl< is_ad, R2, R4 >::computeTimeStepLimit ( )
virtualinherited

◆ consistentTangentOperator()

void TwoParameterPlasticityStressUpdate::consistentTangentOperator ( const RankTwoTensor stress_trial,
Real  p_trial,
Real  q_trial,
const RankTwoTensor stress,
Real  p,
Real  q,
Real  gaE,
const yieldAndFlow smoothed_q,
const RankFourTensor Eijkl,
bool  compute_full_tangent_operator,
RankFourTensor cto 
) const
protectedvirtual

Calculates the consistent tangent operator.

Derived classes may choose to override this for computational efficiency. The implementation in this class is quite expensive, even though it looks compact and clean, because of all the manipulations of RankFourTensors involved.

Parameters
stress_trialthe trial value of the stress tensor for this strain increment
p_trialthe trial value of p for this strain increment
q_trialthe trial value of q for this strain increment
stressthe returned value of the stress tensor for this strain increment
pthe returned value of p for this strain increment
qthe returned value of q for this strain increment
gaEthe total value of that came from this strain increment
smoothed_qcontains the yield function and derivatives evaluated at (p, q)
EijklThe elasticity tensor
compute_full_tangent_operatortrue if the full consistent tangent operator is needed, otherwise false
[out]ctoThe consistent tangent operator

Reimplemented in CappedDruckerPragerStressUpdate, CappedWeakPlaneStressUpdate, CappedWeakInclinedPlaneStressUpdate, CappedDruckerPragerCosseratStressUpdate, CappedWeakPlaneCosseratStressUpdate, and CappedWeakPlaneStressUpdate_PartiallyImplemented.

Definition at line 204 of file TwoParameterPlasticityStressUpdate.C.

Referenced by CappedWeakPlaneStressUpdate_PartiallyImplemented::consistentTangentOperator(), CappedWeakInclinedPlaneStressUpdate::consistentTangentOperator(), and consistentTangentOperatorV().

216 {
217  cto = elasticity_tensor;
218  if (!compute_full_tangent_operator)
219  return;
220 
223 
224  const RankTwoTensor s1 = elasticity_tensor * ((1.0 / _Epp) * (1.0 - _dp_dpt) * _dsp_scratch[0] +
225  (1.0 / _Eqq) * (-_dq_dpt) * _dsp_scratch[1]);
226  const RankTwoTensor s2 = elasticity_tensor * ((1.0 / _Epp) * (-_dp_dqt) * _dsp_scratch[0] +
227  (1.0 / _Eqq) * (1.0 - _dq_dqt) * _dsp_scratch[1]);
230 
231  for (unsigned i = 0; i < _tensor_dimensionality; ++i)
232  for (unsigned j = 0; j < _tensor_dimensionality; ++j)
233  for (unsigned k = 0; k < _tensor_dimensionality; ++k)
234  for (unsigned l = 0; l < _tensor_dimensionality; ++l)
235  cto(i, j, k, l) -= s1(i, j) * t1(k, l) + s2(i, j) * t2(k, l);
236 
238 
239  const RankFourTensor Tijab =
240  elasticity_tensor * (gaE / _Epp) *
241  (smoothed_q.dg[0] * _d2sp_scratch[0] + smoothed_q.dg[1] * _d2sp_scratch[1]);
242 
244  try
245  {
246  inv = inv.transposeMajor().invSymm();
247  }
248  catch (const MooseException & e)
249  {
250  // Cannot form the inverse, so probably at some degenerate place in stress space.
251  // Just return with the "best estimate" of the cto.
252  mooseWarning("TwoParameterPlasticityStressUpdate: Cannot invert 1+T in consistent tangent "
253  "operator computation at quadpoint ",
254  _qp,
255  " of element ",
256  _current_elem->id());
257  return;
258  }
259 
260  cto = (cto.transposeMajor() * inv).transposeMajor();
261 }
virtual void d2stressparam_dstress(const RankTwoTensor &stress, std::vector< RankFourTensor > &d2sp) const override
d2(stress_param[i])/d(stress)/d(stress) at given stress.
Real _dp_dpt
derivative of Variable with respect to trial variable (used in consistent-tangent-operator calculatio...
Real _dq_dpt
derivative of Variable with respect to trial variable (used in consistent-tangent-operator calculatio...
Real elasticity_tensor(unsigned int i, unsigned int j, unsigned int k, unsigned int l)
unsigned int _qp
Real _dq_dqt
derivative of Variable with respect to trial variable (used in consistent-tangent-operator calculatio...
std::vector< RankFourTensor > _d2sp_scratch
d2(stress_param[:])/d(stress)/d(stress) used in d2stressparam_dstress to avoid repeatedly allocating/...
RankFourTensorTempl< T > transposeMajor() const
Real _Epp
elasticity tensor in p direction
virtual void dstressparam_dstress(const RankTwoTensor &stress, std::vector< RankTwoTensor > &dsp) const override
d(stress_param[i])/d(stress) at given stress.
Real _Eqq
elasticity tensor in q direction
void mooseWarning(Args &&... args) const
static const std::complex< double > j(0, 1)
Complex number "j" (also known as "i")
std::vector< RankTwoTensor > _dsp_trial_scratch
d(stress_param[:])/d(stress_trial) used in dstressparam_dstress to avoid repeatedly allocating/deallo...
std::vector< RankTwoTensor > _dsp_scratch
d(stress_param[:])/d(stress) used in dstressparam_dstress to avoid repeatedly allocating/deallocating...
Real _dp_dqt
derivative of Variable with respect to trial variable (used in consistent-tangent-operator calculatio...
RankFourTensorTempl< T > invSymm() const
static constexpr unsigned _tensor_dimensionality
Internal dimensionality of tensors (currently this is 3 throughout solid mechanics) ...
static const std::string k
Definition: NS.h:134
const Elem *const & _current_elem

◆ consistentTangentOperatorV()

void TwoParameterPlasticityStressUpdate::consistentTangentOperatorV ( const RankTwoTensor stress_trial,
const std::vector< Real > &  trial_stress_params,
const RankTwoTensor stress,
const std::vector< Real > &  stress_params,
Real  gaE,
const yieldAndFlow smoothed_q,
const RankFourTensor Eijkl,
bool  compute_full_tangent_operator,
const std::vector< std::vector< Real >> &  dvar_dtrial,
RankFourTensor cto 
)
overrideprotectedvirtual

Calculates the consistent tangent operator.

Derived classes may choose to override this for computational efficiency. The implementation in this class is quite expensive, even though it looks compact and clean, because of all the manipulations of RankFourTensors involved.

Parameters
stress_trial[in]the trial value of the stress tensor for this strain increment
trial_stress_params[in]the trial values of the stress_params for this strain increment
stress[in]the returned value of the stress tensor for this strain increment
stress_params[in]the returned value of the stress_params for this strain increment
gaE[in]the total value of that came from this strain increment
smoothed_q[in]contains the yield function and derivatives evaluated at (p, q)
Eijkl[in]The elasticity tensor
compute_full_tangent_operator[in]true if the full consistent tangent operator is needed, otherwise false
dvar_dtrial[in]dvar_dtrial[i][j] = d({stress_param[i],gaE})/d(trial_stress_param[j]) for this strain increment
[out]ctoThe consistent tangent operator

Reimplemented from MultiParameterPlasticityStressUpdate.

Definition at line 168 of file TwoParameterPlasticityStressUpdate.C.

179 {
180  const Real p_trial = trial_stress_params[0];
181  const Real q_trial = trial_stress_params[1];
182  const Real p = stress_params[0];
183  const Real q = stress_params[1];
184  _dp_dpt = dvar_dtrial[0][0];
185  _dp_dqt = dvar_dtrial[0][1];
186  _dq_dpt = dvar_dtrial[1][0];
187  _dq_dqt = dvar_dtrial[1][1];
188  _dgaE_dpt = dvar_dtrial[2][0];
189  _dgaE_dqt = dvar_dtrial[2][1];
190  consistentTangentOperator(stress_trial,
191  p_trial,
192  q_trial,
193  stress,
194  p,
195  q,
196  gaE,
197  smoothed_q,
198  Eijkl,
199  compute_full_tangent_operator,
200  cto);
201 }
Real _dp_dpt
derivative of Variable with respect to trial variable (used in consistent-tangent-operator calculatio...
Real _dq_dpt
derivative of Variable with respect to trial variable (used in consistent-tangent-operator calculatio...
virtual void consistentTangentOperator(const RankTwoTensor &stress_trial, Real p_trial, Real q_trial, const RankTwoTensor &stress, Real p, Real q, Real gaE, const yieldAndFlow &smoothed_q, const RankFourTensor &Eijkl, bool compute_full_tangent_operator, RankFourTensor &cto) const
Calculates the consistent tangent operator.
Real _dgaE_dqt
derivative of Variable with respect to trial variable (used in consistent-tangent-operator calculatio...
Real _dgaE_dpt
derivative of Variable with respect to trial variable (used in consistent-tangent-operator calculatio...
Real _dq_dqt
derivative of Variable with respect to trial variable (used in consistent-tangent-operator calculatio...
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const Real p
Real _dp_dqt
derivative of Variable with respect to trial variable (used in consistent-tangent-operator calculatio...

◆ d2pdstress2()

virtual RankFourTensor TwoParameterPlasticityStressUpdate::d2pdstress2 ( const RankTwoTensor stress) const
protectedpure virtual

d2(p)/d(stress)/d(stress) Derived classes must override this

Parameters
stressstress tensor
Returns
d2(p)/d(stress)/d(stress)

Implemented in CappedDruckerPragerStressUpdate, and CappedWeakPlaneStressUpdate.

Referenced by d2stressparam_dstress().

◆ d2qdstress2()

virtual RankFourTensor TwoParameterPlasticityStressUpdate::d2qdstress2 ( const RankTwoTensor stress) const
protectedpure virtual

d2(q)/d(stress)/d(stress) Derived classes must override this

Parameters
stressstress tensor
Returns
d2(q)/d(stress)/d(stress)

Implemented in CappedDruckerPragerStressUpdate, CappedWeakPlaneStressUpdate, CappedWeakInclinedPlaneStressUpdate, and CappedWeakPlaneCosseratStressUpdate.

Referenced by d2stressparam_dstress().

◆ d2stressparam_dstress()

void TwoParameterPlasticityStressUpdate::d2stressparam_dstress ( const RankTwoTensor stress,
std::vector< RankFourTensor > &  d2sp 
) const
overrideprotectedvirtual

d2(stress_param[i])/d(stress)/d(stress) at given stress.

When overriding, ensure to assert that d2sp has size _num_sp

Parameters
stress[in]stress tensor
d2sp[out]d2(stress_param[:])/d(stress)/d(stress)

Implements MultiParameterPlasticityStressUpdate.

Definition at line 302 of file TwoParameterPlasticityStressUpdate.C.

Referenced by consistentTangentOperator().

304 {
305  // _num_pq = _num_sp
306  mooseAssert(
307  d2sp.size() == _num_pq,
308  "TwoParameterPlasticityStressUpdate: d2sp incorrectly sized in d2stressparam_dstress");
309  d2sp[0] = d2pdstress2(stress);
310  d2sp[1] = d2qdstress2(stress);
311 }
virtual RankFourTensor d2pdstress2(const RankTwoTensor &stress) const =0
d2(p)/d(stress)/d(stress) Derived classes must override this
static constexpr int _num_pq
Number of variables = 2 = (p, q)
virtual RankFourTensor d2qdstress2(const RankTwoTensor &stress) const =0
d2(q)/d(stress)/d(stress) Derived classes must override this

◆ dnRHSdVar()

void MultiParameterPlasticityStressUpdate::dnRHSdVar ( const yieldAndFlow smoothed_q,
const std::vector< std::vector< Real >> &  dintnl,
const std::vector< Real > &  stress_params,
Real  gaE,
std::vector< double > &  jac 
) const
protectedinherited

Derivative of -RHS with respect to the stress_params and gaE, placed into an array ready for solving the linear system using LAPACK gsev.

Parameters
smoothed_q[in]Holds the current value of yield function and derivatives evaluated at the current values of the stress_params and the internal parameters
dintnl[in]The derivatives of the internal parameters wrt the stress_params
stress_params[in]The current value of the stress_params during the Newton-Raphson process
gaE[in]The current value of gaE
jac[out]The outputted derivatives

Definition at line 855 of file MultiParameterPlasticityStressUpdate.C.

Referenced by MultiParameterPlasticityStressUpdate::dVardTrial(), and MultiParameterPlasticityStressUpdate::nrStep().

860 {
861  for (auto & jac_entry : jac)
862  jac_entry = 0.0;
863 
864  const Real ga = gaE / _En;
865 
866  unsigned ind = 0;
867  for (unsigned var = 0; var < _num_sp; ++var)
868  {
869  for (unsigned rhs = 0; rhs < _num_sp; ++rhs)
870  {
871  if (var == rhs)
872  jac[ind] -= 1.0;
873  for (unsigned j = 0; j < _num_sp; ++j)
874  {
875  jac[ind] -= ga * _Eij[rhs][j] * smoothed_q.d2g[j][var];
876  for (unsigned k = 0; k < _num_intnl; ++k)
877  jac[ind] -= ga * _Eij[rhs][j] * smoothed_q.d2g_di[j][k] * dintnl[k][var];
878  }
879  ind++;
880  }
881  // now rhs = _num_sp (that is, the yield function)
882  jac[ind] -= smoothed_q.df[var];
883  for (unsigned k = 0; k < _num_intnl; ++k)
884  jac[ind] -= smoothed_q.df_di[k] * dintnl[k][var];
885  ind++;
886  }
887 
888  // now var = _num_sp (that is, gaE)
889  for (unsigned rhs = 0; rhs < _num_sp; ++rhs)
890  {
891  for (unsigned j = 0; j < _num_sp; ++j)
892  jac[ind] -= (1.0 / _En) * _Eij[rhs][j] * smoothed_q.dg[j];
893  ind++;
894  }
895  // now rhs = _num_sp (that is, the yield function)
896  jac[ind] = 0.0;
897 }
const unsigned _num_intnl
Number of internal parameters.
std::vector< std::vector< Real > > _Eij
E[i, j] in the system of equations to be solved.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
static const std::complex< double > j(0, 1)
Complex number "j" (also known as "i")
static const std::string k
Definition: NS.h:134
const unsigned _num_sp
Number of stress parameters.

◆ dpdstress()

virtual RankTwoTensor TwoParameterPlasticityStressUpdate::dpdstress ( const RankTwoTensor stress) const
protectedpure virtual

d(p)/d(stress) Derived classes must override this

Parameters
stressstress tensor
Returns
d(p)/d(stress)

Implemented in CappedDruckerPragerStressUpdate, CappedWeakPlaneStressUpdate, and CappedWeakInclinedPlaneStressUpdate.

Referenced by dstressparam_dstress(), and setInelasticStrainIncrementAfterReturn().

◆ dqdstress()

virtual RankTwoTensor TwoParameterPlasticityStressUpdate::dqdstress ( const RankTwoTensor stress) const
protectedpure virtual

d(q)/d(stress) Derived classes must override this

Parameters
stressstress tensor
Returns
d(q)/d(stress)

Implemented in CappedDruckerPragerStressUpdate, CappedWeakPlaneStressUpdate, CappedWeakInclinedPlaneStressUpdate, and CappedWeakPlaneCosseratStressUpdate.

Referenced by dstressparam_dstress(), and setInelasticStrainIncrementAfterReturn().

◆ dsmoother()

Real MultiParameterPlasticityStressUpdate::dsmoother ( Real  f_diff) const
protectedinherited

Derivative of smoother.

Definition at line 549 of file MultiParameterPlasticityStressUpdate.C.

Referenced by MultiParameterPlasticityStressUpdate::smoothAllQuantities().

550 {
551  if (std::abs(f_diff) >= _smoothing_tol)
552  return 0.0;
553  switch (_smoother_function_type)
554  {
556  return 0.25 * M_PI / _smoothing_tol * std::cos(f_diff * M_PI * 0.5 / _smoothing_tol);
558  return 0.75 / _smoothing_tol * (1.0 - Utility::pow<2>(f_diff / _smoothing_tol));
560  return 0.625 / _smoothing_tol * (1.0 - Utility::pow<4>(f_diff / _smoothing_tol));
562  return (7.0 / 12.0 / _smoothing_tol) * (1.0 - Utility::pow<6>(f_diff / _smoothing_tol));
563  default:
564  return 0.0;
565  }
566 }
enum MultiParameterPlasticityStressUpdate::SmootherFunctionType _smoother_function_type
const Real _smoothing_tol
Smoothing tolerance: edges of the yield surface get smoothed by this amount.

◆ dstressparam_dstress()

void TwoParameterPlasticityStressUpdate::dstressparam_dstress ( const RankTwoTensor stress,
std::vector< RankTwoTensor > &  dsp 
) const
overrideprotectedvirtual

d(stress_param[i])/d(stress) at given stress.

When overriding, ensure to assert that dsp has size _num_sp

Parameters
stress[in]stress tensor
dsp[out]d(stress_param[:])/d(stress)

Implements MultiParameterPlasticityStressUpdate.

Definition at line 291 of file TwoParameterPlasticityStressUpdate.C.

Referenced by consistentTangentOperator().

293 {
294  // _num_pq = _num_sp
295  mooseAssert(dsp.size() == _num_pq,
296  "TwoParameterPlasticityStressUpdate: dsp incorrectly sized in dstressparam_dstress");
297  dsp[0] = dpdstress(stress);
298  dsp[1] = dqdstress(stress);
299 }
static constexpr int _num_pq
Number of variables = 2 = (p, q)
virtual RankTwoTensor dqdstress(const RankTwoTensor &stress) const =0
d(q)/d(stress) Derived classes must override this
virtual RankTwoTensor dpdstress(const RankTwoTensor &stress) const =0
d(p)/d(stress) Derived classes must override this

◆ dVardTrial()

void MultiParameterPlasticityStressUpdate::dVardTrial ( bool  elastic_only,
const std::vector< Real > &  trial_stress_params,
const std::vector< Real > &  stress_params,
Real  gaE,
const std::vector< Real > &  intnl,
const yieldAndFlow smoothed_q,
Real  step_size,
bool  compute_full_tangent_operator,
std::vector< std::vector< Real >> &  dvar_dtrial 
) const
protectedinherited

Calculates derivatives of the stress_params and gaE with repect to the trial values of the stress_params for the (sub)strain increment.

After the strain increment has been fully applied, dvar_dtrial will contain the result appropriate to the full strain increment. Before that time (if applying in sub-strain increments) it will contain the result appropriate to the amount of strain increment applied successfully.

Parameters
elastic_only[in]whether this was an elastic step: if so then the updates to dvar_dtrial are fairly trivial
trial_stress_params[in]Trial values of stress_params for this (sub)strain increment
stress_params[in]Returned values of stress_params for this (sub)strain increment
gaE[in]the value of gaE that came from this (sub)strain increment
intnl[in]the value of the internal parameters at the returned position
smoothed_q[in]contains the yield function and derivatives evaluated at (stress_params, intnl)
step_size[in]size of this (sub)strain increment
compute_full_tangent_operator[in]true if the full consistent tangent operator is needed, otherwise false
dvar_dtrial[out]dvar_dtrial[i][j] = d({stress_param[i],gaE})/d(trial_stress_param[j])

Definition at line 900 of file MultiParameterPlasticityStressUpdate.C.

Referenced by MultiParameterPlasticityStressUpdate::updateState().

909 {
911  return;
912 
913  if (!compute_full_tangent_operator)
914  return;
915 
916  if (elastic_only)
917  {
918  // no change to gaE, and all off-diag stuff remains unchanged from previous step
919  for (unsigned v = 0; v < _num_sp; ++v)
920  dvar_dtrial[v][v] += step_size;
921  return;
922  }
923 
924  const Real ga = gaE / _En;
925 
926  // the following uses heap allocations in the belief that the compute time spent on alloc/dealloc
927  // will be dwarfed by other aspects of implicit time stepping
928 
929  std::vector<std::vector<Real>> dintnl(_num_intnl, std::vector<Real>(_num_sp));
930  setIntnlDerivativesV(trial_stress_params, stress_params, intnl, dintnl);
931 
932  // rhs is described elsewhere, the following are changes in rhs wrt the trial_stress_param
933  // values
934  // In the following we use d(intnl)/d(trial variable) = - d(intnl)/d(variable)
935  std::vector<Real> rhs_cto((_num_sp + 1) * _num_sp);
936 
937  unsigned ind = 0;
938  for (unsigned a = 0; a < _num_sp; ++a)
939  {
940  // change in RHS[b] wrt changes in stress_param_trial[a]
941  for (unsigned b = 0; b < _num_sp; ++b)
942  {
943  if (a == b)
944  rhs_cto[ind] -= 1.0;
945  for (unsigned j = 0; j < _num_sp; ++j)
946  for (unsigned k = 0; k < _num_intnl; ++k)
947  rhs_cto[ind] -= ga * _Eij[b][j] * smoothed_q.d2g_di[j][k] * dintnl[k][a];
948  ind++;
949  }
950  // now b = _num_sp (that is, the yield function)
951  for (unsigned k = 0; k < _num_intnl; ++k)
952  rhs_cto[ind] -= smoothed_q.df_di[k] * dintnl[k][a];
953  ind++;
954  }
955 
956  // jac = d(-rhs)/d(var)
957  std::vector<double> jac((_num_sp + 1) * (_num_sp + 1));
958  dnRHSdVar(smoothed_q, dintnl, stress_params, gaE, jac);
959 
960  std::vector<PetscBLASInt> ipiv(_num_sp + 1);
961  PetscBLASInt info;
962  const PetscBLASInt gesv_num_rhs = _num_sp + 1;
963  const PetscBLASInt gesv_num_pq = _num_sp;
964  LAPACKgesv_(&gesv_num_rhs,
965  &gesv_num_pq,
966  &jac[0],
967  &gesv_num_rhs,
968  &ipiv[0],
969  &rhs_cto[0],
970  &gesv_num_rhs,
971  &info);
972  if (info != 0)
973  errorHandler("MultiParameterPlasticityStressUpdate: PETSC LAPACK gsev routine returned with "
974  "error code " +
976 
977  ind = 0;
978  std::vector<std::vector<Real>> dvarn_dtrialn(_num_sp + 1, std::vector<Real>(_num_sp, 0.0));
979  for (unsigned spt = 0; spt < _num_sp; ++spt) // loop over trial stress-param variables
980  {
981  for (unsigned v = 0; v < _num_sp; ++v) // loop over variables in NR procedure
982  {
983  dvarn_dtrialn[v][spt] = rhs_cto[ind];
984  ind++;
985  }
986  // the final NR variable is gaE
987  dvarn_dtrialn[_num_sp][spt] = rhs_cto[ind];
988  ind++;
989  }
990 
991  const std::vector<std::vector<Real>> dvar_dtrial_old = dvar_dtrial;
992 
993  for (unsigned v = 0; v < _num_sp; ++v) // loop over variables in NR procedure
994  {
995  for (unsigned spt = 0; spt < _num_sp; ++spt) // loop over trial stress-param variables
996  {
997  dvar_dtrial[v][spt] = step_size * dvarn_dtrialn[v][spt];
998  for (unsigned a = 0; a < _num_sp; ++a)
999  dvar_dtrial[v][spt] += dvarn_dtrialn[v][a] * dvar_dtrial_old[a][spt];
1000  }
1001  }
1002  // for gaE the formulae are a little different
1003  const unsigned v = _num_sp;
1004  for (unsigned spt = 0; spt < _num_sp; ++spt)
1005  {
1006  dvar_dtrial[v][spt] += step_size * dvarn_dtrialn[v][spt]; // note +=
1007  for (unsigned a = 0; a < _num_sp; ++a)
1008  dvar_dtrial[v][spt] += dvarn_dtrialn[v][a] * dvar_dtrial_old[a][spt];
1009  }
1010 }
FEProblemBase & _fe_problem
void dnRHSdVar(const yieldAndFlow &smoothed_q, const std::vector< std::vector< Real >> &dintnl, const std::vector< Real > &stress_params, Real gaE, std::vector< double > &jac) const
Derivative of -RHS with respect to the stress_params and gaE, placed into an array ready for solving ...
MPI_Info info
virtual void errorHandler(const std::string &message) const
Performs any necessary cleaning-up, then throw MooseException(message)
const unsigned _num_intnl
Number of internal parameters.
const double v
std::vector< std::vector< Real > > _Eij
E[i, j] in the system of equations to be solved.
virtual void setIntnlDerivativesV(const std::vector< Real > &trial_stress_params, const std::vector< Real > &current_stress_params, const std::vector< Real > &intnl, std::vector< std::vector< Real >> &dintnl) const =0
Sets the derivatives of internal parameters, based on the trial values of stress_params, their current values, and the current values of the internal parameters.
std::string stringify(const T &t)
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
static const std::complex< double > j(0, 1)
Complex number "j" (also known as "i")
const bool & currentlyComputingJacobian() const
static const std::string k
Definition: NS.h:134
const unsigned _num_sp
Number of stress parameters.

◆ errorHandler()

void MultiParameterPlasticityStressUpdate::errorHandler ( const std::string &  message) const
protectedvirtualinherited

Performs any necessary cleaning-up, then throw MooseException(message)

Parameters
messageThe message to using in MooseException

Definition at line 688 of file MultiParameterPlasticityStressUpdate.C.

Referenced by MultiParameterPlasticityStressUpdate::dVardTrial(), and MultiParameterPlasticityStressUpdate::updateState().

689 {
690  throw MooseException(message);
691 }
static const std::string message

◆ finalizeReturnProcess()

void MultiParameterPlasticityStressUpdate::finalizeReturnProcess ( const RankTwoTensor rotation_increment)
protectedvirtualinherited

Derived classes may use this to perform calculations after the return-map process has completed successfully in stress_param space but before the returned stress tensor has been calculcated.

Parameters
rotation_increment[in]The large-strain rotation increment

Reimplemented in CappedDruckerPragerStressUpdate, CappedWeakPlaneStressUpdate, and CappedWeakInclinedPlaneStressUpdate.

Definition at line 699 of file MultiParameterPlasticityStressUpdate.C.

Referenced by MultiParameterPlasticityStressUpdate::updateState().

701 {
702 }

◆ getTangentCalculationMethod()

virtual TangentCalculationMethod MultiParameterPlasticityStressUpdate::getTangentCalculationMethod ( )
inlineoverrideprotectedvirtualinherited

◆ initializeReturnProcess()

void MultiParameterPlasticityStressUpdate::initializeReturnProcess ( )
protectedvirtualinherited

Derived classes may use this to perform calculations before any return-map process is performed, for instance, to initialize variables.

This is called at the very start of updateState, even before any checking for admissible stresses, etc, is performed

Reimplemented in CappedDruckerPragerStressUpdate, CappedWeakPlaneStressUpdate, and CappedWeakInclinedPlaneStressUpdate.

Definition at line 694 of file MultiParameterPlasticityStressUpdate.C.

Referenced by MultiParameterPlasticityStressUpdate::updateState().

695 {
696 }

◆ initializeVars()

void TwoParameterPlasticityStressUpdate::initializeVars ( Real  p_trial,
Real  q_trial,
const std::vector< Real > &  intnl_old,
Real p,
Real q,
Real gaE,
std::vector< Real > &  intnl 
) const
protectedvirtual

Sets (p, q, gaE, intnl) at "good guesses" of the solution to the Return-Map algorithm.

The purpose of these "good guesses" is to speed up the Newton-Raphson process by providing it with a good initial guess. Derived classes may choose to override this if their plastic models are easy enough to solve approximately. The default values, provided by this class, are simply p=p_trial, etc: that is, the "good guess" is just the trial point for this (sub)strain increment.

Parameters
p_trialThe trial value of p for this (sub)strain increment
q_trialThe trial value of q for this (sub)strain increment
intnl_oldThe internal parameters before applying the (sub)strain increment
p[out]The "good guess" value of p. Default = p_trial
q[out]The "good guess" value of q. Default = q_trial
gaE[out]The "good guess" value of gaE. Default = 0
intnl[out]The "good guess" value of the internal parameters

Reimplemented in CappedDruckerPragerStressUpdate, and CappedWeakPlaneStressUpdate.

Definition at line 89 of file TwoParameterPlasticityStressUpdate.C.

Referenced by initializeVarsV().

96 {
97  p = p_trial;
98  q = q_trial;
99  gaE = 0.0;
100  std::copy(intnl_old.begin(), intnl_old.end(), intnl.begin());
101 }
const Real p

◆ initializeVarsV()

void TwoParameterPlasticityStressUpdate::initializeVarsV ( const std::vector< Real > &  trial_stress_params,
const std::vector< Real > &  intnl_old,
std::vector< Real > &  stress_params,
Real gaE,
std::vector< Real > &  intnl 
) const
overrideprotectedvirtual

Sets (stress_params, intnl) at "good guesses" of the solution to the Return-Map algorithm.

The purpose of these "good guesses" is to speed up the Newton-Raphson process by providing it with a good initial guess. Derived classes may choose to override this if their plastic models are easy enough to solve approximately. The default values, provided by this class, are simply gaE = 0, stress_params = trial_stress_params, that is, the "good guess" is just the trial point for this (sub)strain increment.

Parameters
trial_stress_params[in]The stress_params at the trial point
intnl_old[in]The internal parameters before applying the (sub)strain increment
stress_params[out]The "good guess" value of the stress_params
gaE[out]The "good guess" value of gaE
intnl[out]The "good guess" value of the internal parameters

Reimplemented from MultiParameterPlasticityStressUpdate.

Definition at line 114 of file TwoParameterPlasticityStressUpdate.C.

119 {
120  const Real p_trial = trial_stress_params[0];
121  const Real q_trial = trial_stress_params[1];
122  Real p;
123  Real q;
124  initializeVars(p_trial, q_trial, intnl_old, p, q, gaE, intnl);
125  stress_params[0] = p;
126  stress_params[1] = q;
127 }
virtual void initializeVars(Real p_trial, Real q_trial, const std::vector< Real > &intnl_old, Real &p, Real &q, Real &gaE, std::vector< Real > &intnl) const
Sets (p, q, gaE, intnl) at "good guesses" of the solution to the Return-Map algorithm.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const Real p

◆ initQpStatefulProperties()

void MultiParameterPlasticityStressUpdate::initQpStatefulProperties ( )
overrideprotectedvirtualinherited

Reimplemented from Material.

Reimplemented in CappedWeakInclinedPlaneStressUpdate.

Definition at line 151 of file MultiParameterPlasticityStressUpdate.C.

Referenced by CappedWeakInclinedPlaneStressUpdate::initQpStatefulProperties(), and MultiParameterPlasticityStressUpdate::updateState().

152 {
153  _plastic_strain[_qp].zero();
154  _intnl[_qp].assign(_num_intnl, 0);
155  _yf[_qp].assign(_num_yf, 0);
156  _iter[_qp] = 0.0;
157  _max_iter_used[_qp] = 0.0;
158  _linesearch_needed[_qp] = 0.0;
159 }
MaterialProperty< std::vector< Real > > & _yf
yield functions
const unsigned _num_intnl
Number of internal parameters.
MaterialProperty< std::vector< Real > > & _intnl
internal parameters
unsigned int _qp
const unsigned _num_yf
Number of yield functions.
MaterialProperty< Real > & _iter
Number of Newton-Raphson iterations used in the return-map.
MaterialProperty< RankTwoTensor > & _plastic_strain
plastic strain
MaterialProperty< Real > & _linesearch_needed
Whether a line-search was needed in the latest Newton-Raphson process (1 if true, 0 otherwise) ...
MaterialProperty< Real > & _max_iter_used
Maximum number of Newton-Raphson iterations used in the return-map during the course of the entire si...

◆ isIsotropic()

template<bool is_ad, typename R2 = RankTwoTensor, typename R4 = RankFourTensor>
virtual bool StressUpdateBaseTempl< is_ad, R2, R4 >::isIsotropic ( )
inlinevirtualinherited

Is the implmented model isotropic? The safe default is 'false'.

Reimplemented in RadialReturnStressUpdateTempl< is_ad >, CappedDruckerPragerStressUpdate, and CappedMohrCoulombStressUpdate.

Definition at line 130 of file StressUpdateBase.h.

Referenced by ComputeMultipleInelasticStressBase::initialSetup().

130 { return false; };

◆ ismoother()

Real MultiParameterPlasticityStressUpdate::ismoother ( Real  f_diff) const
protectedinherited

Smooths yield functions.

The returned value must be zero if abs(f_diff) >= _smoothing_tol and otherwise must satisfy, over -_smoothing_tol <= f_diff <= _smoothing_tol: (1) C2 (2) zero at f_diff = +/- _smoothing_tol (3) derivative is +/-0.5 at f_diff = +/- _smoothing_tol (4) derivative must be in [-0.5, 0.5] (5) second derivative is zero at f_diff = +/- _smoothing_tol (6) second derivative must be non-negative in order to ensure C2 differentiability and convexity of the smoothed yield surface.

Definition at line 500 of file MultiParameterPlasticityStressUpdate.C.

Referenced by MultiParameterPlasticityStressUpdate::smoothAllQuantities(), and MultiParameterPlasticityStressUpdate::yieldF().

501 {
502  if (std::abs(f_diff) >= _smoothing_tol)
503  return 0.0;
504  switch (_smoother_function_type)
505  {
507  return -_smoothing_tol / M_PI * std::cos(0.5 * M_PI * f_diff / _smoothing_tol);
509  return 0.75 / _smoothing_tol *
510  (0.5 * (Utility::pow<2>(f_diff) - _smoothing_tol2) -
511  (_smoothing_tol2 / 12.0) * (Utility::pow<4>(f_diff / _smoothing_tol) - 1.0));
513  return 0.625 / _smoothing_tol *
514  (0.5 * (Utility::pow<2>(f_diff) - _smoothing_tol2) -
515  (_smoothing_tol2 / 30.0) * (Utility::pow<6>(f_diff / _smoothing_tol) - 1.0));
517  return (7.0 / 12.0 / _smoothing_tol) *
518  (0.5 * (Utility::pow<2>(f_diff) - _smoothing_tol2) -
519  (_smoothing_tol2 / 56.0) * (Utility::pow<8>(f_diff / _smoothing_tol) - 1.0));
520  default:
521  return 0.0;
522  }
523 }
const Real _smoothing_tol2
Square of the smoothing tolerance.
enum MultiParameterPlasticityStressUpdate::SmootherFunctionType _smoother_function_type
const Real _smoothing_tol
Smoothing tolerance: edges of the yield surface get smoothed by this amount.

◆ lineSearch()

int MultiParameterPlasticityStressUpdate::lineSearch ( Real res2,
std::vector< Real > &  stress_params,
Real gaE,
const std::vector< Real > &  trial_stress_params,
yieldAndFlow smoothed_q,
const std::vector< Real > &  intnl_ok,
std::vector< Real > &  intnl,
std::vector< Real > &  rhs,
Real linesearch_needed 
) const
protectedinherited

Performs a line-search to find stress_params and gaE Upon entry:

  • rhs contains the solution to the Newton-Raphson (ie nrStep should have been called). If a full Newton step is used then stress_params[:] += rhs[0:_num_sp-1] and gaE += rhs[_num_sp]
  • res2 contains the residual-squared before applying any of solution
  • stress_params contains the stress_params before applying any of the solution
  • gaE contains gaE before applying any of the solution (that is contained in rhs) Upon exit:
  • stress_params will be the stress_params after applying the solution
  • gaE will be the stress_params after applying the solution
  • rhs will contain the updated rhs values (after applying the solution) ready for the next Newton-Raphson step,
  • res2 will be the residual-squared after applying the solution
  • intnl will contain the internal variables corresponding to the return from trial_stress_params to stress_params (and starting from intnl_ok)
  • linesearch_needed will be 1.0 if a linesearch was needed
  • smoothed_q will contain the value of the yield function and its derivatives, etc, at (stress_params, intnl)
    Parameters
    res2[in,out]the residual-squared, both as an input and output
    stress_params[in,out]Upon input the value of the stress_params before the current Newton-Raphson process was initiated. Upon exit this will hold the values coming from the line search.
    trial_stress_params[in]Trial value for the stress_params for this (sub)strain increment
    gaE[in,out]Upon input the value of gaE before the current Newton-Raphson iteration was initiated. Upon exit this will hold the value coming from the line-search
    smoothed_q[in,out]Upon input, the value of the smoothed yield function and derivatives at the prior-to-Newton configuration. Upon exit this is evaluated at the new (stress_params, intnl)
    intnl_ok[in]The value of the internal parameters from the start of this (sub)strain increment
    intnl[in,out]The value of the internal parameters after the line-search has converged
    rhs[in,out]Upon entry this contains the solution to the Newton-Raphson. Upon exit this contains the updated rhs values
    Returns
    0 if successful, 1 otherwise

Definition at line 569 of file MultiParameterPlasticityStressUpdate.C.

Referenced by MultiParameterPlasticityStressUpdate::updateState().

578 {
579  const Real res2_old = res2;
580  mooseAssert(_sp_params_old_scratch.size() == _num_sp,
581  "_sp_params_old_scratch incorrectly sized in lineSearch");
582  _sp_params_old_scratch = stress_params;
583  const Real gaE_old = gaE;
584  mooseAssert(_delta_nr_params_scratch.size() == rhs.size(),
585  "_delta_nr_params_scratch incorrectly sized in lineSearch");
587 
588  Real lam = 1.0; // line-search parameter
589  const Real lam_min = 1E-10; // minimum value of lam allowed
590  const Real slope = -2.0 * res2_old; // "Numerical Recipes" uses -b*A*x, in order to check for
591  // roundoff, but i hope the nrStep would warn if there were
592  // problems
593  Real tmp_lam; // cached value of lam used in quadratic & cubic line search
594  Real f2 = res2_old; // cached value of f = residual2 used in the cubic in the line search
595  Real lam2 = lam; // cached value of lam used in the cubic in the line search
596 
597  while (true)
598  {
599  // update variables using the current line-search parameter
600  for (unsigned i = 0; i < _num_sp; ++i)
601  stress_params[i] = _sp_params_old_scratch[i] + lam * _delta_nr_params_scratch[i];
602  gaE = gaE_old + lam * _delta_nr_params_scratch[_num_sp];
603 
604  // and internal parameters
605  setIntnlValuesV(trial_stress_params, stress_params, intnl_ok, intnl);
606 
607  smoothed_q = smoothAllQuantities(stress_params, intnl);
608 
609  // update rhs for next-time through
610  calculateRHS(trial_stress_params, stress_params, gaE, smoothed_q, rhs);
611  res2 = calculateRes2(rhs);
612 
613  // do the line-search
614  if (res2 < res2_old + 1E-4 * lam * slope)
615  break;
616  else if (lam < lam_min)
617  return 1;
618  else if (lam == 1.0)
619  {
620  // model as a quadratic
621  tmp_lam = -0.5 * slope / (res2 - res2_old - slope);
622  }
623  else
624  {
625  // model as a cubic
626  const Real rhs1 = res2 - res2_old - lam * slope;
627  const Real rhs2 = f2 - res2_old - lam2 * slope;
628  const Real a = (rhs1 / Utility::pow<2>(lam) - rhs2 / Utility::pow<2>(lam2)) / (lam - lam2);
629  const Real b =
630  (-lam2 * rhs1 / Utility::pow<2>(lam) + lam * rhs2 / Utility::pow<2>(lam2)) / (lam - lam2);
631  if (a == 0.0)
632  tmp_lam = -slope / (2.0 * b);
633  else
634  {
635  const Real disc = Utility::pow<2>(b) - 3.0 * a * slope;
636  if (disc < 0)
637  tmp_lam = 0.5 * lam;
638  else if (b <= 0)
639  tmp_lam = (-b + std::sqrt(disc)) / (3.0 * a);
640  else
641  tmp_lam = -slope / (b + std::sqrt(disc));
642  }
643  if (tmp_lam > 0.5 * lam)
644  tmp_lam = 0.5 * lam;
645  }
646  lam2 = lam;
647  f2 = res2;
648  lam = std::max(tmp_lam, 0.1 * lam);
649  }
650 
651  if (lam < 1.0)
652  linesearch_needed = 1.0;
653  return 0;
654 }
std::vector< Real > _sp_params_old_scratch
container to hold old values of old stress_params in lineSearch to avoid repeatedly allocating/deallo...
virtual void setIntnlValuesV(const std::vector< Real > &trial_stress_params, const std::vector< Real > &current_stress_params, const std::vector< Real > &intnl_old, std::vector< Real > &intnl) const =0
Sets the internal parameters based on the trial values of stress_params, their current values...
void calculateRHS(const std::vector< Real > &trial_stress_params, const std::vector< Real > &stress_params, Real gaE, const yieldAndFlow &smoothed_q, std::vector< Real > &rhs) const
Calculates the RHS in the following 0 = rhs[0] = S[0] - S[0]^trial + ga * E[0, j] * dg/dS[j] 0 = rhs[...
yieldAndFlow smoothAllQuantities(const std::vector< Real > &stress_params, const std::vector< Real > &intnl) const
Calculates all yield functions and derivatives, and then performs the smoothing scheme.
Real calculateRes2(const std::vector< Real > &rhs) const
Calculates the residual-squared for the Newton-Raphson + line-search.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
std::vector< Real > _delta_nr_params_scratch
container to hold initial values of rhs in lineSearch to avoid repeatedly allocating/deallocating thi...
const unsigned _num_sp
Number of stress parameters.

◆ nrStep()

int MultiParameterPlasticityStressUpdate::nrStep ( const yieldAndFlow smoothed_q,
const std::vector< Real > &  trial_stress_params,
const std::vector< Real > &  stress_params,
const std::vector< Real > &  intnl,
Real  gaE,
std::vector< Real > &  rhs 
) const
protectedinherited

Performs a Newton-Raphson step to attempt to zero rhs Upon return, rhs will contain the solution.

Parameters
smoothed_q[in]The value of the smoothed yield function and derivatives prior to this Newton-Raphson step
trial_stress_params[in]Trial value for the stress_params for this (sub)strain increment
stress_params[in]The current value of the stress_params
intnl[in]The current value of the internal parameters
gaE[in]The current value of gaE
rhs[in,out]Upon entry, the rhs to zero using Newton-Raphson. Upon exit, the solution to the Newton-Raphson problem
Returns
0 if successful, 1 otherwise

Definition at line 657 of file MultiParameterPlasticityStressUpdate.C.

Referenced by MultiParameterPlasticityStressUpdate::updateState().

663 {
664  mooseAssert(_dintnl_scratch.size() == _num_intnl, "_dintnl_scratch incorrectly sized in nrStep");
665  setIntnlDerivativesV(trial_stress_params, stress_params, intnl, _dintnl_scratch);
666 
667  mooseAssert(_jac_scratch.size() == (_num_sp + 1) * (_num_sp + 1),
668  "_jac_scratch incorrectly sized in nrStep");
669  dnRHSdVar(smoothed_q, _dintnl_scratch, stress_params, gaE, _jac_scratch);
670 
671  // use LAPACK to solve the linear system
672  const PetscBLASInt nrhs = 1;
673  mooseAssert(_ipiv_scratch.size() == _num_sp + 1, "_ipiv_scratch incorrectly sized in nrStep");
674  PetscBLASInt info;
675  const PetscBLASInt gesv_num_rhs = _num_sp + 1;
676  LAPACKgesv_(&gesv_num_rhs,
677  &nrhs,
678  &_jac_scratch[0],
679  &gesv_num_rhs,
680  &_ipiv_scratch[0],
681  &rhs[0],
682  &gesv_num_rhs,
683  &info);
684  return info;
685 }
void dnRHSdVar(const yieldAndFlow &smoothed_q, const std::vector< std::vector< Real >> &dintnl, const std::vector< Real > &stress_params, Real gaE, std::vector< double > &jac) const
Derivative of -RHS with respect to the stress_params and gaE, placed into an array ready for solving ...
MPI_Info info
std::vector< PetscBLASInt > _ipiv_scratch
container to hold LAPACK ipiv integers, to avoid repeatedly allocating/deallocating this vector ...
const unsigned _num_intnl
Number of internal parameters.
std::vector< double > _jac_scratch
jacobian in the NR process, to avoid repeatedly allocating/deallocating this vector ...
virtual void setIntnlDerivativesV(const std::vector< Real > &trial_stress_params, const std::vector< Real > &current_stress_params, const std::vector< Real > &intnl, std::vector< std::vector< Real >> &dintnl) const =0
Sets the derivatives of internal parameters, based on the trial values of stress_params, their current values, and the current values of the internal parameters.
std::vector< std::vector< Real > > _dintnl_scratch
derivative of internal parameters with respect to stress parameters, to avoid repeatedly allocating/d...
const unsigned _num_sp
Number of stress parameters.

◆ precisionLoss()

bool MultiParameterPlasticityStressUpdate::precisionLoss ( const std::vector< Real > &  solution,
const std::vector< Real > &  stress_params,
Real  gaE 
) const
protectedinherited

Check whether precision loss has occurred.

Parameters
[in]solutionThe solution to the Newton-Raphson system
[in]stress_paramsThe currect values of the stress_params for this (sub)strain increment
[in]gaEThe currenct value of gaE for this (sub)strain increment
Returns
true if precision loss has occurred

Definition at line 1013 of file MultiParameterPlasticityStressUpdate.C.

Referenced by MultiParameterPlasticityStressUpdate::updateState().

1016 {
1017  if (std::abs(solution[_num_sp]) > 1E-13 * std::abs(gaE))
1018  return false;
1019  for (unsigned i = 0; i < _num_sp; ++i)
1020  if (std::abs(solution[i]) > 1E-13 * std::abs(stress_params[i]))
1021  return false;
1022  return true;
1023 }
const unsigned _num_sp
Number of stress parameters.

◆ preReturnMap()

void TwoParameterPlasticityStressUpdate::preReturnMap ( Real  p_trial,
Real  q_trial,
const RankTwoTensor stress_trial,
const std::vector< Real > &  intnl_old,
const std::vector< Real > &  yf,
const RankFourTensor Eijkl 
)
protectedvirtual

Derived classes may employ this function to record stuff or do other computations prior to the return-mapping algorithm.

We know that (p_trial, q_trial, intnl_old) is inadmissible.

Parameters
p_trialTrial value of p
q_trialTrial value of q
stress_trialTrial stress tensor
intnl_oldOld value of the internal parameters.
yfThe yield functions at (p_trial, q_trial, intnl_old)
EijklThe elasticity tensor

Reimplemented in CappedDruckerPragerStressUpdate, CappedWeakPlaneStressUpdate, and CappedWeakInclinedPlaneStressUpdate.

Definition at line 78 of file TwoParameterPlasticityStressUpdate.C.

Referenced by preReturnMapV().

84 {
85  return;
86 }

◆ preReturnMapV()

void TwoParameterPlasticityStressUpdate::preReturnMapV ( const std::vector< Real > &  trial_stress_params,
const RankTwoTensor stress_trial,
const std::vector< Real > &  intnl_old,
const std::vector< Real > &  yf,
const RankFourTensor Eijkl 
)
overrideprotectedvirtual

Derived classes may employ this function to record stuff or do other computations prior to the return-mapping algorithm.

We know that (trial_stress_params, intnl_old) is inadmissible when this is called

Parameters
trial_stress_params[in]The trial values of the stress parameters
stress_trial[in]Trial stress tensor
intnl_old[in]Old value of the internal parameters.
yf[in]The yield functions at (p_trial, q_trial, intnl_old)
Eijkl[in]The elasticity tensor

Reimplemented from MultiParameterPlasticityStressUpdate.

Definition at line 66 of file TwoParameterPlasticityStressUpdate.C.

71 {
72  const Real p_trial = trial_stress_params[0];
73  const Real q_trial = trial_stress_params[1];
74  preReturnMap(p_trial, q_trial, stress_trial, intnl_old, yf, Eijkl);
75 }
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
virtual void preReturnMap(Real p_trial, Real q_trial, const RankTwoTensor &stress_trial, const std::vector< Real > &intnl_old, const std::vector< Real > &yf, const RankFourTensor &Eijkl)
Derived classes may employ this function to record stuff or do other computations prior to the return...

◆ propagateQpStatefulProperties()

void MultiParameterPlasticityStressUpdate::propagateQpStatefulProperties ( )
overrideprotectedvirtualinherited

If updateState is not called during a timestep, this will be.

This method allows derived classes to set internal parameters from their Old values, for instance

Reimplemented from StressUpdateBaseTempl< is_ad, R2, R4 >.

Definition at line 162 of file MultiParameterPlasticityStressUpdate.C.

163 {
165  std::copy(_intnl_old[_qp].begin(), _intnl_old[_qp].end(), _intnl[_qp].begin());
167 }
MaterialProperty< std::vector< Real > > & _intnl
internal parameters
unsigned int _qp
const MaterialProperty< std::vector< Real > > & _intnl_old
old values of internal parameters
const MaterialProperty< Real > & _max_iter_used_old
Old value of maximum number of Newton-Raphson iterations used in the return-map during the course of ...
MaterialProperty< RankTwoTensor > & _plastic_strain
plastic strain
MaterialProperty< Real > & _max_iter_used
Maximum number of Newton-Raphson iterations used in the return-map during the course of the entire si...
const MaterialProperty< RankTwoTensor > & _plastic_strain_old
Old value of plastic strain.

◆ requiresIsotropicTensor()

template<bool is_ad, typename R2 = RankTwoTensor, typename R4 = RankFourTensor>
virtual bool StressUpdateBaseTempl< is_ad, R2, R4 >::requiresIsotropicTensor ( )
pure virtualinherited

◆ resetIncrementalMaterialProperties()

template<bool is_ad, typename R2 = RankTwoTensor, typename R4 = RankFourTensor>
virtual void StressUpdateBaseTempl< is_ad, R2, R4 >::resetIncrementalMaterialProperties ( )
inlinevirtualinherited

Reset material properties.

Useful for substepping with inelastic models.

Reimplemented in CompositePowerLawCreepStressUpdateTempl< is_ad >, PowerLawCreepStressUpdateTempl< is_ad >, and LAROMANCEStressUpdateBaseTempl< is_ad >.

Definition at line 172 of file StressUpdateBase.h.

172 {};

◆ resetProperties()

template<bool is_ad, typename R2 = RankTwoTensor, typename R4 = RankFourTensor>
void StressUpdateBaseTempl< is_ad, R2, R4 >::resetProperties ( )
inlinefinalvirtualinherited

Reimplemented from Material.

Definition at line 138 of file StressUpdateBase.h.

138 {}

◆ resetQpProperties()

template<bool is_ad, typename R2 = RankTwoTensor, typename R4 = RankFourTensor>
void StressUpdateBaseTempl< is_ad, R2, R4 >::resetQpProperties ( )
inlinefinalvirtualinherited

Retained as empty methods to avoid a warning from Material.C in framework. These methods are unused in all inheriting classes and should not be overwritten.

Reimplemented from Material.

Definition at line 137 of file StressUpdateBase.h.

137 {}

◆ setEffectiveElasticity()

void TwoParameterPlasticityStressUpdate::setEffectiveElasticity ( const RankFourTensor Eijkl)
overrideprotectedvirtual

Sets _Eij and _En and _Cij.

Implements MultiParameterPlasticityStressUpdate.

Definition at line 53 of file TwoParameterPlasticityStressUpdate.C.

54 {
55  setEppEqq(Eijkl, _Epp, _Eqq);
56  _Eij[0][0] = _Epp;
57  _Eij[1][0] = _Eij[0][1] = 0.0;
58  _Eij[1][1] = _Eqq;
59  _En = _Epp;
60  _Cij[0][0] = 1.0 / _Epp;
61  _Cij[1][0] = _Cij[0][1] = 0.0;
62  _Cij[1][1] = 1.0 / _Eqq;
63 }
virtual void setEppEqq(const RankFourTensor &Eijkl, Real &Epp, Real &Eqq) const =0
Set Epp and Eqq based on the elasticity tensor Derived classes must override this.
std::vector< std::vector< Real > > _Cij
_Cij[i, j] * _Eij[j, k] = 1 iff j == k
std::vector< std::vector< Real > > _Eij
E[i, j] in the system of equations to be solved.
Real _Epp
elasticity tensor in p direction
Real _Eqq
elasticity tensor in q direction

◆ setEppEqq()

virtual void TwoParameterPlasticityStressUpdate::setEppEqq ( const RankFourTensor Eijkl,
Real Epp,
Real Eqq 
) const
protectedpure virtual

Set Epp and Eqq based on the elasticity tensor Derived classes must override this.

Parameters
Eijklelasticity tensor
[out]EppEpp value
[out]EqqEqq value

Implemented in CappedDruckerPragerStressUpdate, CappedWeakPlaneStressUpdate, CappedWeakInclinedPlaneStressUpdate, and CappedDruckerPragerCosseratStressUpdate.

Referenced by setEffectiveElasticity().

◆ setInelasticStrainIncrementAfterReturn()

void TwoParameterPlasticityStressUpdate::setInelasticStrainIncrementAfterReturn ( const RankTwoTensor stress_trial,
Real  gaE,
const yieldAndFlow smoothed_q,
const RankFourTensor elasticity_tensor,
const RankTwoTensor returned_stress,
RankTwoTensor inelastic_strain_increment 
)
overrideprotectedvirtual

Sets inelastic strain increment from the returned configuration This is called after the return-map process has completed successfully in stress_param space, just after finalizeReturnProcess has been called.

Derived classes may override this function

Parameters
stress_trial[in]The trial value of stress
gaE[in]The value of gaE after the return-map process has completed successfully
smoothed_q[in]Holds the current value of yield function and derivatives evaluated at the returned configuration
elasticity_tensor[in]The elasticity tensor
returned_stress[in]The stress after the return-map process
inelastic_strain_increment[out]The inelastic strain increment resulting from this return-map

Reimplemented from MultiParameterPlasticityStressUpdate.

Definition at line 278 of file TwoParameterPlasticityStressUpdate.C.

285 {
286  inelastic_strain_increment = (gaE / _Epp) * (smoothed_q.dg[0] * dpdstress(returned_stress) +
287  smoothed_q.dg[1] * dqdstress(returned_stress));
288 }
Real _Epp
elasticity tensor in p direction
virtual RankTwoTensor dqdstress(const RankTwoTensor &stress) const =0
d(q)/d(stress) Derived classes must override this
virtual RankTwoTensor dpdstress(const RankTwoTensor &stress) const =0
d(p)/d(stress) Derived classes must override this

◆ setIntnlDerivatives()

virtual void TwoParameterPlasticityStressUpdate::setIntnlDerivatives ( Real  p_trial,
Real  q_trial,
Real  p,
Real  q,
const std::vector< Real > &  intnl,
std::vector< std::vector< Real >> &  dintnl 
) const
protectedpure virtual

Sets the derivatives of internal parameters, based on the trial values of p and q, their current values, and the old values of the internal parameters.

Derived classes must override this.

Parameters
p_trialTrial value of p
q_trialTrial value of q
pCurrent value of p
qCurrent value of q
intnlThe current value of the internal parameters
dintnlThe derivatives dintnl[i][j] = d(intnl[i])/d(variable j), where variable0=p and variable1=q

Implemented in CappedDruckerPragerStressUpdate, and CappedWeakPlaneStressUpdate.

Referenced by setIntnlDerivativesV().

◆ setIntnlDerivativesV()

void TwoParameterPlasticityStressUpdate::setIntnlDerivativesV ( const std::vector< Real > &  trial_stress_params,
const std::vector< Real > &  current_stress_params,
const std::vector< Real > &  intnl,
std::vector< std::vector< Real >> &  dintnl 
) const
overrideprotectedvirtual

Sets the derivatives of internal parameters, based on the trial values of stress_params, their current values, and the current values of the internal parameters.

Derived classes must override this.

Parameters
trial_stress_params[in]The trial stress parameters
current_stress_params[in]The current stress parameters
intnl[in]The current value of the internal parameters
dintnl[out]The derivatives dintnl[i][j] = d(intnl[i])/d(stress_param j)

Implements MultiParameterPlasticityStressUpdate.

Definition at line 143 of file TwoParameterPlasticityStressUpdate.C.

148 {
149  const Real p_trial = trial_stress_params[0];
150  const Real q_trial = trial_stress_params[1];
151  const Real p = current_stress_params[0];
152  const Real q = current_stress_params[1];
153  setIntnlDerivatives(p_trial, q_trial, p, q, intnl_old, dintnl);
154 }
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const Real p
virtual void setIntnlDerivatives(Real p_trial, Real q_trial, Real p, Real q, const std::vector< Real > &intnl, std::vector< std::vector< Real >> &dintnl) const =0
Sets the derivatives of internal parameters, based on the trial values of p and q, their current values, and the old values of the internal parameters.

◆ setIntnlValues()

virtual void TwoParameterPlasticityStressUpdate::setIntnlValues ( Real  p_trial,
Real  q_trial,
Real  p,
Real  q,
const std::vector< Real > &  intnl_old,
std::vector< Real > &  intnl 
) const
protectedpure virtual

Sets the internal parameters based on the trial values of p and q, their current values, and the old values of the internal parameters.

Derived classes must override this.

Parameters
p_trialTrial value of p
q_trialTrial value of q
pCurrent value of p
qCurrent value of q
intnl_oldOld value of internal parameters
intnl[out]The value of internal parameters to be set

Implemented in CappedDruckerPragerStressUpdate, and CappedWeakPlaneStressUpdate.

Referenced by setIntnlValuesV().

◆ setIntnlValuesV()

void TwoParameterPlasticityStressUpdate::setIntnlValuesV ( const std::vector< Real > &  trial_stress_params,
const std::vector< Real > &  current_stress_params,
const std::vector< Real > &  intnl_old,
std::vector< Real > &  intnl 
) const
overrideprotectedvirtual

Sets the internal parameters based on the trial values of stress_params, their current values, and the old values of the internal parameters.

Derived classes must override this.

Parameters
trial_stress_params[in]The trial stress parameters (eg trial_p and trial_q)
current_stress_params[in]The current stress parameters (eg p and q)
intnl_old[out]Old value of internal parameters
intnl[out]The value of internal parameters to be set

Implements MultiParameterPlasticityStressUpdate.

Definition at line 130 of file TwoParameterPlasticityStressUpdate.C.

134 {
135  const Real p_trial = trial_stress_params[0];
136  const Real q_trial = trial_stress_params[1];
137  const Real p = current_stress_params[0];
138  const Real q = current_stress_params[1];
139  setIntnlValues(p_trial, q_trial, p, q, intnl_old, intnl);
140 }
virtual void setIntnlValues(Real p_trial, Real q_trial, Real p, Real q, const std::vector< Real > &intnl_old, std::vector< Real > &intnl) const =0
Sets the internal parameters based on the trial values of p and q, their current values, and the old values of the internal parameters.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const Real p

◆ setQp()

template<bool is_ad, typename R2 , typename R4 >
void StressUpdateBaseTempl< is_ad, R2, R4 >::setQp ( unsigned int  qp)
inherited

Sets the value of the global variable _qp for inheriting classes.

Definition at line 46 of file StressUpdateBase.C.

Referenced by ComputeCreepPlasticityStress::updateQpState().

47 {
48  _qp = qp;
49 }
unsigned int _qp

◆ setStressAfterReturn()

virtual void TwoParameterPlasticityStressUpdate::setStressAfterReturn ( const RankTwoTensor stress_trial,
Real  p_ok,
Real  q_ok,
Real  gaE,
const std::vector< Real > &  intnl,
const yieldAndFlow smoothed_q,
const RankFourTensor Eijkl,
RankTwoTensor stress 
) const
protectedpure virtual

Sets stress from the admissible parameters.

This is called after the return-map process has completed successfully in (p, q) space, just after finalizeReturnProcess has been called. Derived classes may override this function

Parameters
stress_trialThe trial value of stress
p_okReturned value of p
q_okReturned value of q
gaEValue of gaE induced by the return (gaE = gamma * Epp)
smoothed_qHolds the current value of yield function and derivatives evaluated at (p_ok, q_ok, _intnl)
EijklThe elasticity tensor
stress[out]The returned value of the stress tensor

Implemented in CappedDruckerPragerStressUpdate, CappedWeakPlaneStressUpdate, CappedWeakInclinedPlaneStressUpdate, CappedDruckerPragerCosseratStressUpdate, and CappedWeakPlaneCosseratStressUpdate.

Referenced by setStressAfterReturnV().

◆ setStressAfterReturnV()

void TwoParameterPlasticityStressUpdate::setStressAfterReturnV ( const RankTwoTensor stress_trial,
const std::vector< Real > &  stress_params,
Real  gaE,
const std::vector< Real > &  intnl,
const yieldAndFlow smoothed_q,
const RankFourTensor Eijkl,
RankTwoTensor stress 
) const
overrideprotectedvirtual

Sets stress from the admissible parameters.

This is called after the return-map process has completed successfully in stress_param space, just after finalizeReturnProcess has been called. Derived classes must override this function

Parameters
stress_trial[in]The trial value of stress
stress_params[in]The value of the stress_params after the return-map process has completed successfully
gaE[in]The value of gaE after the return-map process has completed successfully
intnl[in]The value of the internal parameters after the return-map process has completed successfully
smoothed_q[in]Holds the current value of yield function and derivatives evaluated at the returned state
Eijkl[in]The elasticity tensor
stress[out]The returned value of the stress tensor

Implements MultiParameterPlasticityStressUpdate.

Definition at line 264 of file TwoParameterPlasticityStressUpdate.C.

271 {
272  const Real p_ok = stress_params[0];
273  const Real q_ok = stress_params[1];
274  setStressAfterReturn(stress_trial, p_ok, q_ok, gaE, intnl, smoothed_q, Eijkl, stress);
275 }
virtual void setStressAfterReturn(const RankTwoTensor &stress_trial, Real p_ok, Real q_ok, Real gaE, const std::vector< Real > &intnl, const yieldAndFlow &smoothed_q, const RankFourTensor &Eijkl, RankTwoTensor &stress) const =0
Sets stress from the admissible parameters.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real

◆ smoothAllQuantities()

MultiParameterPlasticityStressUpdate::yieldAndFlow MultiParameterPlasticityStressUpdate::smoothAllQuantities ( const std::vector< Real > &  stress_params,
const std::vector< Real > &  intnl 
) const
protectedinherited

Calculates all yield functions and derivatives, and then performs the smoothing scheme.

Parameters
stress_params[in]The stress parameters (eg stress_params[0] = stress_zz and stress_params[1] = sqrt(stress_zx^2 + stress_zy^2))
intnl[in]Internal parameters
Returns
The smoothed yield function and derivatives

Definition at line 407 of file MultiParameterPlasticityStressUpdate.C.

Referenced by MultiParameterPlasticityStressUpdate::lineSearch(), and MultiParameterPlasticityStressUpdate::updateState().

409 {
410  mooseAssert(_all_q_scratch.size() == _num_yf,
411  "_all_q_scratch incorrectly sized in smoothAllQuantities");
412  for (auto & q : _all_q_scratch)
413  q.reset();
414  computeAllQV(stress_params, intnl, _all_q_scratch);
415 
416  /* This routine holds the key to my smoothing strategy. It
417  * may be proved that this smoothing strategy produces a
418  * yield surface that is both C2 differentiable and convex,
419  * assuming the individual yield functions are C2 and
420  * convex too.
421  * Of course all the derivatives must also be smoothed.
422  * Also, I assume that d(flow potential)/dstress gets smoothed
423  * by the Yield Function (which produces a C2 flow potential).
424  * See the line identified in the loop below.
425  * Only time will tell whether this is a good strategy, but it
426  * works well in all tests so far. Convexity is irrelevant
427  * for the non-associated case, but at least the return-map
428  * problem should always have a unique solution.
429  * For two yield functions+flows, labelled 1 and 2, we
430  * should have
431  * d(g1 - g2) . d(f1 - f2) >= 0
432  * If not then the return-map problem for even the
433  * multi-surface plasticity with no smoothing won't have a
434  * unique solution. If the multi-surface plasticity has
435  * a unique solution then the smoothed version defined
436  * below will too.
437  */
438 
439  // res_f is the index that contains the smoothed yieldAndFlow
440  std::size_t res_f = 0;
441 
442  for (std::size_t a = 1; a < _all_q_scratch.size(); ++a)
443  {
444  if (_all_q_scratch[res_f].f >= _all_q_scratch[a].f + _smoothing_tol)
445  // no smoothing is needed: res_f is already indexes the largest yield function
446  continue;
447  else if (_all_q_scratch[a].f >= _all_q_scratch[res_f].f + _smoothing_tol)
448  {
449  // no smoothing is needed, and res_f needs to index to _all_q_scratch[a]
450  res_f = a;
451  continue;
452  }
453  else
454  {
455  // smoothing is required
456  const Real f_diff = _all_q_scratch[res_f].f - _all_q_scratch[a].f;
457  const Real ism = ismoother(f_diff);
458  const Real sm = smoother(f_diff);
459  const Real dsm = dsmoother(f_diff);
460  // we want: _all_q_scratch[res_f].f = 0.5 * _all_q_scratch[res_f].f + _all_q_scratch[a].f +
461  // _smoothing_tol) + ism, but we have to do the derivatives first
462  for (unsigned i = 0; i < _num_sp; ++i)
463  {
464  for (unsigned j = 0; j < _num_sp; ++j)
465  _all_q_scratch[res_f].d2g[i][j] =
466  0.5 * (_all_q_scratch[res_f].d2g[i][j] + _all_q_scratch[a].d2g[i][j]) +
467  dsm * (_all_q_scratch[res_f].df[j] - _all_q_scratch[a].df[j]) *
468  (_all_q_scratch[res_f].dg[i] - _all_q_scratch[a].dg[i]) +
469  sm * (_all_q_scratch[res_f].d2g[i][j] - _all_q_scratch[a].d2g[i][j]);
470  for (unsigned j = 0; j < _num_intnl; ++j)
471  _all_q_scratch[res_f].d2g_di[i][j] =
472  0.5 * (_all_q_scratch[res_f].d2g_di[i][j] + _all_q_scratch[a].d2g_di[i][j]) +
473  dsm * (_all_q_scratch[res_f].df_di[j] - _all_q_scratch[a].df_di[j]) *
474  (_all_q_scratch[res_f].dg[i] - _all_q_scratch[a].dg[i]) +
475  sm * (_all_q_scratch[res_f].d2g_di[i][j] - _all_q_scratch[a].d2g_di[i][j]);
476  }
477  for (unsigned i = 0; i < _num_sp; ++i)
478  {
479  _all_q_scratch[res_f].df[i] =
480  0.5 * (_all_q_scratch[res_f].df[i] + _all_q_scratch[a].df[i]) +
481  sm * (_all_q_scratch[res_f].df[i] - _all_q_scratch[a].df[i]);
482  // whether the following (smoothing g with f's smoother) is a good strategy remains to be
483  // seen...
484  _all_q_scratch[res_f].dg[i] =
485  0.5 * (_all_q_scratch[res_f].dg[i] + _all_q_scratch[a].dg[i]) +
486  sm * (_all_q_scratch[res_f].dg[i] - _all_q_scratch[a].dg[i]);
487  }
488  for (unsigned i = 0; i < _num_intnl; ++i)
489  _all_q_scratch[res_f].df_di[i] =
490  0.5 * (_all_q_scratch[res_f].df_di[i] + _all_q_scratch[a].df_di[i]) +
491  sm * (_all_q_scratch[res_f].df_di[i] - _all_q_scratch[a].df_di[i]);
492  _all_q_scratch[res_f].f =
493  0.5 * (_all_q_scratch[res_f].f + _all_q_scratch[a].f + _smoothing_tol) + ism;
494  }
495  }
496  return _all_q_scratch[res_f];
497 }
std::vector< yieldAndFlow > _all_q_scratch
all the yield function information, for use in smoothAllQuantities, to avoid repeatedly allocating/de...
const unsigned _num_intnl
Number of internal parameters.
Real smoother(Real f_diff) const
Derivative of ismoother.
const unsigned _num_yf
Number of yield functions.
virtual void computeAllQV(const std::vector< Real > &stress_params, const std::vector< Real > &intnl, std::vector< yieldAndFlow > &all_q) const =0
Completely fills all_q with correct values.
Real f(Real x)
Test function for Brents method.
Real dsmoother(Real f_diff) const
Derivative of smoother.
const Real _smoothing_tol
Smoothing tolerance: edges of the yield surface get smoothed by this amount.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
static const std::complex< double > j(0, 1)
Complex number "j" (also known as "i")
const unsigned _num_sp
Number of stress parameters.
Real ismoother(Real f_diff) const
Smooths yield functions.

◆ smoother()

Real MultiParameterPlasticityStressUpdate::smoother ( Real  f_diff) const
protectedinherited

Derivative of ismoother.

Definition at line 526 of file MultiParameterPlasticityStressUpdate.C.

Referenced by MultiParameterPlasticityStressUpdate::smoothAllQuantities().

527 {
528  if (std::abs(f_diff) >= _smoothing_tol)
529  return 0.0;
530  switch (_smoother_function_type)
531  {
533  return 0.5 * std::sin(f_diff * M_PI * 0.5 / _smoothing_tol);
535  return 0.75 / _smoothing_tol *
536  (f_diff - (_smoothing_tol / 3.0) * Utility::pow<3>(f_diff / _smoothing_tol));
538  return 0.625 / _smoothing_tol *
539  (f_diff - (_smoothing_tol / 5.0) * Utility::pow<5>(f_diff / _smoothing_tol));
541  return (7.0 / 12.0 / _smoothing_tol) *
542  (f_diff - (_smoothing_tol / 7.0) * Utility::pow<7>(f_diff / _smoothing_tol));
543  default:
544  return 0.0;
545  }
546 }
enum MultiParameterPlasticityStressUpdate::SmootherFunctionType _smoother_function_type
const Real _smoothing_tol
Smoothing tolerance: edges of the yield surface get smoothed by this amount.

◆ storeIncrementalMaterialProperties()

template<bool is_ad, typename R2 = RankTwoTensor, typename R4 = RankFourTensor>
virtual void StressUpdateBaseTempl< is_ad, R2, R4 >::storeIncrementalMaterialProperties ( const unsigned  int)
inlinevirtualinherited

Properly set up the incremental calculation storage of the stateful material properties in the inheriting classes.

Reimplemented in LAROMANCEStressUpdateBaseTempl< is_ad >.

Definition at line 167 of file StressUpdateBase.h.

167 {};

◆ substeppingCapabilityEnabled()

template<bool is_ad, typename R2 = RankTwoTensor, typename R4 = RankFourTensor>
virtual bool StressUpdateBaseTempl< is_ad, R2, R4 >::substeppingCapabilityEnabled ( )
inlinevirtualinherited

Does the model include the infrastructure for substep decomposition of the elastic strain initially used to calculate the trial stress guess Inheriting classes which wish to use the substepping capability should overwrite this method and set it to return true.

Reimplemented in CompositePowerLawCreepStressUpdateTempl< is_ad >, ADMultiplePowerLawCreepStressUpdate, PowerLawCreepStressUpdateTempl< is_ad >, and LAROMANCEStressUpdateBaseTempl< is_ad >.

Definition at line 147 of file StressUpdateBase.h.

147 { return false; }

◆ substeppingCapabilityRequested()

template<bool is_ad, typename R2 = RankTwoTensor, typename R4 = RankFourTensor>
virtual bool StressUpdateBaseTempl< is_ad, R2, R4 >::substeppingCapabilityRequested ( )
inlinevirtualinherited

Has the user requested usage of (possibly) implemented substepping capability for inelastic models.

Reimplemented in RadialReturnStressUpdateTempl< is_ad >.

Definition at line 153 of file StressUpdateBase.h.

153 { return false; }

◆ updateState() [1/3]

template<bool is_ad, typename R2 , typename R4 >
void StressUpdateBaseTempl< is_ad, R2, R4 >::updateState ( GR2 strain_increment,
GR2 inelastic_strain_increment,
const GR2 rotation_increment,
GR2 stress_new,
const RankTwoTensor stress_old,
const GR4 elasticity_tensor,
const RankTwoTensor elastic_strain_old,
bool  compute_full_tangent_operator = false,
RankFourTensor tangent_operator = StressUpdateBaseTempl<is_ad>::_identityTensor 
)
virtualinherited

Given a strain increment that results in a trial stress, perform some procedure (such as an iterative return-mapping process) to produce an admissible stress, an elastic strain increment and an inelastic strain increment.

If _fe_problem.currentlyComputingJacobian() = true, then updateState also computes d(stress)/d(strain) (or some approximation to it).

This method is called by ComputeMultipleInelasticStress. This method is pure virutal: all inheriting classes must overwrite this method.

Parameters
strain_incrementUpon input: the strain increment. Upon output: the elastic strain increment
inelastic_strain_incrementThe inelastic_strain resulting from the interative procedure
rotation_incrementThe finite-strain rotation increment
stress_newUpon input: the trial stress that results from applying strain_increment as an elastic strain. Upon output: the admissible stress
stress_oldThe old value of stress
elasticity_tensorThe elasticity tensor
compute_full_tangent_operatorThe calling routine would like the full consistent tangent operator to be placed in tangent_operator, if possible. This is irrelevant if _fe_problem.currentlyComputingJacobian() = false
tangent_operatord(stress)/d(strain), or some approximation to it If compute_full_tangent_operator=false, then tangent_operator=elasticity_tensor is an appropriate choice. tangent_operator is only computed if _fe_problem.currentlyComputingJacobian() = true

Definition at line 68 of file StressUpdateBase.C.

78 {
79  mooseError("updateState called: it needs to be implemented by your inelastic model");
80 }
void mooseError(Args &&... args) const

◆ updateState() [2/3]

void StressUpdateBaseTempl< is_ad, R2, R4 >::updateState
protectedinherited

Given a strain increment that results in a trial stress, perform some procedure (such as an iterative return-mapping process) to produce an admissible stress, an elastic strain increment and an inelastic strain increment.

If _fe_problem.currentlyComputingJacobian() = true, then updateState also computes d(stress)/d(strain) (or some approximation to it).

This method is called by ComputeMultipleInelasticStress. This method is pure virutal: all inheriting classes must overwrite this method.

Parameters
strain_incrementUpon input: the strain increment. Upon output: the elastic strain increment
inelastic_strain_incrementThe inelastic_strain resulting from the interative procedure
rotation_incrementThe finite-strain rotation increment
stress_newUpon input: the trial stress that results from applying strain_increment as an elastic strain. Upon output: the admissible stress
stress_oldThe old value of stress
elasticity_tensorThe elasticity tensor
compute_full_tangent_operatorThe calling routine would like the full consistent tangent operator to be placed in tangent_operator, if possible. This is irrelevant if _fe_problem.currentlyComputingJacobian() = false
tangent_operatord(stress)/d(strain), or some approximation to it If compute_full_tangent_operator=false, then tangent_operator=elasticity_tensor is an appropriate choice. tangent_operator is only computed if _fe_problem.currentlyComputingJacobian() = true

Definition at line 68 of file StressUpdateBase.C.

78 {
79  mooseError("updateState called: it needs to be implemented by your inelastic model");
80 }
void mooseError(Args &&... args) const

◆ updateState() [3/3]

void MultiParameterPlasticityStressUpdate::updateState ( RankTwoTensor strain_increment,
RankTwoTensor inelastic_strain_increment,
const RankTwoTensor rotation_increment,
RankTwoTensor stress_new,
const RankTwoTensor stress_old,
const RankFourTensor elasticity_tensor,
const RankTwoTensor elastic_strain_old,
bool  compute_full_tangent_operator,
RankFourTensor tangent_operator 
)
overrideprotectedvirtualinherited

Definition at line 170 of file MultiParameterPlasticityStressUpdate.C.

179 {
180  // Size _yf[_qp] appropriately
181  _yf[_qp].assign(_num_yf, 0);
182  // _plastic_strain and _intnl are usually sized appropriately because they are stateful, but this
183  // Material may be used from a DiracKernel where stateful materials are not allowed. The best we
184  // can do is:
185  if (_intnl[_qp].size() != _num_intnl)
187 
189 
190  if (_t_step >= 2)
191  _step_one = false;
192 
193  // initially assume an elastic deformation
194  std::copy(_intnl_old[_qp].begin(), _intnl_old[_qp].end(), _intnl[_qp].begin());
195 
196  _iter[_qp] = 0.0;
198  _linesearch_needed[_qp] = 0.0;
199 
200  computeStressParams(stress_new, _trial_sp);
202 
203  if (yieldF(_yf[_qp]) <= _f_tol)
204  {
206  inelastic_strain_increment.zero();
208  tangent_operator = elasticity_tensor;
209  return;
210  }
211 
212  _stress_trial = stress_new;
213  /* The trial stress must be inadmissible
214  * so we need to return to the yield surface. The following
215  * equations must be satisfied.
216  *
217  * 0 = rhs[0] = S[0] - S[0]^trial + ga * E[0, i] * dg/dS[i]
218  * 0 = rhs[1] = S[1] - S[1]^trial + ga * E[1, i] * dg/dS[i]
219  * ...
220  * 0 = rhs[N-1] = S[N-1] - S[N-1]^trial + ga * E[N-1, i] * dg/dS[i]
221  * 0 = rhs[N] = f(S, intnl)
222  *
223  * as well as equations defining intnl parameters as functions of
224  * stress_params, trial_stress_params and intnl_old
225  *
226  * The unknowns are S[0], ..., S[N-1], gaE, and the intnl parameters.
227  * Here gaE = ga * _En (the _En serves to make gaE similar magnitude to S)
228  * I find it convenient to solve the first N+1 equations for p, q and gaE,
229  * while substituting the "intnl parameters" equations into these during the solve process
230  */
231 
232  for (auto & deriv : _dvar_dtrial)
233  deriv.assign(_num_sp, 0.0);
234 
235  preReturnMapV(_trial_sp, stress_new, _intnl_old[_qp], _yf[_qp], elasticity_tensor);
236 
237  setEffectiveElasticity(elasticity_tensor);
238 
239  if (_step_one)
240  std::copy(_definitely_ok_sp.begin(), _definitely_ok_sp.end(), _ok_sp.begin());
241  else
242  computeStressParams(stress_old, _ok_sp);
243  std::copy(_intnl_old[_qp].begin(), _intnl_old[_qp].end(), _ok_intnl.begin());
244 
245  // Return-map problem: must apply the following changes in stress_params,
246  // and find the returned stress_params and gaE
247  for (unsigned i = 0; i < _num_sp; ++i)
248  _del_stress_params[i] = _trial_sp[i] - _ok_sp[i];
249 
250  Real step_taken = 0.0; // amount of del_stress_params that we've applied and the return-map
251  // problem has succeeded
252  Real step_size = 1.0; // potentially can apply del_stress_params in substeps
253  Real gaE_total = 0.0;
254 
255  // In the following sub-stepping procedure it is possible that
256  // the last step is an elastic step, and therefore _smoothed_q won't
257  // be computed on the last step, so we have to compute it.
258  bool smoothed_q_calculated = false;
259 
260  while (step_taken < 1.0 && step_size >= _min_step_size)
261  {
262  if (1.0 - step_taken < step_size)
263  // prevent over-shoots of substepping
264  step_size = 1.0 - step_taken;
265 
266  // trial variables in terms of admissible variables
267  for (unsigned i = 0; i < _num_sp; ++i)
268  _trial_sp[i] = _ok_sp[i] + step_size * _del_stress_params[i];
269 
270  // initialize variables that are to be found via Newton-Raphson
272  Real gaE = 0.0;
273 
274  // flags indicating failure of Newton-Raphson and line-search
275  int nr_failure = 0;
276  int ls_failure = 0;
277 
278  // NR iterations taken in this substep
279  unsigned step_iter = 0;
280 
281  // The residual-squared for the line-search
282  Real res2 = 0.0;
283 
284  if (step_size < 1.0 && yieldF(_trial_sp, _ok_intnl) <= _f_tol)
285  // This is an elastic step
286  // The "step_size < 1.0" in above condition is for efficiency: we definitely
287  // know that this is a plastic step if step_size = 1.0
288  smoothed_q_calculated = false;
289  else
290  {
291  // this is a plastic step
292 
293  // initialize current_sp, gaE and current_intnl based on the non-smoothed situation
295  // and find the smoothed yield function, flow potential and derivatives
297  smoothed_q_calculated = true;
299  res2 = calculateRes2(_rhs);
300 
301  // Perform a Newton-Raphson with linesearch to get current_sp, gaE, and also _smoothed_q
302  while (res2 > _f_tol2 && step_iter < _max_nr_its && nr_failure == 0 && ls_failure == 0)
303  {
304  // solve the linear system and store the answer (the "updates") in rhs
306  if (nr_failure != 0)
307  break;
308 
309  // handle precision loss
310  if (precisionLoss(_rhs, _current_sp, gaE))
311  {
313  {
314  Moose::err << "MultiParameterPlasticityStressUpdate: precision-loss in element "
315  << _current_elem->id() << " quadpoint=" << _qp << ". Stress_params =";
316  for (unsigned i = 0; i < _num_sp; ++i)
317  Moose::err << " " << _current_sp[i];
318  Moose::err << " gaE = " << gaE << "\n";
319  }
320  res2 = 0.0;
321  break;
322  }
323 
324  // apply (parts of) the updates, re-calculate _smoothed_q, and res2
325  ls_failure = lineSearch(res2,
326  _current_sp,
327  gaE,
328  _trial_sp,
329  _smoothed_q,
330  _ok_intnl,
332  _rhs,
334  step_iter++;
335  }
336  }
337  if (res2 <= _f_tol2 && step_iter < _max_nr_its && nr_failure == 0 && ls_failure == 0 &&
338  gaE >= 0.0)
339  {
340  // this Newton-Raphson worked fine, or this was an elastic step
341  std::copy(_current_sp.begin(), _current_sp.end(), _ok_sp.begin());
342  gaE_total += gaE;
343  step_taken += step_size;
345  std::copy(_intnl[_qp].begin(), _intnl[_qp].end(), _ok_intnl.begin());
346  // calculate dp/dp_trial, dp/dq_trial, etc, for Jacobian
347  dVardTrial(!smoothed_q_calculated,
348  _trial_sp,
349  _ok_sp,
350  gaE,
351  _ok_intnl,
352  _smoothed_q,
353  step_size,
354  compute_full_tangent_operator,
355  _dvar_dtrial);
356  if (static_cast<Real>(step_iter) > _iter[_qp])
357  _iter[_qp] = static_cast<Real>(step_iter);
358  if (static_cast<Real>(step_iter) > _max_iter_used[_qp])
359  _max_iter_used[_qp] = static_cast<Real>(step_iter);
360  step_size *= 1.1;
361  }
362  else
363  {
364  // Newton-Raphson + line-search process failed
365  step_size *= 0.5;
366  }
367  }
368 
369  if (step_size < _min_step_size)
370  errorHandler("MultiParameterPlasticityStressUpdate: Minimum step-size violated");
371 
372  // success!
373  finalizeReturnProcess(rotation_increment);
375 
376  if (!smoothed_q_calculated)
378 
380  _stress_trial, _ok_sp, gaE_total, _intnl[_qp], _smoothed_q, elasticity_tensor, stress_new);
381 
383  gaE_total,
384  _smoothed_q,
385  elasticity_tensor,
386  stress_new,
387  inelastic_strain_increment);
388 
389  strain_increment = strain_increment - inelastic_strain_increment;
390  _plastic_strain[_qp] = _plastic_strain_old[_qp] + inelastic_strain_increment;
391 
393  // for efficiency, do not compute the tangent operator if not currently computing Jacobian
395  _trial_sp,
396  stress_new,
397  _ok_sp,
398  gaE_total,
399  _smoothed_q,
400  elasticity_tensor,
401  compute_full_tangent_operator,
402  _dvar_dtrial,
403  tangent_operator);
404 }
yieldAndFlow _smoothed_q
Current values of the yield function, derivatives, etc during updateState.
FEProblemBase & _fe_problem
MaterialProperty< std::vector< Real > > & _yf
yield functions
std::vector< Real > _trial_sp
"Trial" value of stress_params that initializes the return-map process This is derived from stress = ...
virtual void setEffectiveElasticity(const RankFourTensor &Eijkl)=0
Sets _Eij and _En and _Cij.
const bool _warn_about_precision_loss
Output a warning message if precision loss is encountered during the return-map process.
virtual void errorHandler(const std::string &message) const
Performs any necessary cleaning-up, then throw MooseException(message)
virtual void initializeVarsV(const std::vector< Real > &trial_stress_params, const std::vector< Real > &intnl_old, std::vector< Real > &stress_params, Real &gaE, std::vector< Real > &intnl) const
Sets (stress_params, intnl) at "good guesses" of the solution to the Return-Map algorithm.
int lineSearch(Real &res2, std::vector< Real > &stress_params, Real &gaE, const std::vector< Real > &trial_stress_params, yieldAndFlow &smoothed_q, const std::vector< Real > &intnl_ok, std::vector< Real > &intnl, std::vector< Real > &rhs, Real &linesearch_needed) const
Performs a line-search to find stress_params and gaE Upon entry:
const unsigned _num_intnl
Number of internal parameters.
virtual void consistentTangentOperatorV(const RankTwoTensor &stress_trial, const std::vector< Real > &trial_stress_params, const RankTwoTensor &stress, const std::vector< Real > &stress_params, Real gaE, const yieldAndFlow &smoothed_q, const RankFourTensor &Eijkl, bool compute_full_tangent_operator, const std::vector< std::vector< Real >> &dvar_dtrial, RankFourTensor &cto)
Calculates the consistent tangent operator.
virtual void setIntnlValuesV(const std::vector< Real > &trial_stress_params, const std::vector< Real > &current_stress_params, const std::vector< Real > &intnl_old, std::vector< Real > &intnl) const =0
Sets the internal parameters based on the trial values of stress_params, their current values...
std::vector< Real > _ok_intnl
The state (ok_sp, ok_intnl) is known to be admissible.
const Real _f_tol2
Square of the yield-function tolerance.
const Real _min_step_size
In order to help the Newton-Raphson procedure, the applied strain increment may be applied in sub-inc...
int nrStep(const yieldAndFlow &smoothed_q, const std::vector< Real > &trial_stress_params, const std::vector< Real > &stress_params, const std::vector< Real > &intnl, Real gaE, std::vector< Real > &rhs) const
Performs a Newton-Raphson step to attempt to zero rhs Upon return, rhs will contain the solution...
void calculateRHS(const std::vector< Real > &trial_stress_params, const std::vector< Real > &stress_params, Real gaE, const yieldAndFlow &smoothed_q, std::vector< Real > &rhs) const
Calculates the RHS in the following 0 = rhs[0] = S[0] - S[0]^trial + ga * E[0, j] * dg/dS[j] 0 = rhs[...
MaterialProperty< std::vector< Real > > & _intnl
internal parameters
yieldAndFlow smoothAllQuantities(const std::vector< Real > &stress_params, const std::vector< Real > &intnl) const
Calculates all yield functions and derivatives, and then performs the smoothing scheme.
unsigned int _qp
const Real _f_tol
The yield-function tolerance.
const unsigned _num_yf
Number of yield functions.
int & _t_step
const std::vector< Real > _definitely_ok_sp
An admissible value of stress_params at the initial time.
const MaterialProperty< std::vector< Real > > & _intnl_old
old values of internal parameters
RankTwoTensor _stress_trial
"Trial" value of stress that is set at the beginning of the return-map process.
Real deriv(unsigned n, unsigned alpha, unsigned beta, Real x)
virtual void computeStressParams(const RankTwoTensor &stress, std::vector< Real > &stress_params) const =0
Computes stress_params, given stress.
const MaterialProperty< Real > & _max_iter_used_old
Old value of maximum number of Newton-Raphson iterations used in the return-map during the course of ...
Real calculateRes2(const std::vector< Real > &rhs) const
Calculates the residual-squared for the Newton-Raphson + line-search.
virtual void yieldFunctionValuesV(const std::vector< Real > &stress_params, const std::vector< Real > &intnl, std::vector< Real > &yf) const =0
Computes the values of the yield functions, given stress_params and intnl parameters.
MaterialProperty< Real > & _iter
Number of Newton-Raphson iterations used in the return-map.
MaterialProperty< RankTwoTensor > & _plastic_strain
plastic strain
std::vector< Real > _current_intnl
The current values of the internal params during the Newton-Raphson.
virtual void finalizeReturnProcess(const RankTwoTensor &rotation_increment)
Derived classes may use this to perform calculations after the return-map process has completed succe...
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
MaterialProperty< Real > & _linesearch_needed
Whether a line-search was needed in the latest Newton-Raphson process (1 if true, 0 otherwise) ...
std::vector< std::vector< Real > > _dvar_dtrial
d({stress_param[i], gaE})/d(trial_stress_param[j])
virtual void setInelasticStrainIncrementAfterReturn(const RankTwoTensor &stress_trial, Real gaE, const yieldAndFlow &smoothed_q, const RankFourTensor &elasticity_tensor, const RankTwoTensor &returned_stress, RankTwoTensor &inelastic_strain_increment)
Sets inelastic strain increment from the returned configuration This is called after the return-map p...
std::vector< Real > _current_sp
The current values of the stress params during the Newton-Raphson.
bool _step_one
handles case of initial_stress that is inadmissible being supplied
void dVardTrial(bool elastic_only, const std::vector< Real > &trial_stress_params, const std::vector< Real > &stress_params, Real gaE, const std::vector< Real > &intnl, const yieldAndFlow &smoothed_q, Real step_size, bool compute_full_tangent_operator, std::vector< std::vector< Real >> &dvar_dtrial) const
Calculates derivatives of the stress_params and gaE with repect to the trial values of the stress_par...
virtual void setStressAfterReturnV(const RankTwoTensor &stress_trial, const std::vector< Real > &stress_params, Real gaE, const std::vector< Real > &intnl, const yieldAndFlow &smoothed_q, const RankFourTensor &Eijkl, RankTwoTensor &stress) const =0
Sets stress from the admissible parameters.
virtual void preReturnMapV(const std::vector< Real > &trial_stress_params, const RankTwoTensor &stress_trial, const std::vector< Real > &intnl_old, const std::vector< Real > &yf, const RankFourTensor &Eijkl)
Derived classes may employ this function to record stuff or do other computations prior to the return...
MaterialProperty< Real > & _max_iter_used
Maximum number of Newton-Raphson iterations used in the return-map during the course of the entire si...
bool precisionLoss(const std::vector< Real > &solution, const std::vector< Real > &stress_params, Real gaE) const
Check whether precision loss has occurred.
const bool & currentlyComputingJacobian() const
std::vector< Real > _del_stress_params
_del_stress_params = trial_stress_params - ok_sp This is fixed at the beginning of the return-map pro...
const unsigned _max_nr_its
Maximum number of Newton-Raphson iterations allowed in the return-map process.
virtual void initializeReturnProcess()
Derived classes may use this to perform calculations before any return-map process is performed...
const MaterialProperty< RankTwoTensor > & _plastic_strain_old
Old value of plastic strain.
Real yieldF(const std::vector< Real > &stress_params, const std::vector< Real > &intnl) const
Computes the smoothed yield function.
std::vector< Real > _rhs
0 = rhs[0] = S[0] - S[0]^trial + ga * E[0, i] * dg/dS[i] 0 = rhs[1] = S[1] - S[1]^trial + ga * E[1...
const Elem *const & _current_elem
std::vector< Real > _ok_sp
The state (ok_sp, ok_intnl) is known to be admissible, so ok_sp are stress_params that are "OK"...
const unsigned _num_sp
Number of stress parameters.

◆ updateStateSubstep()

template<bool is_ad, typename R2 , typename R4 >
void StressUpdateBaseTempl< is_ad, R2, R4 >::updateStateSubstep ( GR2 ,
GR2 ,
const GR2 ,
GR2 ,
const RankTwoTensor ,
const GR4 ,
const RankTwoTensor ,
bool  compute_full_tangent_operator = false,
RankFourTensor tangent_operator = StressUpdateBaseTempl<is_ad>::_identityTensor 
)
virtualinherited

Similar to the updateState function, this method updates the strain and stress for one substep.

Definition at line 84 of file StressUpdateBase.C.

94 {
95  this->paramError("use_substep",
96  "updateStateSubstep called: it needs to be implemented by your inelastic model");
97 }
void paramError(const std::string &param, Args... args) const

◆ validParams()

InputParameters TwoParameterPlasticityStressUpdate::validParams ( )
static

Definition at line 16 of file TwoParameterPlasticityStressUpdate.C.

Referenced by CappedWeakPlaneStressUpdate::validParams(), and CappedDruckerPragerStressUpdate::validParams().

17 {
19  params.addClassDescription("Return-map and Jacobian algorithms for (P, Q) plastic models");
20  return params;
21 }
void addClassDescription(const std::string &doc_string)

◆ yieldF() [1/2]

Real MultiParameterPlasticityStressUpdate::yieldF ( const std::vector< Real > &  stress_params,
const std::vector< Real > &  intnl 
) const
protectedinherited

Computes the smoothed yield function.

Parameters
stress_paramsThe stress parameters (eg stress_params[0] = stress_zz and stress_params[1] = sqrt(stress_zx^2 + stress_zy^2))
intnlThe internal parameters (eg intnl[0] is shear, intnl[1] is tensile)
Returns
The smoothed yield function value

Definition at line 715 of file MultiParameterPlasticityStressUpdate.C.

Referenced by MultiParameterPlasticityStressUpdate::updateState().

717 {
718  mooseAssert(_yfs_scratch.size() == _num_yf, "_yfs_scratch incorrectly sized in yieldF");
719  yieldFunctionValuesV(stress_params, intnl, _yfs_scratch);
720  return yieldF(_yfs_scratch);
721 }
const unsigned _num_yf
Number of yield functions.
std::vector< Real > _yfs_scratch
values of yield functions in yieldF, to avoid repeatedly allocating/deallocating this vector ...
virtual void yieldFunctionValuesV(const std::vector< Real > &stress_params, const std::vector< Real > &intnl, std::vector< Real > &yf) const =0
Computes the values of the yield functions, given stress_params and intnl parameters.
Real yieldF(const std::vector< Real > &stress_params, const std::vector< Real > &intnl) const
Computes the smoothed yield function.

◆ yieldF() [2/2]

Real MultiParameterPlasticityStressUpdate::yieldF ( const std::vector< Real > &  yfs) const
protectedinherited

Computes the smoothed yield function.

Parameters
yfsThe values of the individual yield functions
Returns
The smoothed yield function value

Definition at line 724 of file MultiParameterPlasticityStressUpdate.C.

725 {
726  Real yf = yfs[0];
727  for (std::size_t i = 1; i < yfs.size(); ++i)
728  if (yf >= yfs[i] + _smoothing_tol)
729  // no smoothing is needed, and yf is the biggest yield function
730  continue;
731  else if (yfs[i] >= yf + _smoothing_tol)
732  // no smoothing is needed, and yfs[i] is the biggest yield function
733  yf = yfs[i];
734  else
735  yf = 0.5 * (yf + yfs[i] + _smoothing_tol) + ismoother(yf - yfs[i]);
736  return yf;
737 }
const Real _smoothing_tol
Smoothing tolerance: edges of the yield surface get smoothed by this amount.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
Real ismoother(Real f_diff) const
Smooths yield functions.

◆ yieldFunctionValues()

virtual void TwoParameterPlasticityStressUpdate::yieldFunctionValues ( Real  p,
Real  q,
const std::vector< Real > &  intnl,
std::vector< Real > &  yf 
) const
protectedpure virtual

Computes the values of the yield functions, given p, q and intnl parameters.

Derived classes must override this, to provide the values of the yield functions in yf.

Parameters
pp stress
qq stress
intnlThe internal parameters
[out]yfThe yield function values

Implemented in CappedDruckerPragerStressUpdate, and CappedWeakPlaneStressUpdate.

Referenced by yieldFunctionValuesV().

◆ yieldFunctionValuesV()

void TwoParameterPlasticityStressUpdate::yieldFunctionValuesV ( const std::vector< Real > &  stress_params,
const std::vector< Real > &  intnl,
std::vector< Real > &  yf 
) const
overrideprotectedvirtual

Computes the values of the yield functions, given stress_params and intnl parameters.

Derived classes must override this, to provide the values of the yield functions in yf.

Parameters
stress_params[in]The stress parameters
intnl[in]The internal parameters
[out]yfThe yield function values

Implements MultiParameterPlasticityStressUpdate.

Definition at line 43 of file TwoParameterPlasticityStressUpdate.C.

46 {
47  const Real p = stress_params[0];
48  const Real q = stress_params[1];
49  yieldFunctionValues(p, q, intnl, yf);
50 }
virtual void yieldFunctionValues(Real p, Real q, const std::vector< Real > &intnl, std::vector< Real > &yf) const =0
Computes the values of the yield functions, given p, q and intnl parameters.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const Real p

Member Data Documentation

◆ _base_name

template<bool is_ad, typename R2 = RankTwoTensor, typename R4 = RankFourTensor>
const std::string StressUpdateBaseTempl< is_ad, R2, R4 >::_base_name
protectedinherited

Name used as a prefix for all material properties related to the stress update model.

Definition at line 191 of file StressUpdateBase.h.

◆ _Cij

std::vector<std::vector<Real> > MultiParameterPlasticityStressUpdate::_Cij
protectedinherited

◆ _current_elem

template<bool is_ad, typename R2 = RankTwoTensor, typename R4 = RankFourTensor>
const Elem *const & Material::_current_elem
inherited

◆ _d2sp_scratch

std::vector<RankFourTensor> TwoParameterPlasticityStressUpdate::_d2sp_scratch
mutableprivate

d2(stress_param[:])/d(stress)/d(stress) used in d2stressparam_dstress to avoid repeatedly allocating/deallocating this vector

Definition at line 353 of file TwoParameterPlasticityStressUpdate.h.

Referenced by consistentTangentOperator().

◆ _definitely_ok_sp

const std::vector<Real> MultiParameterPlasticityStressUpdate::_definitely_ok_sp
protectedinherited

◆ _dgaE_dpt

Real TwoParameterPlasticityStressUpdate::_dgaE_dpt
protected

derivative of Variable with respect to trial variable (used in consistent-tangent-operator calculation)

Definition at line 50 of file TwoParameterPlasticityStressUpdate.h.

Referenced by CappedWeakPlaneCosseratStressUpdate::consistentTangentOperator(), CappedWeakPlaneStressUpdate::consistentTangentOperator(), and consistentTangentOperatorV().

◆ _dgaE_dqt

Real TwoParameterPlasticityStressUpdate::_dgaE_dqt
protected

derivative of Variable with respect to trial variable (used in consistent-tangent-operator calculation)

Definition at line 52 of file TwoParameterPlasticityStressUpdate.h.

Referenced by CappedWeakPlaneCosseratStressUpdate::consistentTangentOperator(), CappedWeakPlaneStressUpdate::consistentTangentOperator(), and consistentTangentOperatorV().

◆ _dp_dpt

Real TwoParameterPlasticityStressUpdate::_dp_dpt
protected

◆ _dp_dqt

Real TwoParameterPlasticityStressUpdate::_dp_dqt
protected

◆ _dq_dpt

Real TwoParameterPlasticityStressUpdate::_dq_dpt
protected

◆ _dq_dqt

Real TwoParameterPlasticityStressUpdate::_dq_dqt
protected

◆ _dsp_scratch

std::vector<RankTwoTensor> TwoParameterPlasticityStressUpdate::_dsp_scratch
mutableprivate

d(stress_param[:])/d(stress) used in dstressparam_dstress to avoid repeatedly allocating/deallocating this vector

Definition at line 341 of file TwoParameterPlasticityStressUpdate.h.

Referenced by consistentTangentOperator().

◆ _dsp_trial_scratch

std::vector<RankTwoTensor> TwoParameterPlasticityStressUpdate::_dsp_trial_scratch
mutableprivate

d(stress_param[:])/d(stress_trial) used in dstressparam_dstress to avoid repeatedly allocating/deallocating this vector

Definition at line 347 of file TwoParameterPlasticityStressUpdate.h.

Referenced by consistentTangentOperator().

◆ _dt

template<bool is_ad, typename R2 = RankTwoTensor, typename R4 = RankFourTensor>
Real & Material::_dt
inherited

◆ _Eij

std::vector<std::vector<Real> > MultiParameterPlasticityStressUpdate::_Eij
protectedinherited

◆ _En

Real MultiParameterPlasticityStressUpdate::_En
protectedinherited

◆ _Epp

Real TwoParameterPlasticityStressUpdate::_Epp
protected

◆ _Eqq

Real TwoParameterPlasticityStressUpdate::_Eqq
protected

◆ _f_tol

const Real MultiParameterPlasticityStressUpdate::_f_tol
protectedinherited

◆ _f_tol2

const Real MultiParameterPlasticityStressUpdate::_f_tol2
protectedinherited

Square of the yield-function tolerance.

Definition at line 164 of file MultiParameterPlasticityStressUpdate.h.

Referenced by MultiParameterPlasticityStressUpdate::updateState().

◆ _identityTensor

template<bool is_ad, typename R2 = RankTwoTensor, typename R4 = RankFourTensor>
RankFourTensor StressUpdateBaseTempl< is_ad, R2, R4 >::_identityTensor
staticprotectedinherited
Initial value:

Definition at line 193 of file StressUpdateBase.h.

◆ _intnl

MaterialProperty<std::vector<Real> >& MultiParameterPlasticityStressUpdate::_intnl
protectedinherited

◆ _intnl_old

const MaterialProperty<std::vector<Real> >& MultiParameterPlasticityStressUpdate::_intnl_old
protectedinherited

◆ _iter

MaterialProperty<Real>& MultiParameterPlasticityStressUpdate::_iter
protectedinherited

Number of Newton-Raphson iterations used in the return-map.

Definition at line 195 of file MultiParameterPlasticityStressUpdate.h.

Referenced by MultiParameterPlasticityStressUpdate::initQpStatefulProperties(), and MultiParameterPlasticityStressUpdate::updateState().

◆ _linesearch_needed

MaterialProperty<Real>& MultiParameterPlasticityStressUpdate::_linesearch_needed
protectedinherited

Whether a line-search was needed in the latest Newton-Raphson process (1 if true, 0 otherwise)

Definition at line 204 of file MultiParameterPlasticityStressUpdate.h.

Referenced by MultiParameterPlasticityStressUpdate::initQpStatefulProperties(), and MultiParameterPlasticityStressUpdate::updateState().

◆ _max_iter_used

MaterialProperty<Real>& MultiParameterPlasticityStressUpdate::_max_iter_used
protectedinherited

Maximum number of Newton-Raphson iterations used in the return-map during the course of the entire simulation.

Definition at line 198 of file MultiParameterPlasticityStressUpdate.h.

Referenced by MultiParameterPlasticityStressUpdate::initQpStatefulProperties(), MultiParameterPlasticityStressUpdate::propagateQpStatefulProperties(), and MultiParameterPlasticityStressUpdate::updateState().

◆ _max_iter_used_old

const MaterialProperty<Real>& MultiParameterPlasticityStressUpdate::_max_iter_used_old
protectedinherited

Old value of maximum number of Newton-Raphson iterations used in the return-map during the course of the entire simulation.

Definition at line 201 of file MultiParameterPlasticityStressUpdate.h.

Referenced by MultiParameterPlasticityStressUpdate::propagateQpStatefulProperties(), and MultiParameterPlasticityStressUpdate::updateState().

◆ _max_nr_its

const unsigned MultiParameterPlasticityStressUpdate::_max_nr_its
protectedinherited

Maximum number of Newton-Raphson iterations allowed in the return-map process.

Definition at line 149 of file MultiParameterPlasticityStressUpdate.h.

Referenced by MultiParameterPlasticityStressUpdate::updateState().

◆ _min_step_size

const Real MultiParameterPlasticityStressUpdate::_min_step_size
protectedinherited

In order to help the Newton-Raphson procedure, the applied strain increment may be applied in sub-increments of size greater than this value.

Definition at line 171 of file MultiParameterPlasticityStressUpdate.h.

Referenced by MultiParameterPlasticityStressUpdate::updateState().

◆ _num_intnl

const unsigned MultiParameterPlasticityStressUpdate::_num_intnl
protectedinherited

◆ _num_pq

constexpr int TwoParameterPlasticityStressUpdate::_num_pq = 2
staticprotected

Number of variables = 2 = (p, q)

Definition at line 35 of file TwoParameterPlasticityStressUpdate.h.

Referenced by d2stressparam_dstress(), and dstressparam_dstress().

◆ _num_sp

const unsigned MultiParameterPlasticityStressUpdate::_num_sp
protectedinherited

◆ _num_yf

const unsigned MultiParameterPlasticityStressUpdate::_num_yf
protectedinherited

◆ _p_trial

Real TwoParameterPlasticityStressUpdate::_p_trial
protected

Trial value of p.

Definition at line 38 of file TwoParameterPlasticityStressUpdate.h.

◆ _perform_finite_strain_rotations

const bool MultiParameterPlasticityStressUpdate::_perform_finite_strain_rotations
protectedinherited

◆ _plastic_strain

MaterialProperty<RankTwoTensor>& MultiParameterPlasticityStressUpdate::_plastic_strain
protectedinherited

◆ _plastic_strain_old

const MaterialProperty<RankTwoTensor>& MultiParameterPlasticityStressUpdate::_plastic_strain_old
protectedinherited

◆ _q_point

template<bool is_ad, typename R2 = RankTwoTensor, typename R4 = RankFourTensor>
const MooseArray< Point > & Material::_q_point
inherited

◆ _q_trial

Real TwoParameterPlasticityStressUpdate::_q_trial
protected

Trial value of q.

Definition at line 41 of file TwoParameterPlasticityStressUpdate.h.

◆ _qp

template<bool is_ad, typename R2 = RankTwoTensor, typename R4 = RankFourTensor>
unsigned int Material::_qp
inherited

◆ _smoothing_tol

const Real MultiParameterPlasticityStressUpdate::_smoothing_tol
protectedinherited

◆ _smoothing_tol2

const Real MultiParameterPlasticityStressUpdate::_smoothing_tol2
protectedinherited

Square of the smoothing tolerance.

Definition at line 158 of file MultiParameterPlasticityStressUpdate.h.

Referenced by MultiParameterPlasticityStressUpdate::ismoother().

◆ _step_one

bool MultiParameterPlasticityStressUpdate::_step_one
protectedinherited

handles case of initial_stress that is inadmissible being supplied

Definition at line 174 of file MultiParameterPlasticityStressUpdate.h.

Referenced by MultiParameterPlasticityStressUpdate::updateState().

◆ _tensor_dimensionality

constexpr unsigned MultiParameterPlasticityStressUpdate::_tensor_dimensionality = 3
staticprotectedinherited

◆ _warn_about_precision_loss

const bool MultiParameterPlasticityStressUpdate::_warn_about_precision_loss
protectedinherited

Output a warning message if precision loss is encountered during the return-map process.

Definition at line 177 of file MultiParameterPlasticityStressUpdate.h.

Referenced by MultiParameterPlasticityStressUpdate::updateState().

◆ _yf

MaterialProperty<std::vector<Real> >& MultiParameterPlasticityStressUpdate::_yf
protectedinherited

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