Skip to content

Commit

Permalink
added code for RZ case (mainly var name handlings)
Browse files Browse the repository at this point in the history
  • Loading branch information
guj committed Nov 2, 2023
1 parent 56ac633 commit c19ebdd
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Source/Diagnostics/FlushFormats/warpxWriter.H
Original file line number Diff line number Diff line change
Expand Up @@ -295,14 +295,15 @@ AMReX_warpxWriter::SavePosId_RZ(PIt& pti,
[](amrex::ParticleReal const *p){ delete[] p; }
);
for (auto i=0; i<numParticleOnTile; i++) {
auto const r = aos[i].pos(0); // {0: "r", 1: "z"}
x.get()[i] = r * std::cos(theta[i]);
y.get()[i] = r * std::sin(theta[i]);
auto const r = aos[i].pos(0); // {0: "r", 1: "z"}
x.get()[i] = r * std::cos(theta[i]);
y.get()[i] = r * std::sin(theta[i]);
}
currSpecies["position"]["x"].storeChunk(x, {offset}, {numParticleOnTile64});
currSpecies["position"]["y"].storeChunk(y, {offset}, {numParticleOnTile64});
}
}
SaveSpecieId(pti, currSpecies, offset);
#else
SavePosId(pti, currSpecies, offset);
#endif
Expand Down

0 comments on commit c19ebdd

Please sign in to comment.