ARTEMIS
GuardCellManager.H
Go to the documentation of this file.
1 /* Copyright 2019-2020 Maxence Thevenet
2  *
3  * This file is part of WarpX.
4  *
5  * License: BSD-3-Clause-LBNL
6  */
7 #ifndef GUARDCELLMANAGER_H_
8 #define GUARDCELLMANAGER_H_
9 
10 #include <AMReX_Array.H>
11 #include <AMReX_IntVect.H>
12 #include <AMReX_REAL.H>
13 #include <AMReX_RealVect.H>
14 #include <AMReX_Vector.H>
15 
21 
22 public:
23 
53  void Init(
54  const amrex::Real dt,
55  const amrex::RealVect dx,
56  const bool do_subcycling,
57  const bool do_fdtd_nci_corr,
58  const short grid_type,
59  const bool do_moving_window,
60  const int moving_window_dir,
61  const int nox,
62  const int nox_fft, const int noy_fft, const int noz_fft,
63  const int nci_corr_stencil,
64  const int electromagnetic_solver_id,
65  const int max_level,
66  const amrex::Vector<amrex::Real> v_galilean,
67  const amrex::Vector<amrex::Real> v_comoving,
68  const bool safe_guard_cells,
69  const int do_multi_J,
70  const bool fft_do_time_averaging,
71  const bool do_pml,
72  const int do_pml_in_domain,
73  const int pml_ncell,
74  const amrex::Vector<amrex::IntVect>& ref_ratios,
75  const bool use_filter,
76  const amrex::IntVect& bilinear_filter_stencil_length);
77 
78  // Guard cells allocated for MultiFabs E and B
80  // Guard cells allocated for MultiFab J
82  // Guard cells allocated for MultiFab Rho
84  // Guard cells allocated for MultiFab F
86  // Guard cells allocated for MultiFab G
88 
89  // Guard cells exchanged for specific parts of the PIC loop
90 
91  // Number of guard cells of E and B that must exchanged before Field Solver
93  // Number of guard cells of F that must exchanged before Field Solver
95  // Number of guard cells of G that must be exchanged before Field Solver
97  // Number of guard cells of E and B that must exchanged before Field Gather
99  // Number of guard cells of E and B that must exchanged before updating the Aux grid
101  // Number of guard cells of all MultiFabs that must exchanged before moving window
103  // Number of guard cells of E and B that are exchanged immediatly after the main PSATD push
105 
106  // Number of guard cells for local deposition of J and rho
109 };
110 
111 #endif // GUARDCELLMANAGER_H_
AMREX_GPU_HOST_DEVICE static AMREX_FORCE_INLINE constexpr IntVectND< dim > TheZeroVector() noexcept
This class computes and stores the number of guard cells needed for the allocation of the MultiFabs a...
Definition: GuardCellManager.H:20
amrex::IntVect ng_alloc_G
Definition: GuardCellManager.H:87
amrex::IntVect ng_afterPushPSATD
Definition: GuardCellManager.H:104
amrex::IntVect ng_MovingWindow
Definition: GuardCellManager.H:102
amrex::IntVect ng_FieldSolver
Definition: GuardCellManager.H:92
amrex::IntVect ng_depos_rho
Definition: GuardCellManager.H:108
amrex::IntVect ng_depos_J
Definition: GuardCellManager.H:107
amrex::IntVect ng_FieldSolverF
Definition: GuardCellManager.H:94
amrex::IntVect ng_alloc_F
Definition: GuardCellManager.H:85
amrex::IntVect ng_alloc_EB
Definition: GuardCellManager.H:79
amrex::IntVect ng_FieldSolverG
Definition: GuardCellManager.H:96
amrex::IntVect ng_alloc_J
Definition: GuardCellManager.H:81
amrex::IntVect ng_UpdateAux
Definition: GuardCellManager.H:100
amrex::IntVect ng_FieldGather
Definition: GuardCellManager.H:98
void Init(const amrex::Real dt, const amrex::RealVect dx, const bool do_subcycling, const bool do_fdtd_nci_corr, const short grid_type, const bool do_moving_window, const int moving_window_dir, const int nox, const int nox_fft, const int noy_fft, const int noz_fft, const int nci_corr_stencil, const int electromagnetic_solver_id, const int max_level, const amrex::Vector< amrex::Real > v_galilean, const amrex::Vector< amrex::Real > v_comoving, const bool safe_guard_cells, const int do_multi_J, const bool fft_do_time_averaging, const bool do_pml, const int do_pml_in_domain, const int pml_ncell, const amrex::Vector< amrex::IntVect > &ref_ratios, const bool use_filter, const amrex::IntVect &bilinear_filter_stencil_length)
Initialize number of guard cells depending on the options used.
Definition: GuardCellManager.cpp:34
amrex::IntVect ng_alloc_Rho
Definition: GuardCellManager.H:83
int nox
Definition: stencil.py:442
int dx
Definition: stencil.py:436
int dt
Definition: stencil.py:440