diff options
author | 2020-07-10 00:38:56 -0700 | |
---|---|---|
committer | 2020-07-10 00:38:56 -0700 | |
commit | e53b3a3188166c4bed6448b288986ef310b2b5e7 (patch) | |
tree | e061ba2065626dd76f7d2cb299afba91d6fad1a7 /Source/FieldSolver/SpectralSolver/SpectralAlgorithms/AvgGalileanAlgorithm.cpp | |
parent | b39c2e8296f6629122a706fb3c05a0d21e1585fa (diff) | |
download | WarpX-e53b3a3188166c4bed6448b288986ef310b2b5e7.tar.gz WarpX-e53b3a3188166c4bed6448b288986ef310b2b5e7.tar.zst WarpX-e53b3a3188166c4bed6448b288986ef310b2b5e7.zip |
Fix compilation of AvgGalilean for GPU (#1159)
Diffstat (limited to 'Source/FieldSolver/SpectralSolver/SpectralAlgorithms/AvgGalileanAlgorithm.cpp')
-rw-r--r-- | Source/FieldSolver/SpectralSolver/SpectralAlgorithms/AvgGalileanAlgorithm.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/Source/FieldSolver/SpectralSolver/SpectralAlgorithms/AvgGalileanAlgorithm.cpp b/Source/FieldSolver/SpectralSolver/SpectralAlgorithms/AvgGalileanAlgorithm.cpp index 1369bb2e9..1ddcd6758 100644 --- a/Source/FieldSolver/SpectralSolver/SpectralAlgorithms/AvgGalileanAlgorithm.cpp +++ b/Source/FieldSolver/SpectralSolver/SpectralAlgorithms/AvgGalileanAlgorithm.cpp @@ -11,7 +11,7 @@ AvgGalileanAlgorithm::AvgGalileanAlgorithm(const SpectralKSpace& spectral_kspace const int norder_z, const bool nodal, const amrex::Array<amrex::Real,3>& v_galilean, const Real dt) - // Initialize members of base classinde + // Initialize members of base class : SpectralBaseAlgorithm( spectral_kspace, dm, norder_x, norder_y, norder_z, nodal ) { @@ -44,6 +44,17 @@ AvgGalileanAlgorithm::AvgGalileanAlgorithm(const SpectralKSpace& spectral_kspace Rhonew_coef = SpectralComplexCoefficients(ba, dm, 1, 0); Jcoef_coef = SpectralComplexCoefficients(ba, dm, 1, 0); + InitializeSpectralCoefficients(spectral_kspace, dm, v_galilean, dt); + +} + +void AvgGalileanAlgorithm::InitializeSpectralCoefficients( + const SpectralKSpace& spectral_kspace, + const amrex::DistributionMapping& dm, + const Array<Real, 3>& v_galilean, + const amrex::Real dt) +{ + const BoxArray& ba = spectral_kspace.spectralspace_ba; // Fill them with the right values: // Loop over boxes and allocate the corresponding coefficients // for each box owned by the local MPI proc |