From 0b6ddad4ce039277025b80ba81ff2692b3a80724 Mon Sep 17 00:00:00 2001 From: Luca Fedeli Date: Fri, 25 Jun 2021 04:34:32 +0200 Subject: Use "Include What You Use" on WarpX (#1947) * initial tests with IWYU * added a couple of forward declarations * used iwyu on more files * progress * used iwyu on more files * progress with iwyu * progress with iwyu * fixed bug * progress with iwyu * progress with IWYU * progress with IWYU * fixed bug * fixed bug * progress with IWYU * progress with IWYU + use forward declarations in WarpX.H * first try with .def files * fix bugs * progress with IWYU * progress with IWYU * progress with iwyu * correct copyright * fixed bug * fixed bugs * fix missing include * fixed bug * fix bug * fix bug introduced during last bugfix * use iwyu on newly added files * add space * fix bug * fix missing include * fix missing include * fix missing include * fixed bugs * fixed bug * attempt at fixing issue with math functions * added missing include * fixed missing include * using _fwd.H * fixed bug * progress with iwyu * update AMReX branch * enforce alphabetic order * progress with iwyu * use right version of amrex * use right version of amrex for tests * fixed bug * fix another bug * fix missing include * fix missing include * fix missing include * updated amrex * initial work to document new include strategy * updated documentation * Fix rst & private includes * Remove accidentially added files * Fix rst code blocks * one more rst block Co-authored-by: Axel Huebl --- .../SpectralAlgorithms/SpectralBaseAlgorithm.H | 33 +++++++++++----------- 1 file changed, 16 insertions(+), 17 deletions(-) (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 598046042..624d7870c 100644 --- a/Source/FieldSolver/SpectralSolver/SpectralAlgorithms/SpectralBaseAlgorithm.H +++ b/Source/FieldSolver/SpectralSolver/SpectralAlgorithms/SpectralBaseAlgorithm.H @@ -8,9 +8,19 @@ #define WARPX_SPECTRAL_BASE_ALGORITHM_H_ #include "FieldSolver/SpectralSolver/SpectralKSpace.H" -#include "FieldSolver/SpectralSolver/SpectralFieldData.H" +#include "Utils/WarpX_Complex.H" -#include +#include "FieldSolver/SpectralSolver/SpectralFieldData_fwd.H" + +#include +#include +#include +#include + +#include + +#include +#include #if WARPX_USE_PSATD @@ -75,24 +85,13 @@ class SpectralBaseAlgorithm using SpectralComplexCoefficients = \ amrex::FabArray< amrex::BaseFab >; - // Constructor + /** + * \brief Constructor + */ SpectralBaseAlgorithm(const SpectralKSpace& spectral_kspace, const amrex::DistributionMapping& dm, const int norder_x, const int norder_y, - const int norder_z, const bool nodal) - // Compute and assign the modified k vectors - : modified_kx_vec(spectral_kspace.getModifiedKComponent(dm,0,norder_x,nodal)), -#if (AMREX_SPACEDIM==3) - modified_ky_vec(spectral_kspace.getModifiedKComponent(dm,1,norder_y,nodal)), - modified_kz_vec(spectral_kspace.getModifiedKComponent(dm,2,norder_z,nodal)) -#else - modified_kz_vec(spectral_kspace.getModifiedKComponent(dm,1,norder_z,nodal)) -#endif - { -#if (AMREX_SPACEDIM!=3) - amrex::ignore_unused(norder_y); -#endif - } + const int norder_z, const bool nodal); // Modified finite-order vectors KVectorComponent modified_kx_vec; -- cgit v1.2.3