-
Notifications
You must be signed in to change notification settings - Fork 42
Add support for uint64 swarm vars and add default ids #1253
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
687ce9b
6dc5f50
4cdd285
0b58e65
1c1d524
4bf23a7
4e3d65b
c535fb0
bae2800
61f35da
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -30,8 +30,10 @@ | |
| #include "bvals/comms/bvals_in_one.hpp" | ||
| #include "config.hpp" | ||
| #include "globals.hpp" | ||
| #include "interface/metadata.hpp" | ||
| #include "interface/update.hpp" | ||
| #include "kokkos_abstraction.hpp" | ||
| #include "pack/swarm_default_names.hpp" | ||
| #include "prolong_restrict/prolong_restrict.hpp" | ||
|
|
||
| using namespace parthenon::driver::prelude; | ||
|
|
@@ -146,10 +148,12 @@ std::shared_ptr<StateDescriptor> Initialize(ParameterInput *pin) { | |
|
|
||
| // Add swarm of tracer particles | ||
| std::string swarm_name = "tracers"; | ||
| Metadata swarm_metadata({Metadata::Provides, Metadata::None}); | ||
| // `NoPersistentParticleIds` is just passed to test this aspect in the regression tests. | ||
| // For typical tracers, persistent ids are pretty important. | ||
| Metadata swarm_metadata( | ||
| {Metadata::Provides, Metadata::None, Metadata::NoPersistentParticleIds}); | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why is the
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I made this change to test the |
||
| pkg->AddSwarm(swarm_name, swarm_metadata); | ||
| Metadata real_swarmvalue_metadata({Metadata::Real}); | ||
| pkg->AddSwarmValue("id", swarm_name, Metadata({Metadata::Integer})); | ||
|
|
||
| pkg->EstimateTimestepBlock = EstimateTimestepBlock; | ||
|
|
||
|
|
@@ -372,7 +376,6 @@ void ProblemGenerator(MeshBlock *pmb, ParameterInput *pin) { | |
| auto &x = swarm->Get<Real>(swarm_position::x::name()).Get(); | ||
| auto &y = swarm->Get<Real>(swarm_position::y::name()).Get(); | ||
| auto &z = swarm->Get<Real>(swarm_position::z::name()).Get(); | ||
| auto &id = swarm->Get<int>("id").Get(); | ||
|
|
||
| auto swarm_d = swarm->GetDeviceContext(); | ||
| pmb->par_for( | ||
|
|
@@ -390,7 +393,6 @@ void ProblemGenerator(MeshBlock *pmb, ParameterInput *pin) { | |
|
|
||
| y(n) = y_min + rng_gen.drand() * (y_max - y_min); | ||
| z(n) = z_min + rng_gen.drand() * (z_max - z_min); | ||
| id(n) = num_tracers * gid + n; | ||
|
|
||
| rng_pool.free_state(rng_gen); | ||
| }); | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does the use still have to request that
idbe output?