Skip to content

Finds density on a grid for particle data in 3D, with optional convolution

Notifications You must be signed in to change notification settings

christopherlovell/DensityGridder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Density Gridder

Takes 3D particle data and maps on to a density grid, using MPI. Can optionally apply convolution using serial R scripts.

Given a box size lbox, and grid size grid, the gridder finds the density using a Nearest Grid Point assignment scheme.

|---------lbox----------| |-|-|-|-|-|-|-|-|-|-|-|-| <- grid=12

Center of each grid point in each dimension = lbox/grid/2

Configuration

Configuration parameters are contained in config.txt, which now does not need to be set at compile time. The configurable parameters are as follows:

  • INPUT_DIRECTORY: location of input particle files
  • OUTPUT_DIRECTORY: location of output file, with name and extension
  • GRID_DIMS: grid dimensions over which density calculated (grid)
  • SIM_DIMS: size of simulation box along one side (lbox/h)

Compile

To compile gridder.c execute the following in the top level directory.

make clean
make

To run

To run gridder on a SLURM batch system:

sbatch grid_run.sh.

You may need to change the modules depending on your system availability / compiler requirements. To run on the login node you need to load the following modules.

module unload intel_comp
module load gsl
module load openmpi
module load hdf5

mpirun -np 4 gridder.x

About

Finds density on a grid for particle data in 3D, with optional convolution

Resources

Stars

Watchers

Forks

Packages

No packages published