- Notifications
You must be signed in to change notification settings - Fork0
Fortran Code for Grid Projected Kernel Density Estimation From Multidimensional Particle Distributions
License
upc-ghs/gpkde
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Fortran Code for Grid Projected Kernel Density Estimation of Discrete Particle Distributions
The program performs Grid Projected Kernel Density Estimation (GPKDE) of a discrete dataset in one, two or three dimensional domains and is parallelized with the OpenMP library.
It works as a standalone program by reading an input simulation file, which configures the loading of a source file with data points and additional parameters for defining the reconstruction grid and the optimization for bandwidth selection.
Clone the repository
git clone https://github.com/upc-ghs/gpkde.git
Repository includes two makefiles at the foldermake
:
Makefile
: for thegfortran
compiler, with compilation verified forgfortran>=8.4.0
.Makefile-ifort
: for theifort
compiler, with compilation verified forifort@2021.9.0
.
Note: The preprocessor variable-DREAL32
can be added to the compiler flags in order to build with single precision floating point. Compilation via makefiles create the foldermake/objtemp
. It is recommended to remove this folder while developing source code or integrating program changes for a consistent compilation.
The project can also be built with themeson build system:
- Setup the project configuration
meson setup builddir -Ddebug=false --prefix=$(pwd) --libdir=bin
- Compile
meson install -C builddir
- Basic tests
meson test --verbose --no-rebuild -C builddir
Note: For building with single precision floating point, the option--Dreal32=true
can be given to the setup instruction.
The foldermsvs
contains the project and solution files verified for Visual Studio 2019 and 2022 on a Windows system. An executable file and complementarydll
's providing the OpenMP library are available at the folderwbin/
. Users can make easy use of these files at a system level by extending thePATH
environment variable, adding their specific address to thewbin/
folder (ashere orhere).
The necessarydll
's can also be installed from the Intel and Visual Studio redistributables (x64
), respectively:
Note: The windows executablegpkdesp.exe
is built with single precision floating point (/DREAL32
) which requires less memory specially for large three dimensional problems. This option is enabled by default in the Visual Studio solution/project files and can be disabled by modifying the project properties, leaving empty the fieldProject>Properties>Fortran>Preprocessor>Preprocessor Definitions
. The executablegpkde.exe
is built with double precision floating point.
Some basic command line arguments have been implemented in order to control program execution. These can be requested as help with the instructiongpkde --help
orgpkde -h
, which displays the following message in console:
GPKDE version *.*.* Program compiled Apr 12 2023 19:44:24 with GFORTRAN compiler (ver. *.*.*) Fortran code for Grid Projected Kernel Density Estimation of discrete particle distributionsusage: gpkde [options] simfileoptions: -h --help Show this message -l <str> --logname <str> Write program logs to <str> -nl --nolog Do not write log file -np <int> --nprocs <int> Run with <int> processes -p --parallel Run in parallel -v --version Show program version For bug reports and updates, follow: https://github.com/upc-ghs/gpkde
For details about the configuration of input files please refer to the programDocumentation.
A set of possible use cases of the reconstruction module are included as example files in this repository. The currently available simulations include:
MIT License