Obtaining the Code
CosmicGrain is open-source for all scientific purposes.
Repository
Status: Active
Clone command
https://github.com/ezbird/CosmicGrain.git
Requirements
- GADGET-4-compatible build environment
- MPI compiler
- HDF5
- GSL
- FFTW, if required by the selected configuration
Notes on Porting CosmicGrain to other Codes
In short, it's quite possible though admittedly not as convenient as it could be. The bulk of the dust code is in one file (src/dust/dust.cc). All the neighbor-finding which CosmicGrain currently uses to locate the nearest gas, star, and dust particles as necessary is in the spatial hash (src/cooling_sfr/spatial_hash_zoom.h/cc). Codes that use trees or other algorithms would replace this.The integration points for dust-related things are scattered across a number of Gadget-4 files, including run.cc, domain.cc, snap_io.cc, kicks.cc, feedback.cc, subfind_excursionset.cc, and timestep.cc.
Main aspects that would need attention:
- the DustP[] parallel array that stores the dust data
- the time bin synchronization
- the spatial hash or tree for neighbor finding \
- the SUBFIND integration (or equivalent)