Skip to content

Commit

Permalink
MueLu: fix compiler warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
mayrmt committed Oct 12, 2021
1 parent ffaeb3f commit 222aeb7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion packages/muelu/src/MueCentral/MueLu_Hierarchy_decl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ namespace MueLu {
appropriate \c ConvergenceStatus
*/
ConvergenceStatus IsConverged(const Teuchos::Array<MagnitudeType>& residualNorm,
const Scalar convergenceTolerance) const;
const MagnitudeType convergenceTolerance) const;

//! Print \c residualNorm for this \c iteration to the screen
void PrintResidualHistory(const LO iteration,
Expand Down
6 changes: 3 additions & 3 deletions packages/muelu/src/MueCentral/MueLu_Hierarchy_def.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -918,7 +918,7 @@ namespace MueLu {

// Print residual information before iterating
typedef Teuchos::ScalarTraits<typename STS::magnitudeType> STM;
MagnitudeType prevNorm = STM::one(), curNorm = STM::one();
MagnitudeType prevNorm = STM::one();
rate_ = 1.0;
if (IsCalculationOfResidualRequired(startLevel, conv))
ComputeResidualAndPrintHistory(*A, X, B, Teuchos::ScalarTraits<LO>::zero(), startLevel, conv, prevNorm);
Expand Down Expand Up @@ -1570,11 +1570,11 @@ bool Hierarchy<Scalar, LocalOrdinal, GlobalOrdinal, Node>::IsCalculationOfResidu

template <class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node>
ConvergenceStatus Hierarchy<Scalar, LocalOrdinal, GlobalOrdinal, Node>::IsConverged(
const Teuchos::Array<MagnitudeType>& residualNorm, const Scalar convergenceTolerance) const
const Teuchos::Array<MagnitudeType>& residualNorm, const MagnitudeType convergenceTolerance) const
{
ConvergenceStatus convergenceStatus = ConvergenceStatus::Undefined;

if (convergenceTolerance > 0)
if (convergenceTolerance > Teuchos::ScalarTraits<MagnitudeType>::zero())
{
bool passed = true;
for (LO k = 0; k < residualNorm.size(); k++)
Expand Down

0 comments on commit 222aeb7

Please sign in to comment.