aboutsummaryrefslogtreecommitdiff
path: root/Source/FieldSolver/SpectralSolver/SpectralAlgorithms/SpectralBaseAlgorithm.cpp
diff options
context:
space:
mode:
authorGravatar Prabhat Kumar <89051199+prkkumar@users.noreply.github.com> 2021-12-08 15:27:38 -0800
committerGravatar GitHub <noreply@github.com> 2021-12-08 23:27:38 +0000
commit583c78e563f7a74e89fb49ff77c7a93c0baaad78 (patch)
treeaf71f27e07f68a26bc64bacfed976d64c8c7bf0b /Source/FieldSolver/SpectralSolver/SpectralAlgorithms/SpectralBaseAlgorithm.cpp
parent6577874ae22634fee907fe9180080f7e6998afa1 (diff)
downloadWarpX-583c78e563f7a74e89fb49ff77c7a93c0baaad78.tar.gz
WarpX-583c78e563f7a74e89fb49ff77c7a93c0baaad78.tar.zst
WarpX-583c78e563f7a74e89fb49ff77c7a93c0baaad78.zip
Replace AMREX_SPACEDIM: Evolve & FieldSolver (#2642)
* AMREX_SPACEDIM : Boundary Conditions * AMREX_SPACEDIM : Parallelization * Fix compilation * AMREX_SPACEDIM : Initialization * Fix Typo * space * AMREX_SPACEDIM : Particles * AMREX_SPACEDIM : Evolve and FieldSolver
Diffstat (limited to 'Source/FieldSolver/SpectralSolver/SpectralAlgorithms/SpectralBaseAlgorithm.cpp')
-rw-r--r--Source/FieldSolver/SpectralSolver/SpectralAlgorithms/SpectralBaseAlgorithm.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/Source/FieldSolver/SpectralSolver/SpectralAlgorithms/SpectralBaseAlgorithm.cpp b/Source/FieldSolver/SpectralSolver/SpectralAlgorithms/SpectralBaseAlgorithm.cpp
index 92e3fcf94..4ecbb9000 100644
--- a/Source/FieldSolver/SpectralSolver/SpectralAlgorithms/SpectralBaseAlgorithm.cpp
+++ b/Source/FieldSolver/SpectralSolver/SpectralAlgorithms/SpectralBaseAlgorithm.cpp
@@ -37,14 +37,14 @@ SpectralBaseAlgorithm::SpectralBaseAlgorithm(const SpectralKSpace& spectral_kspa
m_spectral_index(spectral_index),
// Compute and assign the modified k vectors
modified_kx_vec(spectral_kspace.getModifiedKComponent(dm,0,norder_x,nodal)),
-#if (AMREX_SPACEDIM==3)
+#if defined(WARPX_DIM_3D)
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)
+#if !defined(WARPX_DIM_3D)
amrex::ignore_unused(norder_y);
#endif
}
@@ -77,7 +77,7 @@ SpectralBaseAlgorithm::ComputeSpectralDivE (
Array4<Complex> fields = field_data.fields[mfi].array();
// Extract pointers for the k vectors
const Real* modified_kx_arr = modified_kx_vec[mfi].dataPtr();
-#if (AMREX_SPACEDIM==3)
+#if defined(WARPX_DIM_3D)
const Real* modified_ky_arr = modified_ky_vec[mfi].dataPtr();
#endif
const Real* modified_kz_arr = modified_kz_vec[mfi].dataPtr();
@@ -92,7 +92,7 @@ SpectralBaseAlgorithm::ComputeSpectralDivE (
const Complex Ez = fields(i,j,k,Idx.Ez);
// k vector values
const Real kx = modified_kx_arr[i];
-#if (AMREX_SPACEDIM==3)
+#if defined(WARPX_DIM_3D)
const Real ky = modified_ky_arr[j];
const Real kz = modified_kz_arr[k];
#else