Skip to content

Commit

Permalink
Fix memory backing for density_source
Browse files Browse the repository at this point in the history
Sometimes get surprising results because a value in the state
is modified while sharing data with a local field.
  • Loading branch information
bendudson committed Nov 5, 2024
1 parent 03f9b48 commit 05e1fb0
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/evolve_density.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,7 @@ void EvolveDensity::transform(Options& state) {
} else {
final_source = source;
}
final_source.allocate(); // Ensure unique memory storage.
add(species["density_source"], final_source);
}

Expand Down

0 comments on commit 05e1fb0

Please sign in to comment.