diff --git a/include/materials/ComputeMultipleInelasticDamageStress.h b/include/materials/ComputeMultipleInelasticDamageStress.h index a450a7ea..8a9a3a74 100644 --- a/include/materials/ComputeMultipleInelasticDamageStress.h +++ b/include/materials/ComputeMultipleInelasticDamageStress.h @@ -25,6 +25,7 @@ class ComputeMultipleInelasticDamageStress : public ComputeMultipleInelasticStre static InputParameters validParams(); ComputeMultipleInelasticDamageStress(const InputParameters & parameters); virtual void initialSetup() override; + protected: /// damage parameter for DamagePlasticityStressUpdate model const MaterialProperty & _D; diff --git a/include/materials/DamagePlasticityStressUpdate.h b/include/materials/DamagePlasticityStressUpdate.h index 92f5435c..e8b47c5a 100644 --- a/include/materials/DamagePlasticityStressUpdate.h +++ b/include/materials/DamagePlasticityStressUpdate.h @@ -134,7 +134,7 @@ class DamagePlasticityStressUpdate : public MultiParameterPlasticityStressUpdate /** * Obtain the partial derivative of the compressive strength to the damage state * @param intnl (Array containing damage states in tension and compression, respectively) - * @return value of dfc + * @return value of dfc */ Real dfc(const std::vector & intnl) const; @@ -143,7 +143,7 @@ class DamagePlasticityStressUpdate : public MultiParameterPlasticityStressUpdate * It is defined in terms of tensile strength, compressive strength, and another * dimensionless constant alpha (See Eqn. 37 in Lee (1998)) * @param intnl (Array containing damage states in tension and compression, respectively) - * @return value of beta + * @return value of beta */ Real beta(const std::vector & intnl) const; diff --git a/src/materials/ComputeMultipleInelasticDamageStress.C b/src/materials/ComputeMultipleInelasticDamageStress.C index 55b712b2..bfd2e133 100644 --- a/src/materials/ComputeMultipleInelasticDamageStress.C +++ b/src/materials/ComputeMultipleInelasticDamageStress.C @@ -35,12 +35,13 @@ ComputeMultipleInelasticDamageStress::ComputeMultipleInelasticDamageStress( { } -void +void ComputeMultipleInelasticDamageStress::initialSetup() { ComputeMultipleInelasticStress::initialSetup(); if (_models.size() != 1) - paramError("ComputeMultipleInelasticDamageStress currently can only have one model specified in 'inelastic_models'"); + paramError("ComputeMultipleInelasticDamageStress currently can only have one model specified " + "in 'inelastic_models'"); if (!dynamic_cast(_models[0])) paramError("Model " + _models[0]->name() + " is not a DamagePlasticityStressUpdate object"); } diff --git a/test/tests/damage_plasticity_model/tests b/test/tests/damage_plasticity_model/tests index 69315936..5ac05b4a 100644 --- a/test/tests/damage_plasticity_model/tests +++ b/test/tests/damage_plasticity_model/tests @@ -52,6 +52,28 @@ allow_test_objects = True cli_args = 'Outputs/file_base=shear_test_out' detail = ' in shear loading.' + [] + [error_message_check] + requirement = 'Blackbear shall produce an error message when input required for the inelastic_models are not properly set by user:' + [inelastic_models_name] + type = 'RunException' + input = 'uniaxial_test.i' + cli_args = "Materials/stress/inelastic_models='perfect_plasticity'" + expect_err = "Model perfect_plasticity is not a DamagePlasticityStressUpdate object" + allow_test_objects = True + detail = "When inelastic_models is not given as damage_plasticity_model" + [] + [] + + [inelastic_models_size] + type = 'RunException' + input = 'uniaxial_test.i' + cli_args = "Materials/stress/inelastic_models='damage_plasticity_model perfect_plasticity'" + expect_err = "ComputeMultipleInelasticDamageStress currently can only have one model specified in 'inelastic_models'" + allow_test_objects = True + detail = "When inelastic_models has more than one model as input" + [] + [] [] diff --git a/test/tests/damage_plasticity_model/uniaxial_test.i b/test/tests/damage_plasticity_model/uniaxial_test.i index 7540c93f..ea502acc 100644 --- a/test/tests/damage_plasticity_model/uniaxial_test.i +++ b/test/tests/damage_plasticity_model/uniaxial_test.i @@ -222,8 +222,6 @@ [] [stress] type = ComputeMultipleInelasticDamageStress -# The following line is for error testing -# inelastic_models = 'damage_plasticity_model perfect_plasticity' inelastic_models = 'damage_plasticity_model' perform_finite_strain_rotations = false []