GithubHelp home page GithubHelp logo

lewissmccallum / cmacionize Goto Github PK

View Code? Open in Web Editor NEW

This project forked from bwvdnbro/cmacionize

0.0 0.0 1.0 56.08 MB

C++ Monte Carlo photoionization and radiation hydrodynamics code.

Home Page: https://bwvdnbro.github.io/CMacIonize/

License: GNU Affero General Public License v3.0

Shell 0.01% C++ 91.17% Python 6.27% C 0.15% Fortran 0.37% CMake 2.03%

cmacionize's Introduction

Automated build and unit tests

CMacIonize

C++ Monte Carlo photoionization and radiation hydrodynamics code.

Compilation

First, clone the repository using

git clone https://github.com/bwvdnbro/CMacIonize.git

This creates a new folder named CMacIonize. Enter this folder and create a new build folder:

cd CMacIonize
mkdir build

Enter the build folder and call CMake:

cd build
cmake ..

Now compile the program using make.

Documentation can be generated using make doc.

Unit tests can be run using make check.

A number of benchmark problems is provided in the folder build/rundir/benchmark. Each benchmark problem consists of at least a parameter file that can be used to run the benchmark, and a .txt file containing some more information about the benchmark problem.

Dependencies

The only thing you need to compile and run CMacIonize is the CMake build system and a C++ compiler. However, some plugins for reading and writing files require the HDF5 library as well. The CMake build system automatically tries to locate a working HDF5 installation on your system. If this fails, the program will still compile, but the following functionality will not work:

  • reading a density field from a Gadget snapshot file
  • reading a density field from a FLASH snapshot file
  • reading ionizing sources from a Gadget snapshot file
  • writing Gadget output files. Since this is currently the only supported output format, this means output will not work, and the program is in fact useless.

To install the HDF5 (development) libraries on a Linux system, use

sudo apt-get install libhdf5-dev

On Mac OS X, the easiest way to install the HDF5 (development) libraries is a manual installation. Get the latest HDF5 release tarball from the HDF5 website (make sure to choose a distribution with UNIX line endings). Extract the tarball in a folder of choice, and configure and build the program:

./configure
make
make install

Depending on where the HDF5 library is installed, you might need to tell CMake where to find HDF5: locate the folder containing libhdf5.so (or similar). This folder should be named lib, and should be part of a parent folder that also contains folders named include and bin. You should set the environment variable HDF5_ROOT to the name of this folder:

export HDF5_ROOT=/name/of/the/folder

Check the messages generated when you run CMake, as it will tell you whether or not a working HDF5 development installation was found.

CMacIonize uses Doxygen to generate code documentation, but this is in no way necessary to compile or run the program. CMake will automatically try to find a Doxygen installation. If it finds one, you can generate documentation using make doc. If not, make doc will not work.

Some scripts used for analyzing benchmark results, or for writing files used by the unit tests, require Python, and the numpy, matplotlib and h5py libraries. However, all files that are necessary for the unit tests are also included in the repository (even if the scripts to generate them are), so it is still possible to compile and run the code without Python.

Documentation

The CMacIonize code contains a full inline documentation using Doxygen. A recent version of this documentation is available from an online mirror. A small number of online tutorials is available from the CMacIonize webpage. Other sources of documentation include:

Support

If you have any issues obtaining, compiling or running the code, please consult the wiki or the online tutorials, or let us know by email ([email protected]). A Slack workspace is available for regular users and contributors upon invitation. Try to use github issue were applicable to

cmacionize's People

Contributors

bwvdnbro avatar mapetkova avatar dhannaway avatar nsartorio avatar

Forkers

georgemhendry

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.