Skip to content
Snippets Groups Projects
Commit d62c845b authored by James Willis's avatar James Willis
Browse files

Only use the total number of DM particles to calculate the linking length.

parent 5e02e24d
No related branches found
No related tags found
1 merge request!578Swift velociraptor
......@@ -89,7 +89,8 @@ void velociraptor_init(struct engine *e) {
message("G: %e", unit_info.gravity);
message("H: %e", unit_info.hubbleunit);
const int total_nr_gparts = e->total_nr_gparts;
/* TODO: Find the total number of DM particles when running with star particles and BHs. */
const int total_nr_dmparts = e->total_nr_gparts - e->total_nr_parts;
/* Set simulation information. */
if(e->s->periodic) {
......@@ -97,7 +98,7 @@ void velociraptor_init(struct engine *e) {
}
else sim_info.period = 0.0;
sim_info.zoomhigresolutionmass = -1.0; /* Placeholder. */
sim_info.interparticlespacing = sim_info.period / pow(total_nr_gparts, 1./3.);
sim_info.interparticlespacing = sim_info.period / pow(total_nr_dmparts, 1./3.);
sim_info.icosmologicalsim = (e->policy & engine_policy_cosmology);
sim_info.spacedimension[0] = unit_info.lengthtokpc * s->dim[0];
sim_info.spacedimension[1] = unit_info.lengthtokpc * s->dim[1];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment