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/SpectralSolver.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/SpectralSolver.H')
-rw-r--r-- | Source/FieldSolver/SpectralSolver/SpectralSolver.H | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/Source/FieldSolver/SpectralSolver/SpectralSolver.H b/Source/FieldSolver/SpectralSolver/SpectralSolver.H index 6685e489c..8b33707d0 100644 --- a/Source/FieldSolver/SpectralSolver/SpectralSolver.H +++ b/Source/FieldSolver/SpectralSolver/SpectralSolver.H @@ -1,4 +1,4 @@ -/* Copyright 2019-2020 Maxence Thevenet, Remi Lehe +/* Copyright 2019-2020 Maxence Thevenet, Remi Lehe, Edoardo Zoni * * This file is part of WarpX. * @@ -57,14 +57,24 @@ class SpectralSolver */ void pushSpectralFields(); + /** + * \brief Public interface to call the member function ComputeSpectralDivE + * of the base class SpectralBaseAlgorithm from objects of class SpectralSolver + */ + void ComputeSpectralDivE ( const std::array<std::unique_ptr<amrex::MultiFab>,3>& Efield, + amrex::MultiFab& divE ) { + algorithm->ComputeSpectralDivE( field_data, Efield, divE ); + }; + private: - SpectralFieldData field_data; // Store field in spectral space - // and perform the Fourier transforms + + // Store field in spectral space and perform the Fourier transforms + SpectralFieldData field_data; + + // Defines field update equation in spectral space and the associated coefficients. + // SpectralBaseAlgorithm is a base class; this pointer is meant to point + // to an instance of a sub-class defining a specific algorithm std::unique_ptr<SpectralBaseAlgorithm> algorithm; - // Defines field update equation in spectral space, - // and the associated coefficients. - // SpectralBaseAlgorithm is a base class ; this pointer is meant - // to point an instance of a *sub-class* defining a specific algorithm }; #endif // WARPX_USE_PSATD #endif // WARPX_SPECTRAL_SOLVER_H_ |