diff options
Diffstat (limited to 'Source')
-rw-r--r-- | Source/WarpX.H | 22 | ||||
-rw-r--r-- | Source/WarpX.cpp | 46 |
2 files changed, 34 insertions, 34 deletions
diff --git a/Source/WarpX.H b/Source/WarpX.H index d7132f9a1..e6d2beaab 100644 --- a/Source/WarpX.H +++ b/Source/WarpX.H @@ -189,19 +189,19 @@ public: // Algorithms //! Integer that corresponds to the current deposition algorithm (Esirkepov, direct, Vay) - static long current_deposition_algo; + static short current_deposition_algo; //! Integer that corresponds to the charge deposition algorithm (only standard deposition) - static long charge_deposition_algo; + static short charge_deposition_algo; //! Integer that corresponds to the field gathering algorithm (energy-conserving, momentum-conserving) - static long field_gathering_algo; + static short field_gathering_algo; //! Integer that corresponds to the particle push algorithm (Boris, Vay, Higuera-Cary) - static long particle_pusher_algo; + static short particle_pusher_algo; //! Integer that corresponds to the type of Maxwell solver (Yee, CKC, PSATD, ECT) - static int maxwell_solver_id; + static short maxwell_solver_id; /** Records a number corresponding to the load balance cost update strategy * being used (0, 1, 2 corresponding to timers, heuristic, or gpuclock). */ - static long load_balance_costs_update_algo; + static short load_balance_costs_update_algo; static int em_solver_medium; static int macroscopic_solver_algo; static amrex::Vector<int> field_boundary_lo; @@ -224,7 +224,7 @@ public: bool update_with_rho = false; //! perform field communications in single precision - static int do_single_precision_comms; + static bool do_single_precision_comms; //! Whether to fill the guard cells when computing inverse FFTs, based on the boundary conditions static amrex::IntVect fill_guards; @@ -309,7 +309,7 @@ public: //! Set to true if #zmax_plasma_to_compute_max_step is specified, in which case //! the maximum number of iterations is computed automatically so that the lower end of the //! simulation domain along z reaches #zmax_plasma_to_compute_max_step in the boosted frame - static int do_compute_max_step_from_zmax; + static bool do_compute_max_step_from_zmax; static bool do_dynamic_scheduling; static bool refine_plasma; @@ -317,8 +317,8 @@ public: static IntervalsParser sort_intervals; static amrex::IntVect sort_bin_size; - static int do_subcycling; - static int do_multi_J; + static bool do_subcycling; + static bool do_multi_J; static int do_multi_J_n_depositions; static bool do_device_synchronize; @@ -334,7 +334,7 @@ public: static int n_current_deposition_buffer; //! If true, all fields are evaluated on a nodal grid and all MultiFabs have a nodal index type - static int do_nodal; + static bool do_nodal; // Global rho nodal flag to know about rho index type when rho MultiFab is not allocated amrex::IntVect m_rho_nodal_flag; diff --git a/Source/WarpX.cpp b/Source/WarpX.cpp index 222af4833..3069de3a0 100644 --- a/Source/WarpX.cpp +++ b/Source/WarpX.cpp @@ -108,20 +108,20 @@ Real WarpX::quantum_xi_c2 = PhysConst::xi_c2; Real WarpX::gamma_boost = 1._rt; Real WarpX::beta_boost = 0._rt; Vector<int> WarpX::boost_direction = {0,0,0}; -int WarpX::do_compute_max_step_from_zmax = 0; +bool WarpX::do_compute_max_step_from_zmax = false; Real WarpX::zmax_plasma_to_compute_max_step = 0._rt; -long WarpX::current_deposition_algo; -long WarpX::charge_deposition_algo; -long WarpX::field_gathering_algo; -long WarpX::particle_pusher_algo; -int WarpX::maxwell_solver_id; -long WarpX::load_balance_costs_update_algo; -bool WarpX::do_dive_cleaning = 0; -bool WarpX::do_divb_cleaning = 0; +short WarpX::current_deposition_algo; +short WarpX::charge_deposition_algo; +short WarpX::field_gathering_algo; +short WarpX::particle_pusher_algo; +short WarpX::maxwell_solver_id; +short WarpX::load_balance_costs_update_algo; +bool WarpX::do_dive_cleaning = false; +bool WarpX::do_divb_cleaning = false; int WarpX::em_solver_medium; int WarpX::macroscopic_solver_algo; -int WarpX::do_single_precision_comms=0; +bool WarpX::do_single_precision_comms = false; amrex::Vector<int> WarpX::field_boundary_lo(AMREX_SPACEDIM,0); amrex::Vector<int> WarpX::field_boundary_hi(AMREX_SPACEDIM,0); amrex::Vector<ParticleBoundaryType> WarpX::particle_boundary_lo(AMREX_SPACEDIM,ParticleBoundaryType::Absorbing); @@ -181,8 +181,8 @@ Real WarpX::self_fields_absolute_tolerance = 0.0_rt; int WarpX::self_fields_max_iters = 200; int WarpX::self_fields_verbosity = 2; -int WarpX::do_subcycling = 0; -int WarpX::do_multi_J = 0; +bool WarpX::do_subcycling = false; +bool WarpX::do_multi_J = false; int WarpX::do_multi_J_n_depositions; bool WarpX::safe_guard_cells = 0; @@ -191,7 +191,7 @@ IntVect WarpX::filter_npass_each_dir(1); int WarpX::n_field_gather_buffer = -1; int WarpX::n_current_deposition_buffer = -1; -int WarpX::do_nodal = false; +bool WarpX::do_nodal = false; amrex::IntVect m_rho_nodal_flag; int WarpX::do_similar_dm_pml = 1; @@ -796,23 +796,23 @@ WarpX::ReadParameters () // false for FDTD solver, true for PSATD solver. if (maxwell_solver_id != MaxwellSolverAlgo::PSATD) { - do_pml_dive_cleaning = 0; - do_pml_divb_cleaning = 0; + do_pml_dive_cleaning = false; + do_pml_divb_cleaning = false; } else { - do_pml_dive_cleaning = 1; - do_pml_divb_cleaning = 1; + do_pml_dive_cleaning = true; + do_pml_divb_cleaning = true; } - // If WarpX::do_dive_cleaning = 1, set also WarpX::do_pml_dive_cleaning = 1 + // If WarpX::do_dive_cleaning = true, set also WarpX::do_pml_dive_cleaning = true // (possibly overwritten by users in the input file, see query below) - if (do_dive_cleaning) do_pml_dive_cleaning = 1; + if (do_dive_cleaning) do_pml_dive_cleaning = true; - // If WarpX::do_divb_cleaning = 1, set also WarpX::do_pml_divb_cleaning = 1 + // If WarpX::do_divb_cleaning = true, set also WarpX::do_pml_divb_cleaning = true // (possibly overwritten by users in the input file, see query below) // TODO Implement div(B) cleaning in PML with FDTD and remove second if condition - if (do_divb_cleaning && maxwell_solver_id == MaxwellSolverAlgo::PSATD) do_pml_divb_cleaning = 1; + if (do_divb_cleaning && maxwell_solver_id == MaxwellSolverAlgo::PSATD) do_pml_divb_cleaning = true; // Query input parameters to use div(E) and div(B) cleaning in PMLs pp_warpx.query("do_pml_dive_cleaning", do_pml_dive_cleaning); @@ -822,8 +822,8 @@ WarpX::ReadParameters () if (maxwell_solver_id != MaxwellSolverAlgo::PSATD) { AMREX_ALWAYS_ASSERT_WITH_MESSAGE( - do_pml_divb_cleaning == 0, - "warpx.do_pml_divb_cleaning = 1 not implemented for FDTD solver"); + do_pml_divb_cleaning == false, + "warpx.do_pml_divb_cleaning = true not implemented for FDTD solver"); } // Divergence cleaning in PMLs for PSATD solver implemented only |