diff --git a/docs/source/run/parameters.rst b/docs/source/run/parameters.rst index bc72103d45..1bf4f72fc8 100644 --- a/docs/source/run/parameters.rst +++ b/docs/source/run/parameters.rst @@ -161,6 +161,9 @@ Explicit solver parameters * ``hipace.MG_tolerance_abs`` (`float`) optional (default `0.`) Absolute error tolerance of the AMReX multigrid solver. +* ``hipace.MG_verbose`` (`int`) optional (default `0`) + Level of verbosity of the AMReX multigrid solver. + Plasma parameters ----------------- diff --git a/src/Hipace.H b/src/Hipace.H index 0f1e3fd36f..f8b4ce3ccb 100644 --- a/src/Hipace.H +++ b/src/Hipace.H @@ -268,6 +268,8 @@ public: static amrex::Real m_MG_tolerance_rel; /** Absolute tolerance for the multigrid solver, when using the explicit solver */ static amrex::Real m_MG_tolerance_abs; + /** Level of verbosity for the MG solver */ + static int m_MG_verbose; /** Adaptive time step instance */ AdaptiveTimeStep m_adaptive_time_step; /** GridCurrent instance */ diff --git a/src/Hipace.cpp b/src/Hipace.cpp index 6798436249..fca1de50c5 100644 --- a/src/Hipace.cpp +++ b/src/Hipace.cpp @@ -45,6 +45,7 @@ amrex::Real Hipace::m_external_Ez_slope = 0.; amrex::Real Hipace::m_external_Ez_uniform = 0.; amrex::Real Hipace::m_MG_tolerance_rel = 1.e-4; amrex::Real Hipace::m_MG_tolerance_abs = 0.; +int Hipace::m_MG_verbose = 0; #ifdef AMREX_USE_GPU bool Hipace::m_do_tiling = false; #else @@ -130,6 +131,7 @@ Hipace::Hipace () : queryWithParser(pph, "MG_tolerance_rel", m_MG_tolerance_rel); queryWithParser(pph, "MG_tolerance_abs", m_MG_tolerance_abs); + queryWithParser(pph, "MG_verbose", m_MG_verbose); queryWithParser(pph, "do_tiling", m_do_tiling); #ifdef AMREX_USE_GPU AMREX_ALWAYS_ASSERT_WITH_MESSAGE(m_do_tiling==0, "Tiling must be turned off to run on GPU."); @@ -802,6 +804,7 @@ Hipace::ExplicitSolveBxBy (const int lev) amrex::LinOpBCType::Dirichlet)}); m_mlmg = std::make_unique(*m_mlalaplacian); + m_mlmg->setVerbose(m_MG_verbose); } // BxBy is assumed to have at least one ghost cell in x and y.