aboutsummaryrefslogtreecommitdiff
path: root/Source/Particles/ParticleCreation/SmartCreate.H
diff options
context:
space:
mode:
Diffstat (limited to 'Source/Particles/ParticleCreation/SmartCreate.H')
-rw-r--r--Source/Particles/ParticleCreation/SmartCreate.H6
1 files changed, 5 insertions, 1 deletions
diff --git a/Source/Particles/ParticleCreation/SmartCreate.H b/Source/Particles/ParticleCreation/SmartCreate.H
index 926168985..957efb2c4 100644
--- a/Source/Particles/ParticleCreation/SmartCreate.H
+++ b/Source/Particles/ParticleCreation/SmartCreate.H
@@ -46,13 +46,17 @@ struct SmartCreate
const int cpu = 0,
const int id = 0) const noexcept
{
- prt.m_aos[i_prt].pos(0) = x;
#if (AMREX_SPACEDIM == 3)
+ prt.m_aos[i_prt].pos(0) = x;
prt.m_aos[i_prt].pos(1) = y;
prt.m_aos[i_prt].pos(2) = z;
#elif (AMREX_SPACEDIM == 2)
+ prt.m_aos[i_prt].pos(0) = x;
prt.m_aos[i_prt].pos(1) = z;
amrex::ignore_unused(y);
+#else
+ prt.m_aos[i_prt].pos(0) = z;
+ amrex::ignore_unused(x,y);
#endif
prt.m_aos[i_prt].cpu() = cpu;