Skip to content

Commit

Permalink
Handle cases when 'NEWTON' is not a valid solve_type
Browse files Browse the repository at this point in the history
  • Loading branch information
aeslaughter committed May 17, 2019
1 parent f45e5c2 commit e7f35ab
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
3 changes: 1 addition & 2 deletions framework/include/utils/MooseEnumBase.h
Expand Up @@ -84,7 +84,7 @@ class MooseEnumBase
/**
* Return the complete set of available flags.
*/
const std::set<MooseEnumItem> & items() { return _items; }
const std::set<MooseEnumItem> & items() const { return _items; }

///@{
/**
Expand Down Expand Up @@ -137,4 +137,3 @@ class MooseEnumBase
/// Flag to enable enumeration items not previously defined
bool _allow_out_of_range;
};

3 changes: 2 additions & 1 deletion framework/src/actions/CreateExecutionerAction.C
Expand Up @@ -64,7 +64,8 @@ void
CreateExecutionerAction::setupAutoPreconditioning()
{
// If using NEWTON then automatically create SingleMatrixPreconditioner object with full=true
if (_moose_object_pars.get<MooseEnum>("solve_type") == "NEWTON")
const MooseEnum & solve_type = _moose_object_pars.get<MooseEnum>("solve_type");
if ((solve_type.find("NEWTON") != solve_type.items().end()) && (solve_type == "NEWTON"))
{
// Action Parameters
InputParameters params = _action_factory.getValidParams("SetupPreconditionerAction");
Expand Down

0 comments on commit e7f35ab

Please sign in to comment.