Deep Neural Network Multigrid Solver (DNN-MG) Code and Materials
Abstract
The source code of gascoignepytorch or the Deep Neural Network Multigrid Solver (DNN-MG). This archive contains the software and weights used to produce the numerical results of the manuscript "A robust and stable hybrid neural network/finite element method for 2D flows that generalizes to different geometries" by Robert Jendersie, Nils Margenberg, Christian Lessig and Thomas Richter. Contents gascoignelib Source code for the finite element toolkit Gascoigne on which gascoignepytorch is build. For an up-to-date version, see the git repository. gascoignepytorch Source code of DNN-MG with multiple example setups for different equations including meshes and configuration files. neuralnets Ready for use weights and hyper parameters of neural networks trained on the instationary Navier-Stokes equation in 2D. Usage Get a copy of LibTorch (tested with >=2.4) Build gascoigne. You may have to install the dependencies metis and umfpack (suitesparse) first.These are usually available through the system's package manager, e.gsudo apt install libsuitesparse-dev libmetis-devorsudo dnf install suitesparse-devel metis-develTo then build gascoignemkdir gascoignelib/build && cd gascoignelib/buildcmake .. -DWITH_THREADS=ONmake -j4 Build gascoignepytorch (DNN-MG)cd ../../gascoignepytorch/mkdir build && cd buildcmake .. -DBUILD_TESTS=OFF -DBUILD_SEA_ICE=OFF -DBUILD_ACOUSTIC_WAVE=OFF -DBUILD_CONVECTION_DIFFUSION=OFF -DCMAKE_PREFIX_PATH=" /share/cmake/Torch"make -j4 Check out the gascoignepytorch/README.md for details on how to run simulations and the training.
Publication details
- Journal / source
- Zenodo (CERN European Organization for Nuclear Research)
- Publication date
- 26 June 2026
- Language
- EN