diff options
author | 2020-02-02 18:38:23 -0800 | |
---|---|---|
committer | 2020-02-02 18:38:23 -0800 | |
commit | 25315be1959c455f189987c24be54c4b30335eaf (patch) | |
tree | 097c8bc09ffa8858271763a8451f3b984fe59aa8 /Source/Particles/ParticleCreation/SmartCopy.cpp | |
parent | 4c840d404339c7accc44cb7be95bb2cbf6ea5221 (diff) | |
download | WarpX-25315be1959c455f189987c24be54c4b30335eaf.tar.gz WarpX-25315be1959c455f189987c24be54c4b30335eaf.tar.zst WarpX-25315be1959c455f189987c24be54c4b30335eaf.zip |
new helper function
Diffstat (limited to 'Source/Particles/ParticleCreation/SmartCopy.cpp')
-rw-r--r-- | Source/Particles/ParticleCreation/SmartCopy.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/Source/Particles/ParticleCreation/SmartCopy.cpp b/Source/Particles/ParticleCreation/SmartCopy.cpp index 88e687503..da5d9a197 100644 --- a/Source/Particles/ParticleCreation/SmartCopy.cpp +++ b/Source/Particles/ParticleCreation/SmartCopy.cpp @@ -1,6 +1,17 @@ #include "SmartCopy.H" -SmartCopyTag getSmartCopyTag (const NameMap& src, const NameMap& dst) +PolicyVec getPolicies (const NameMap& names) noexcept +{ + PolicyVec policies; + policies.resize(names.size()); + for (const auto& kv : names) + { + policies[kv.second] = initialization_policies[kv.first]; + } + return policies; +} + +SmartCopyTag getSmartCopyTag (const NameMap& src, const NameMap& dst) noexcept { SmartCopyTag tag; |