From 694251dc951ec11592a07bd775e4d3964e99ea76 Mon Sep 17 00:00:00 2001 From: Axel Huebl Date: Mon, 5 Jun 2023 23:23:52 -0700 Subject: [PATCH] Ascent: SoA Particle Support Add support for pure SoA layouted particle containers for Ascent. --- Src/Extern/Conduit/AMReX_Conduit_Blueprint.H | 5 ++--- .../Conduit/AMReX_Conduit_Blueprint_ParticlesI.H | 14 ++++++-------- 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/Src/Extern/Conduit/AMReX_Conduit_Blueprint.H b/Src/Extern/Conduit/AMReX_Conduit_Blueprint.H index 6d23bcf07ed..7ac9fa96820 100644 --- a/Src/Extern/Conduit/AMReX_Conduit_Blueprint.H +++ b/Src/Extern/Conduit/AMReX_Conduit_Blueprint.H @@ -96,9 +96,8 @@ namespace amrex // coordset and fields used to represent the passed particle container. // This allows you to use unique names to wrap multiple particle containers // into a single blueprint tree. - template - void ParticleContainerToBlueprint (const ParticleContainer + void ParticleContainerToBlueprint (const ParticleContainer &pc, const Vector &real_comp_names, diff --git a/Src/Extern/Conduit/AMReX_Conduit_Blueprint_ParticlesI.H b/Src/Extern/Conduit/AMReX_Conduit_Blueprint_ParticlesI.H index 9b8c0a2c108..496c4328322 100644 --- a/Src/Extern/Conduit/AMReX_Conduit_Blueprint_ParticlesI.H +++ b/Src/Extern/Conduit/AMReX_Conduit_Blueprint_ParticlesI.H @@ -20,10 +20,9 @@ namespace amrex // Note: // This is a helper function, it's not part of the AMReX Blueprint Interface. //---------------------------------------------------------------------------// -template +template void -ParticleTileToBlueprint(const ParticleTile, +ParticleTileToBlueprint(const ParticleTile &ptile, const Vector &real_comp_names, @@ -32,7 +31,7 @@ ParticleTileToBlueprint(const ParticleTile); + int struct_size = ParticleType::is_soa_particle ? 0 : sizeof(ParticleType); // knowing the above, we can zero copy the x,y,z positions + id, cpu // and any user fields in the AOS @@ -193,10 +192,9 @@ ParticleTileToBlueprint(const ParticleTile +template void -ParticleContainerToBlueprint(const ParticleContainer &pc, const Vector &real_comp_names, @@ -220,7 +218,7 @@ ParticleContainerToBlueprint(const ParticleContainer; + using MyParConstIter = ParConstIter; // // blueprint expects unique ids for each domain published