diff options
Diffstat (limited to 'Source/FieldSolver/SpectralSolver/SpectralFieldData.H')
-rw-r--r-- | Source/FieldSolver/SpectralSolver/SpectralFieldData.H | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/Source/FieldSolver/SpectralSolver/SpectralFieldData.H b/Source/FieldSolver/SpectralSolver/SpectralFieldData.H index 2c5a45faa..db3979796 100644 --- a/Source/FieldSolver/SpectralSolver/SpectralFieldData.H +++ b/Source/FieldSolver/SpectralSolver/SpectralFieldData.H @@ -20,10 +20,12 @@ // Declare type for spectral fields using SpectralField = amrex::FabArray< amrex::BaseFab <Complex> >; -/** Index for the regular fields, when stored in spectral space */ +/** Index for the regular fields, when stored in spectral space: + * - n_fields is automatically the total number of fields + * - divE reuses the memory slot for Bx, since Bx is not used when computing divE + */ struct SpectralFieldIndex { - enum { Ex=0, Ey, Ez, Bx, By, Bz, Jx, Jy, Jz, rho_old, rho_new, n_fields }; - // n_fields is automatically the total number of fields + enum { Ex=0, Ey, Ez, Bx, By, Bz, Jx, Jy, Jz, rho_old, rho_new, n_fields, divE=3 }; }; /** Index for the PML fields, when stored in spectral space */ |