aboutsummaryrefslogtreecommitdiff
path: root/Source/Particles/ParticleCreation/SmartCopy.cpp
diff options
context:
space:
mode:
authorGravatar atmyers <atmyers2@gmail.com> 2020-02-02 18:38:23 -0800
committerGravatar atmyers <atmyers2@gmail.com> 2020-02-02 18:38:23 -0800
commit25315be1959c455f189987c24be54c4b30335eaf (patch)
tree097c8bc09ffa8858271763a8451f3b984fe59aa8 /Source/Particles/ParticleCreation/SmartCopy.cpp
parent4c840d404339c7accc44cb7be95bb2cbf6ea5221 (diff)
downloadWarpX-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.cpp13
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;