Skip to content

Commit

Permalink
Use raw pointer rather than cast
Browse files Browse the repository at this point in the history
  • Loading branch information
aeslaughter committed May 17, 2019
1 parent 932a467 commit 4e7d2df
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion framework/include/systems/NonlinearSystemBase.h
Expand Up @@ -400,7 +400,7 @@ class NonlinearSystemBase : public SystemBase,
* @param pc The preconditioner to be set
*/
void setPreconditioner(std::shared_ptr<MoosePreconditioner> pc);
const std::shared_ptr<const MoosePreconditioner> getPreconditioner() const;
MoosePreconditioner const * getPreconditioner() const;

/**
* If called with true this system will use a finite differenced form of
Expand Down
2 changes: 1 addition & 1 deletion framework/src/outputs/ConsoleUtils.C
Expand Up @@ -263,7 +263,7 @@ outputExecutionInformation(const MooseApp & app, FEProblemBase & problem)
if (!pc_desc.empty())
oss << std::setw(console_field_width) << " PETSc Preconditioner: " << pc_desc << '\n';

const std::shared_ptr<const MoosePreconditioner> mpc =
MoosePreconditioner const * mpc =
problem.getNonlinearSystemBase().getPreconditioner();
if (mpc)
{
Expand Down
4 changes: 2 additions & 2 deletions framework/src/systems/NonlinearSystemBase.C
Expand Up @@ -2923,10 +2923,10 @@ NonlinearSystemBase::setPreconditioner(std::shared_ptr<MoosePreconditioner> pc)
_preconditioner = pc;
}

const std::shared_ptr<const MoosePreconditioner>
MoosePreconditioner const *
NonlinearSystemBase::getPreconditioner() const
{
return std::dynamic_pointer_cast<const MoosePreconditioner>(_preconditioner);
return _preconditioner.get();
}

void
Expand Down

0 comments on commit 4e7d2df

Please sign in to comment.