diff --git a/src/pgen/turbulence.cpp b/src/pgen/turbulence.cpp index b825590b..05e2be92 100644 --- a/src/pgen/turbulence.cpp +++ b/src/pgen/turbulence.cpp @@ -361,9 +361,9 @@ void ProblemGenerator(Mesh *pmesh, ParameterInput *pin, MeshData *md) { // Create new particles and get accessor auto new_particles_context = swarm->AddEmptyParticles(num_tracers_per_block); - auto &x = swarm->Get("x").Get(); - auto &y = swarm->Get("y").Get(); - auto &z = swarm->Get("z").Get(); + auto &x = swarm->Get(swarm_position::x::name()).Get(); + auto &y = swarm->Get(swarm_position::y::name()).Get(); + auto &z = swarm->Get(swarm_position::z::name()).Get(); auto &id = swarm->Get("id").Get(); auto swarm_d = swarm->GetDeviceContext(); diff --git a/src/tracers/tracers.cpp b/src/tracers/tracers.cpp index 88759b32..352361bc 100644 --- a/src/tracers/tracers.cpp +++ b/src/tracers/tracers.cpp @@ -115,9 +115,9 @@ TaskStatus AdvectTracers(MeshBlockData *mbd, const Real dt) { auto &sd = pmb->swarm_data.Get(); auto &swarm = sd->Get("tracers"); - auto &x = swarm->Get("x").Get(); - auto &y = swarm->Get("y").Get(); - auto &z = swarm->Get("z").Get(); + auto &x = swarm->Get(swarm_position::x::name()).Get(); + auto &y = swarm->Get(swarm_position::y::name()).Get(); + auto &z = swarm->Get(swarm_position::z::name()).Get(); auto &vel_x = swarm->Get("vel_x").Get(); auto &vel_y = swarm->Get("vel_y").Get(); auto &vel_z = swarm->Get("vel_z").Get(); @@ -212,9 +212,9 @@ TaskStatus FillTracers(MeshData *md, parthenon::SimTime &tm) { // TODO(pgrete) cleanup once get swarm packs (currently in development upstream) // pull swarm vars - auto &x = swarm->Get("x").Get(); - auto &y = swarm->Get("y").Get(); - auto &z = swarm->Get("z").Get(); + auto &x = swarm->Get(swarm_position::x::name()).Get(); + auto &y = swarm->Get(swarm_position::y::name()).Get(); + auto &z = swarm->Get(swarm_position::z::name()).Get(); auto &vel_x = swarm->Get("vel_x").Get(); auto &vel_y = swarm->Get("vel_y").Get(); auto &vel_z = swarm->Get("vel_z").Get();