Skip to content

Commit

Permalink
Remove unused method
Browse files Browse the repository at this point in the history
  • Loading branch information
loganharbour committed Apr 21, 2021
1 parent 40ec7c4 commit d584ba2
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 46 deletions.
11 changes: 0 additions & 11 deletions framework/include/interfaces/PostprocessorInterface.h
Expand Up @@ -94,17 +94,6 @@ class PostprocessorInterface
bool isDefaultPostprocessorValue(const std::string & param_name,
const unsigned int index = 0) const;

/**
* Get the default value associated with a Postprocessor parameter.
* You should check isDefaultPostprocessorValue to verify that the parameter
* is a default value before calling this method.
* @param param_name The name of the Postprocessor parameter
* @param index The index of the postprocessor
* @return The default value
*/
PostprocessorValue getDefaultPostprocessorValue(const std::string & param_name,
const unsigned int index = 0) const;

/**
* Determine if the Postprocessor data exists
* @param param_name The name of the Postprocessor parameter
Expand Down
17 changes: 0 additions & 17 deletions framework/src/interfaces/PostprocessorInterface.C
Expand Up @@ -85,23 +85,6 @@ PostprocessorInterface::isDefaultPostprocessorValueByName(const PostprocessorNam
return (ss >> real_value && ss.eof());
}

PostprocessorValue
PostprocessorInterface::getDefaultPostprocessorValue(const std::string & param_name,
const unsigned int index /* = 0 */) const
{
const auto & name = getPostprocessorNameInternal(param_name, index);

if (!isDefaultPostprocessorValueByName(name))
_ppi_moose_object.mooseError(
"When getting the default Postprocessor value for parameter \"",
param_name,
"\" at index ",
index,
",\nthe parameter does not represent a default Postprocessor value.");

return getDefaultPostprocessorValueByName(name);
}

PostprocessorValue
PostprocessorInterface::getDefaultPostprocessorValueByName(const PostprocessorName & name) const
{
Expand Down
6 changes: 0 additions & 6 deletions test/src/kernels/DefaultPostprocessorDiffusion.C
Expand Up @@ -20,18 +20,12 @@ DefaultPostprocessorDiffusion::validParams()
0.1,
"The name of the postprocessor we are going to use, if the name is not "
"found a default value of 0.1 is utlized for the postprocessor value");
params.addParam<bool>("test_default_error",
false,
"Set this to true to test the getDefaultPostprocessorValue error message");
return params;
}

DefaultPostprocessorDiffusion::DefaultPostprocessorDiffusion(const InputParameters & parameters)
: Kernel(parameters), _pps_value(getPostprocessorValue("pps_name"))
{
// Test the error message for defaultPostprocessorValue
if (getParam<bool>("test_default_error"))
getDefaultPostprocessorValue("pps_name");
}

Real
Expand Down
12 changes: 0 additions & 12 deletions test/tests/postprocessors/default_value/tests
Expand Up @@ -22,16 +22,4 @@
detail = 'or when that value is supplied in the input file.'
[]
[]

[default_error]
type = 'RunException'
input = 'default_value.i'
cli_args = 'Kernels/diff/test_default_error=true
Kernels/diff/pps_name=constant
Postprocessors/constant/type=FunctionValuePostprocessor
Postprocessors/constant/function=0'
expect_err = 'When getting the default Postprocessor value for parameter "pps_name" at index 0,.*the parameter does not represent a default Postprocessor value.'

requirement = 'The system shall report an error when a request for a non-existant default Postprocessor value is made.'
[]
[]

0 comments on commit d584ba2

Please sign in to comment.