From 03b2fe60ff49748aaff8402824ea0457eef24d5c Mon Sep 17 00:00:00 2001 From: Edoardo Zoni <59625522+EZoni@users.noreply.github.com> Date: Wed, 8 Mar 2023 20:52:56 -0800 Subject: New user input for grid type (collocated, staggered, hybrid) (#3683) * Introduce `warpx.grid_type` parameter * Replace `or` with `||` * Update examples with new user input syntax * Fix `if` condition * Improve error message * Fix `if` condition * Fix bugs * Fix warning * Fix RZ * Debugging * Fix RZ * Fix bug * Clean up * More changes: - set default algo parameters with hybrid grid - all hybrid input parameters under warpx name * Set default field gathering algo for hybrid grids * Update documentation --- Source/FieldSolver/FiniteDifferenceSolver/FiniteDifferenceSolver.H | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Source/FieldSolver/FiniteDifferenceSolver/FiniteDifferenceSolver.H') diff --git a/Source/FieldSolver/FiniteDifferenceSolver/FiniteDifferenceSolver.H b/Source/FieldSolver/FiniteDifferenceSolver/FiniteDifferenceSolver.H index ed6f918b3..aecf4ed9e 100644 --- a/Source/FieldSolver/FiniteDifferenceSolver/FiniteDifferenceSolver.H +++ b/Source/FieldSolver/FiniteDifferenceSolver/FiniteDifferenceSolver.H @@ -39,12 +39,12 @@ class FiniteDifferenceSolver * * \param fdtd_algo Identifies the chosen algorithm, as defined in WarpXAlgorithmSelection.H * \param cell_size Cell size along each dimension, for the chosen refinement level - * \param do_nodal Whether the solver is applied to a nodal or staggered grid + * \param grid_type Whether the solver is applied to a collocated or staggered grid */ FiniteDifferenceSolver ( int const fdtd_algo, std::array cell_size, - bool const do_nodal ); + short const grid_type ); void EvolveB ( std::array< std::unique_ptr, 3 >& Bfield, std::array< std::unique_ptr, 3 > const& Efield, @@ -132,7 +132,7 @@ class FiniteDifferenceSolver private: int m_fdtd_algo; - bool m_do_nodal; + short m_grid_type; #ifdef WARPX_DIM_RZ amrex::Real m_dr, m_rmin; -- cgit v1.2.3