diff options
author | 2020-02-27 11:17:56 -0800 | |
---|---|---|
committer | 2020-02-27 11:17:56 -0800 | |
commit | 51e866e9a3f450d7767df97b0a2011cf65857c7a (patch) | |
tree | dd92e1108085a6d5f43039691cc39884230a7fb7 /Source/FieldSolver/SpectralSolver/SpectralFieldData.H | |
parent | 6b345e38a9e312f2352c13b1e8e58399944d2798 (diff) | |
download | WarpX-51e866e9a3f450d7767df97b0a2011cf65857c7a.tar.gz WarpX-51e866e9a3f450d7767df97b0a2011cf65857c7a.tar.zst WarpX-51e866e9a3f450d7767df97b0a2011cf65857c7a.zip |
Implement div(E) diagnostics for spectral case (#720)
* Implement div(E) diagnostics for spectral case.
* split travis tests in bigger matrix
* split more TravisCI tests, add electrostatic, use defaults values
* typo
* Move computation of div(E) to base class SpectralBaseAlgorithm.
* need to split psatd too
* consistent variable names and use function to avoid duplication
* fix typo for qed tests
* typo
* also need to update run_tests.sg
* Update copyright tags.
* change matrix
* Add test of div(E) vs rho/epsilon_0 in PML test.
* SpectralFieldIndex: reuse memory slot for Bx when computing divE.
Co-authored-by: MaxThevenet <mthevenet@lbl.gov>
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 */ |