Skip to content

Commit

Permalink
Merge pull request #4265 from mfem/dgmass-int-fix
Browse files Browse the repository at this point in the history
Use int instead or real_t for iter_max in dgmass
  • Loading branch information
tzanio committed May 18, 2024
2 parents 64142d9 + 91a0179 commit 514e98a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions fem/dgmassinv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ void DGMassInverse::SetRelTol(const real_t rel_tol_) { rel_tol = rel_tol_; }

void DGMassInverse::SetAbsTol(const real_t abs_tol_) { abs_tol = abs_tol_; }

void DGMassInverse::SetMaxIter(const real_t max_iter_) { max_iter = max_iter_; }
void DGMassInverse::SetMaxIter(const int max_iter_) { max_iter = max_iter_; }

void DGMassInverse::Update()
{
Expand Down Expand Up @@ -137,7 +137,7 @@ void DGMassInverse::DGMassCGIteration(const Vector &b_, Vector &u_) const

const real_t RELTOL = rel_tol;
const real_t ABSTOL = abs_tol;
const real_t MAXIT = max_iter;
const int MAXIT = max_iter;
const bool IT_MODE = iterative_mode;
const bool CHANGE_BASIS = (d2q != nullptr);

Expand Down
2 changes: 1 addition & 1 deletion fem/dgmassinv.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ class DGMassInverse : public Solver
/// Set the absolute tolerance.
void SetAbsTol(const real_t abs_tol_);
/// Set the maximum number of iterations.
void SetMaxIter(const real_t max_iter_);
void SetMaxIter(const int max_iter_);
/// Recompute operator and preconditioner (when coefficient or mesh changes).
void Update();

Expand Down

0 comments on commit 514e98a

Please sign in to comment.