Skip to content

Commit

Permalink
HYPRE: Fix issues with hypre IJ interface (#1495)
Browse files Browse the repository at this point in the history
This commit fixes two issues with the hypre IJ interface

- Fixes a memory leak in HypreIJIface as it was calling parse_inputs in constructor
- Sets default number of iterations and tolerance for BoomerAMG when used as a preconditioner
  • Loading branch information
sayerhs authored Nov 2, 2020
1 parent f29a0c9 commit db23e83
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Src/Extern/HYPRE/AMReX_HypreIJIface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,6 @@ HypreIJIface::HypreIJIface(
HYPRE_IJVectorCreate(m_comm, m_ilower, m_iupper, &m_sln);
HYPRE_IJVectorSetObjectType(m_sln, HYPRE_PARCSR);
HYPRE_IJVectorInitialize(m_sln);

parse_inputs();
}

HypreIJIface::~HypreIJIface()
Expand Down Expand Up @@ -225,6 +223,8 @@ void HypreIJIface::boomeramg_precond_configure(const std::string& prefix)
hpp("bamg_verbose", HYPRE_BoomerAMGSetPrintLevel);
hpp("bamg_logging", HYPRE_BoomerAMGSetLogging);

hpp("bamg_max_iterations", HYPRE_BoomerAMGSetMaxIter, 1);
hpp("bamg_precond_tolerance", HYPRE_BoomerAMGSetTol, 0.0);
hpp("bamg_coarsen_type", HYPRE_BoomerAMGSetCoarsenType, 6);
hpp("bamg_cycle_type", HYPRE_BoomerAMGSetCycleType, 1);
hpp("bamg_relax_type", HYPRE_BoomerAMGSetRelaxType, 6);
Expand Down

0 comments on commit db23e83

Please sign in to comment.