From 51e866e9a3f450d7767df97b0a2011cf65857c7a Mon Sep 17 00:00:00 2001 From: Edoardo Zoni <59625522+EZoni@users.noreply.github.com> Date: Thu, 27 Feb 2020 11:17:56 -0800 Subject: 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 --- .../SpectralSolver/SpectralAlgorithms/SpectralBaseAlgorithm.H | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'Source/FieldSolver/SpectralSolver/SpectralAlgorithms/SpectralBaseAlgorithm.H') diff --git a/Source/FieldSolver/SpectralSolver/SpectralAlgorithms/SpectralBaseAlgorithm.H b/Source/FieldSolver/SpectralSolver/SpectralAlgorithms/SpectralBaseAlgorithm.H index 2487eae78..743d6d1c7 100644 --- a/Source/FieldSolver/SpectralSolver/SpectralAlgorithms/SpectralBaseAlgorithm.H +++ b/Source/FieldSolver/SpectralSolver/SpectralAlgorithms/SpectralBaseAlgorithm.H @@ -1,4 +1,4 @@ -/* Copyright 2019 Remi Lehe +/* Copyright 2019 Remi Lehe, Edoardo Zoni * * This file is part of WarpX. * @@ -31,6 +31,13 @@ class SpectralBaseAlgorithm // calls the subclass's destructor. virtual ~SpectralBaseAlgorithm() {}; + /** + * \brief Compute spectral divergence of E + */ + void ComputeSpectralDivE ( SpectralFieldData& field_data, + const std::array,3>& Efield, + amrex::MultiFab& divE ); + protected: // Meant to be used in the subclasses using SpectralRealCoefficients = \ -- cgit v1.2.3