Skip to content

Demeter is a modern deterministic neutron transport solver for reactor simulations.

License

Notifications You must be signed in to change notification settings

kennethassogba/Demeter

Repository files navigation

Demeter

Demeter1 is a modern and open source deterministic neutron transport code for reactor simulations. The code is designed to perform 3D fixe source and eigenvalue calculations by solving the multi-group neutron transport equation.

The physics is coded in C++, with Python as user interface for easy and fast usage.

1. DEterMinistic nEutron Transport solvER

Roadmap

Core

  • Setup Cmake.
  • Add and test Eigen.
  • Setup directory structure.
  • Code and test Material class.
  • Collect source and compile.
  • Setup nanobind and write Python bindings for Material.
  • Write a python test for Material class.
  • Code and test Geometry class.
    • Cell
    • Lattice.
  • Code and test angular quadrature
    • Gauss-Legendre
  • Code and test Solver module.
    • Compute and update fission source.
    • Compute and update keff.
    • Compute and update scattering source.
    • Base solver.
    • Mesh.
    • Boundary conditions.
  • Test Geometry and solver in python.
    • Geometry bindings.
    • Solver bindings.
    • Test
  • Write full benchmark
    • In C++.
    • In Python.
  • Mesh refiner, rings and sectors for cell
  • Enable users to test the lib with codespace and notebooks.
  • GPU offload.

Clean code, testing and safety

  • Add AddressSanitizer, ThreadSanitizer, MemorySanitizer.
  • Setup Github Action.
  • Improve Github Action, by fixing OpenMP not found and with recent version of compiler and Eigen.
  • Setup clang-format with Google style.
  • Setup clang-tidy.
  • Fix how to launch clang-tidy locally and on action.
  • Move bindings elsewhere
  • Doc style (eg doxygen) and the way to generate it automatically.
  • Choose how to handle asserts: thow user errors at runtime and assert internal error on debug build
  • Add a Logger (spdlog, or nanolog or fmtlog) and std::format.
  • Add a timer.
  • Use doctest for unit tests in c++ and python.
  • Maybe switch to include/demeter, src, src/binding, test, extra directory structure
  • Add -Werror flag
  • Setup gcc analizer.
  • Generate .clagn-tidy with --warnings-as-errors=
  • Peform cland-tidy in github action.

Requirements

  • A C++ compiler compatible with at least version 17 of the standard, eg:
    • GCC 8 and later apt install build-essential,
    • Clang 8 and later apt install clang libomp-dev clang-tidy clang-format.
  • CMake 3.4 and newer apt install cmake.
  • Eigen 3.3 and newer apt install libeigen3-dev.
  • Python 3.8 and newer apt install libpython3-dev
  • Doxygen 1.12 and newer apt install doxygen

Build Python package

cd <project-directory>
python -m venv pyenv
source pyenv/bin/activate
pip install numpy matplotlib
pip install .

Following this, you should be able to access the extension

>>> from demeter import *
>>> help(Material)

Build and Run

git clone --recursive https://github.com/kennethassogba/Demeter
mkdir build && cd build
cmake ..
make -j

Then try

./main

Configure the build type: Debug or Release

cmake -S . -B build/ -D CMAKE_BUILD_TYPE=Debug
cmake --build build/ # build the binaries

Choose a compiler

cmake -S . -B build/ -D CMAKE_CXX_COMPILER=clang++-18

Append compiler flags

cmake -S . -B build/ -D CMAKE_CXX_FLAGS=-fsanitize=memory

Documentation

The documentation is automatically generated using Doxygen. To install it, refer to: https://www.doxygen.nl/manual/install.html

Generate the doc

doxygen Doxyfile

You can modify the configuration file Doxyfile to generate the documentation according to your preferences.

About

Demeter is a modern deterministic neutron transport solver for reactor simulations.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published