diff --git a/Docs/sphinx_doc/Inputs.rst b/Docs/sphinx_doc/Inputs.rst index faaf43adf..f84e5180a 100644 --- a/Docs/sphinx_doc/Inputs.rst +++ b/Docs/sphinx_doc/Inputs.rst @@ -183,7 +183,7 @@ List of Parameters | Parameter | Definition | Acceptable | Default | | | | Values | | +===============================+=================+=================+=============+ -| **erf.grid_stretching_ratio** | scaling factor | Real > 0 | 0 (no grid | +| **erf.grid_stretching_ratio** | scaling factor | Real > 1 | 0 (no grid | | | applied to | | stretching) | | | delta z at each | | | | | level | | | diff --git a/Source/DataStructs/DataStruct.H b/Source/DataStructs/DataStruct.H index abf87a276..80e684ef1 100644 --- a/Source/DataStructs/DataStruct.H +++ b/Source/DataStructs/DataStruct.H @@ -46,9 +46,11 @@ struct SolverChoice { pp.query("use_terrain", use_terrain); pp.query("grid_stretching_ratio", grid_stretching_ratio); - AMREX_ASSERT_WITH_MESSAGE((grid_stretching_ratio >= 0.), - "The grid stretching ratio must be greater than 0"); - if (grid_stretching_ratio > 0) { + if (grid_stretching_ratio != 0) { + AMREX_ASSERT_WITH_MESSAGE((grid_stretching_ratio >= 1.), + "The grid stretching ratio must be greater than 1"); + } + if (grid_stretching_ratio >= 1) { if (!use_terrain) { amrex::Print() << "Turning terrain on to enable grid stretching" << std::endl; use_terrain = true;