Skip to content

Commit

Permalink
Merge pull request #109 from fastpm/write_deltar
Browse files Browse the repository at this point in the history
write_deltar
  • Loading branch information
adrianbayer committed Oct 18, 2023
2 parents 886de0f + 4416258 commit 0685b5a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
6 changes: 6 additions & 0 deletions src/fastpm.c
Original file line number Diff line number Diff line change
Expand Up @@ -670,6 +670,12 @@ prepare_cdm(FastPMSolver * fastpm, RunData * prr, double a0, MPI_Comm comm)
fastpm_info("Writing fourier space linear field to %s\n", CONF(prr->lua, write_lineark));
write_complex(fastpm->lptpm, delta_k, CONF(prr->lua, write_lineark), "LinearDensityK", prr->cli->Nwriters);
}
if(CONF(prr->lua, write_linearr)) {
fastpm_info("Writing real space linear field to %s\n", CONF(prr->lua, write_linearr));
pm_c2r(fastpm->lptpm, delta_k);
write_complex(fastpm->lptpm, delta_k, CONF(prr->lua, write_linearr), "LinearDensityR", prr->cli->Nwriters);
pm_r2c(fastpm->lptpm, delta_k, delta_k);
}

if(CONF(prr->lua, write_powerspectrum)) {
FastPMPowerSpectrum ps;
Expand Down
3 changes: 2 additions & 1 deletion src/lua-runtime-fastpm.lua
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,8 @@ function schema.read_whitenoisek.action (read_whitenoisek)
end
end

schema.declare{name='write_lineark', type='string'}
schema.declare{name='write_linearr', type='string', help='Write linear field ICs in real space'}
schema.declare{name='write_lineark', type='string', help='Write linear field ICs in Fourier space'}
schema.declare{name='write_whitenoisek', type='string'}
schema.declare{name='write_runpbic', type='string'}
schema.declare{name='write_powerspectrum', type='string'}
Expand Down

0 comments on commit 0685b5a

Please sign in to comment.