diffrg

The Discretization Framework for functional Renormalization Group flows

https://github.com/satfra/diffrg

Science Score: 64.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
    Links to: arxiv.org
  • Committers with academic emails
    1 of 4 committers (25.0%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (15.5%) to scientific vocabulary

Keywords

arxiv c-plus-plus computational-physics functional-renormalization-group high-energy-physics mathematica numerical-hydrodynamics
Last synced: 6 months ago · JSON representation ·

Repository

The Discretization Framework for functional Renormalization Group flows

Basic Info
  • Host: GitHub
  • Owner: satfra
  • License: gpl-3.0
  • Language: C++
  • Default Branch: main
  • Homepage:
  • Size: 4.48 MB
Statistics
  • Stars: 5
  • Watchers: 3
  • Forks: 2
  • Open Issues: 4
  • Releases: 0
Topics
arxiv c-plus-plus computational-physics functional-renormalization-group high-energy-physics mathematica numerical-hydrodynamics
Created over 1 year ago · Last pushed 8 months ago
Metadata Files
Readme Changelog License Citation

README.md

arXiv Doxygen Wolfram Python

DiFfRG - A Discretization Framework for functional Renormalization Group flows

DiFfRG is a set of tools for the discretization of flow equations arising in the functional Renormalization Group (fRG). It supports the setup and calculation of large systems of flow equations allowing for complex combinations of vertex and derivative expansions.

For spatial discretizations, i.e. discretizations of field space mostly used for derivative expansions, DiFfRG makes different finite element (FE) methods available. These include: - Continuous Galerkin FE - Discontinuos Galerkin FE - Direct discontinuous Galerkin FE - Local discontinuous Galerkin FE (including derived finite volume (FV) schemes)

The FEM methods included in DiFfRG are built upon the deal.ii finite element library, which is highly parallelized and allows for great performance and flexibility. PDEs consisting of RG-time dependent equations, as well as stationary equations can be solved together during the flow, allowing for techniques like flowing fields in a very accessible way.

Both explicit and implicit timestepping methods are available and allow thus for efficient RG-time integration in the symmetric and symmetry-broken regime.

We also include a set of tools for the evaluation of integrals and discretization of momentum dependencies.

For an overview, please see the accompanying paper, the tutorial page in the documentation and the examples in Examples/.

This library has been developed within the fQCD Collaboration.

Citation

If you use DiFfRG in your scientific work, please cite the corresponding paper: @article{Sattler:2024ozv, author = "Sattler, Franz R. and Pawlowski, Jan M.", title = "{DiFfRG: A Discretisation Framework for functional Renormalisation Group flows}", eprint = "2412.13043", archivePrefix = "arXiv", primaryClass = "hep-ph", month = "12", year = "2024" }

Requirements

To compile and run this project, there are very few requirements which you can easily install using your package manager on Linux or MacOS:

  • git for external requirements and to clone this repository.
  • CMake for the build systems of DiFfRG, deal.ii and other libraries.
  • GNU Make or another generator of your choice.
  • A compiler supporting at least the C++20 standard. This project is only tested using the GCC compiler suite, as well as with AppleClang, but in principle, ICC or standard Clang should also work.
  • LAPACK and BLAS in some form, e.g. OpenBlas.
  • The GNU Scientific Library GSL. If not found by DiFfRG, it will try to install it by itself.
  • Doxygen and graphviz to build the documentation.

The following requirements are optional: - Python is used in the library for visualization purposes. Furthermore, adaptive phase diagram calculation is implemented as a python routine. - ParaView, a program to visualize and post-process the vtk data saved by DiFfRG when treating FEM discretizations. - CUDA for integration routines on the GPU, which gives a huge speedup for the calculation of fully momentum dependent flow equations (10 - 100x). In case you wish to use CUDA, make sure you have a compiler available on your system compatible with your version of nvcc, e.g. g++<=13.2 for CUDA 12.5

All other requirements are bundled and automatically built with DiFfRG. The framework has been tested with the following systems:

Arch Linux

bash $ pacman -S git cmake gcc blas-openblas blas64-openblas paraview python doxygen graphviz gsl For a CUDA-enabled build, additionally install bash $ pacman -S cuda

Rocky Linux

bash $ dnf --enablerepo=devel install -y gcc-toolset-12 cmake git openblas-devel doxygen doxygen-latex python3 python3-pip gsl-devel patch $ scl enable gcc-toolset-12 bash

The second line is necessary to switch into a shell where g++-12 is available

Ubuntu

bash $ apt-get update $ apt-get install git cmake libopenblas-dev paraview build-essential python3 doxygen libeigen3-dev graphviz libgsl-dev For a CUDA-enabled build, additionally bash $ apt-get install cuda

MacOS

First, install xcode and homebrew, then run bash $ brew install cmake doxygen paraview eigen graphviz gsl

Windows

If using Windows, instead of running the project directly, it is recommended to use WSL and then go through the installation as if on Linux (e.g. Arch or Ubuntu).

Docker and other container runtime environments

Although a native install should be unproblematic in most cases, the setup with CUDA functionality may be daunting. Especially on high-performance clusters, and also depending on the packages available for chosen distribution, it may be much easier to work with the framework inside a container.

The specific choice of runtime environment is up to the user, however we provide a small build script to create docker container in which DiFfRG will be built. To do this, you will need docker, docker-buildx and the NVIDIA container toolkit in case you wish to create a CUDA-compatible image.

For a CUDA-enabled build, run build $ bash setup_docker.sh -c 12.5.1 -j8 in the above, you may want to replace the version 12.5.1 with another version you can find on docker hub at nvidia/cuda . Alternatively, for a CUDA-less build, run simply build $ bash setup_docker.sh -j8

If using other environments, e.g. ENROOT, the preferred approach is simply to build an image on top of the CUDA images by NVIDIA. Optimal compatibility is given using nvidia/cuda:12.5.1-devel-rockylinux. Proceed with the installation setup for Rocky Linux above.

For example, with ENROOT a DiFfRG image can be built by following these steps: bash $ enroot import docker://nvidia/cuda:12.5.1-devel-rockylinux9 $ enroot create --name DiFfRG nvidia+cuda+12.5.1-devel-rockylinux9.sqsh $ enroot start --root --rw -m ./:/DiFfRG_source DiFfRG bash Afterwards, one proceeds with the above Rocky Linux setup.

Setup

If all requirements are met, you can clone the git to a directory of your choice, bash $ git clone https://github.com/satfra/DiFfRG.git and start the build after switching to the git directory. bash $ cd DiFfRG $ bash -i build.sh -j8 -i /opt/DiFfRG The build_DiFfRG.sh bash script will build and setup the DiFfRG project and all its requirements. This can take up to half an hour as the deal.ii library is quite large. This script has the following options: - -c Use CUDA when building the DiFfRG library. - -i <directory> Set the installation directory for the library. - -j <threads> Set the number of threads passed to make and git fetch. - --help Display this information.

Depending on your amount of CPU cores, you should adjust the -j parameter which indicates the number of threads used in the build process. Note that choosing this too large may lead to extreme RAM usage, so tread carefully.

As soon as the build has finished, you can find a full install of the library in the DiFfRG_install subdirectory.

If you have changes to the library code, you can update the library by running bash $ bash -i update_DiFfRG.sh -c -j8 -i /opt/DiFfRG where once again the -j parameter should be adjusted to your amount of CPU cores. The update_DiFfRG.sh script takes the following optional arguments: - -c Use CUDA when building the DiFfRG library. - -i <directory> Set the installation directory for the library. - -j <threads> Set the number of threads passed to make and git fetch. - -m Install the Mathematica package locally. - --help Display this information.

Getting started with simulating fRG flows

For an overview, please see the tutorial page in the documentation. A local documentation is also always built automatically when running the setup script, but can also be built manually by running bash $ make documentation inside the DiFfRG_build directory. You can find then a code reference in the top directory.

All backend code is contained in the DiFfRG directory.

Several simulations are defined in the Applications directory, which can be used as a starting point for your own simulations.

Tips and FAQ

Logfiles and install issues

During building and installing DiFfRG, logs are created at every step. You may find the logs for the setup of external dependencies in external/logs and the logs for the build of DiFfRG itself in logs/.

If DiFfRG fails to build on your machine, first check the appropriate logfile. If DiFfRG proves to be incompatible with your machine, please open an Issue on GitHub here, or alternatively send an email to the author (see the publication).

Contributing

DiFfRG is a work in progress. If you find some feature missing, a bug, or some other kind of improvement, you can get involved in the further development of DiFfRG.

Thanks to the collaborative nature of GitHub, you can simply fork the project and work on a private copy on your own GitHub account. Feel also encouraged to open an issue, or if you already have a (partially) ready contribution, open a pull request.

Configuration files

A DiFfRG simulation requires you to provide a valid parameters.json file in the execution path, or alternatively provide another JSON-file using the -p flag (see below).

To generate a "stock" parameters.json in the current folder, you can call any DiFfRG application as bash $ ./my_simulation --generate-parameter-file Before usage, don't forget to put in the parameters you defined in your own simulation!

Progress output

To monitor the progress of the simulation, one can set the verbosity parameter either in the parameter file, json { "output": { "verbosity": 1 }, } or from the CLI, bash $ ./my_simulation -si /output/verbosity=1

Modifying parameters from the CLI

Any DiFfRG simulation using the DiFfRG::ConfigurationHelper class can be asked to give some syntax pertaining to the configuration: bash $ ./my_simulation --help This is a DiFfRG simulation. You can pass the following optional parameters: --help shows this text --generate-parameter-file generates a parameter file with some default values -p specifiy a parameter file other than the standard parameter.json -sd overwrite a double parameter. This should be in the format '-s physical/T=0.1' -si overwrite an integer parameter. This should be in the format '-s physical/Nc=1' -sb overwrite a boolean parameter. This should be in the format '-s physical/use_sth=true' -ss overwrite a string parameter. This should be in the format '-s physical/a=hello' e.g. bash $ ./my_simulation -sd /physical/Lambda=1.0

Timestepper choice

In general, the IDA timestepper from the SUNDIALS-suite has proven to be the optimal choice for any fRG-flow with convexity restoration. Additionally, this solver allows for out-of-the-box solving of additional algebraic systems, which is handy for more complicated fRG setups.

If solving purely variable-dependent systems, one of the Boost time steppers, Boost_RK45, Boost_RK78 or Boost_ABM. The latter is especially excellent for extremely large systems which have no extremely fast dynamics, but lacks adaptive timestepping. In practice, choosing Boost_ABM over one of the RK steppers may speed up a Yang-Mills simulation with full momentum dependences by more than a factor of 10.

For systems with both spatial discretisations and variables, consider one of the implicit-explicit mixtures, SUNDIALS_IDA_Boost_RK45, SUNDIALS_IDA_Boost_RK78 or SUNDIALS_IDA_Boost_ABM.

Other Libraries used

The following third-party libraries are utilised by DiFfRG. They are automatically built and installed DiFfRG during the build process.

  • The main backend for field-space discretization is deal.II, which provides the entire FEM-machinery as well as many other utility components.
  • For performant and convenient calculation of Jacobian matrices we use the autodiff library, which implements automatic forward and backwards differentiation in C++ and also in CUDA.
  • Time integration relies heavily on the SUNDIALS suite, specifically on the IDAs solver.
  • Rapidcsv for quick processing of .csv files.
  • Catch2 for unit testing.
  • RMM, a memory manager for CUDA, which is used for GPU-accelerated loop integrations.
  • QMC for adaptive Quasi-Monte-Carlo integration.
  • spdlog for logging.
  • Doxygen Awesome for a modern doxygen theme.
  • Boost provides explicit time-stepping and various math algorithms.
  • Eigen for some linear-algebra related tasks.

Owner

  • Name: Franz Richard Sattler
  • Login: satfra
  • Kind: user

Citation (CITATION.cff)

cff-version: 1.2.0
title: DiFfRG
message: >-
  If you use this software, please cite it using the
  metadata from this file.
type: software
authors:
  - given-names: Franz Richard
    family-names: Sattler
    email: sattler@thphys.uni-heidelberg.de
    affiliation: Heidelberg University
    orcid: 'https://orcid.org/0000-0003-1744-9456'
identifiers:
  - type: url
    value: 'https://arxiv.org/abs/2412.13043'
    description: arxiv
repository-code: 'https://github.com/satfra/DiFfRG'
url: 'https://satfra.github.io/DiFfRG/cpp/index.html'
abstract: >-
  The Discretization Framework for functional
  Renormalization Group flows 
keywords:
  - 'c-plus-plus '
  - mathematica
  - functional renormalization group
  - computational-physics
  - high-energy-physics
  - numerical-hydrodynamics
license: GPL-3.0

GitHub Events

Total
  • Create event: 8
  • Issues event: 3
  • Watch event: 6
  • Delete event: 7
  • Issue comment event: 8
  • Member event: 1
  • Public event: 1
  • Push event: 148
  • Pull request review comment event: 1
  • Pull request review event: 3
  • Pull request event: 23
  • Fork event: 2
Last Year
  • Create event: 8
  • Issues event: 3
  • Watch event: 6
  • Delete event: 7
  • Issue comment event: 8
  • Member event: 1
  • Public event: 1
  • Push event: 148
  • Pull request review comment event: 1
  • Pull request review event: 3
  • Pull request event: 23
  • Fork event: 2

Committers

Last synced: 7 months ago

All Time
  • Total Commits: 128
  • Total Committers: 4
  • Avg Commits per committer: 32.0
  • Development Distribution Score (DDS): 0.141
Past Year
  • Commits: 128
  • Committers: 4
  • Avg Commits per committer: 32.0
  • Development Distribution Score (DDS): 0.141
Top Committers
Name Email Commits
Franz R. Sattler s****r@t****e 110
Franz Richard Sattler 6****a 15
Keiwan Jamaly 3****y 2
nikolasleonhardt 1****t 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 3
  • Total pull requests: 15
  • Average time to close issues: 3 days
  • Average time to close pull requests: 2 days
  • Total issue authors: 1
  • Total pull request authors: 3
  • Average comments per issue: 2.33
  • Average comments per pull request: 0.0
  • Merged pull requests: 12
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 3
  • Pull requests: 15
  • Average time to close issues: 3 days
  • Average time to close pull requests: 2 days
  • Issue authors: 1
  • Pull request authors: 3
  • Average comments per issue: 2.33
  • Average comments per pull request: 0.0
  • Merged pull requests: 12
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • keiwanjamaly (3)
  • satfra (1)
Pull Request Authors
  • satfra (13)
  • keiwanjamaly (5)
  • nikolasleonhardt (1)
Top Labels
Issue Labels
Pull Request Labels

Dependencies

.github/workflows/documentation.yml actions
  • actions/checkout v4 composite
  • actions/deploy-pages v4 composite
  • actions/upload-pages-artifact v3 composite
Dockerfile docker
  • $base latest build
python/DiFfRG.egg-info/requires.txt pypi
  • adaptive *
  • jupyter_bokeh *
  • matplotlib *
  • numpy *
  • pandas *
  • scipy *
  • seaborn *
  • vtk *
python/pyproject.toml pypi
  • adaptive [notebook]
  • jupyter_bokeh *
  • matplotlib *
  • numpy *
  • pandas *
  • scipy *
  • seaborn *
  • vtk *