Skip to content

Commit 9f31725

Browse files
committed
major changes - LorentzAttractor should again work
1 parent 8b9fb00 commit 9f31725

33 files changed

+125
-286
lines changed

.github/workflows/build.yml

Lines changed: 0 additions & 98 deletions
Original file line numberDiff line numberDiff line change
@@ -1,98 +0,0 @@
1-
name: Build and Test
2-
3-
on:
4-
push:
5-
branches: [ main, master, develop ]
6-
pull_request:
7-
branches: [ main, master ]
8-
release:
9-
types: [published]
10-
11-
jobs:
12-
test:
13-
runs-on: ${{ matrix.os }}
14-
strategy:
15-
fail-fast: false
16-
matrix:
17-
os: [ubuntu-latest]
18-
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
19-
cuda-version: ["11.8", "12.1"]
20-
21-
steps:
22-
- uses: actions/checkout@v4
23-
with:
24-
submodules: recursive
25-
26-
- name: Set up Python ${{ matrix.python-version }}
27-
uses: actions/setup-python@v4
28-
with:
29-
python-version: ${{ matrix.python-version }}
30-
31-
- name: Install CUDA Toolkit
32-
if: matrix.os == 'ubuntu-latest'
33-
uses: Jimver/[email protected]
34-
with:
35-
cuda: ${{ matrix.cuda-version }}
36-
37-
- name: Install system dependencies
38-
if: matrix.os == 'ubuntu-latest'
39-
run: |
40-
sudo apt-get update
41-
sudo apt-get install -y cmake build-essential ninja-build libboost-all-dev
42-
43-
- name: Install Python dependencies
44-
run: |
45-
python -m pip install --upgrade pip
46-
pip install build wheel setuptools cmake pybind11 ninja
47-
pip install pytest pytest-cov numpy matplotlib scipy
48-
49-
- name: Build package (superbuild)
50-
run: |
51-
python -m build --wheel
52-
53-
- name: Install package
54-
run: |
55-
pip install dist/*.whl
56-
57-
- name: Run tests
58-
run: |
59-
pytest odevis/python/tests/ -v
60-
61-
build-wheel:
62-
if: github.event_name == 'release'
63-
runs-on: ubuntu-latest
64-
steps:
65-
- uses: actions/checkout@v4
66-
with:
67-
submodules: recursive
68-
69-
- name: Set up Python
70-
uses: actions/setup-python@v4
71-
with:
72-
python-version: "3.10"
73-
74-
- name: Install CUDA Toolkit
75-
uses: Jimver/[email protected]
76-
with:
77-
cuda: "12.1"
78-
79-
- name: Install system dependencies
80-
run: |
81-
sudo apt-get update
82-
sudo apt-get install -y cmake build-essential ninja-build libboost-all-dev
83-
84-
- name: Install build dependencies
85-
run: |
86-
python -m pip install --upgrade pip
87-
pip install build twine cmake pybind11 ninja
88-
89-
- name: Build wheel
90-
run: |
91-
python -m build
92-
93-
- name: Upload to PyPI
94-
env:
95-
TWINE_USERNAME: __token__
96-
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
97-
run: |
98-
twine upload dist/*

.github/workflows/ci.yml

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: C++ CI
1+
name: CI
22

33
on:
44
# We run CI on pushes to the main branch
@@ -14,35 +14,31 @@ on:
1414

1515
jobs:
1616
build-and-test:
17-
name: C++ Testing on ${{matrix.os}}
17+
name: Testing on ${{matrix.os}}
1818
runs-on: ${{matrix.os}}
1919
strategy:
2020
matrix:
21-
os: [ubuntu-latest, macos-latest]
21+
os: [ubuntu-18.04, macos-10.15]
2222

2323
steps:
24-
- uses: actions/checkout@v4
24+
- uses: actions/checkout@v2
25+
2526
with:
2627
submodules: 'recursive'
2728

28-
- name: Install system dependencies (Ubuntu)
29-
if: runner.os == 'Linux'
30-
run: |
31-
sudo apt-get update
32-
sudo apt-get install -y cmake build-essential ninja-build libboost-all-dev
33-
34-
- name: Install system dependencies (macOS)
35-
if: runner.os == 'macOS'
29+
- name: upgrade g++ compiler on ubuntu
3630
run: |
37-
brew install cmake ninja boost
31+
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-9 10
32+
sudo update-alternatives --set g++ /usr/bin/g++-9
33+
if: runner.os == 'Linux'
3834

3935
- name: make build directory
4036
run: cmake -E make_directory ${{runner.workspace}}/build
4137

4238
- name: configure cmake
4339
shell: bash
4440
working-directory: ${{runner.workspace}}/build
45-
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=Debug -DBUILD_DOCS=OFF -DBUILD_PYTHON_BINDINGS=OFF
41+
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=Debug -DBUILD_DOCS=OFF
4642

4743
- name: build
4844
shell: bash
@@ -56,26 +52,30 @@ jobs:
5652

5753

5854
coverage-test:
59-
name: C++ Coverage Testing
60-
runs-on: ubuntu-latest
55+
name: Coverage Testing
56+
runs-on: ubuntu-18.04
6157

6258
steps:
63-
- uses: actions/checkout@v4
59+
- uses: actions/checkout@v2
6460
with:
6561
submodules: 'recursive'
6662

67-
- name: Install dependencies
63+
- name: Install LCov
64+
run: |
65+
sudo apt-get install -y lcov
66+
67+
- name: upgrade g++ compiler on ubuntu
6868
run: |
69-
sudo apt-get update
70-
sudo apt-get install -y lcov cmake build-essential ninja-build libboost-all-dev
69+
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-9 10
70+
sudo update-alternatives --set g++ /usr/bin/g++-9
7171
7272
- name: make build directory
7373
run: cmake -E make_directory ${{runner.workspace}}/build
7474

7575
- name: configure cmake
7676
shell: bash
7777
working-directory: ${{runner.workspace}}/build
78-
run: cmake $GITHUB_WORKSPACE -DCMAKE_CXX_FLAGS="--coverage" -DBUILD_DOCS=OFF -DBUILD_PYTHON_BINDINGS=OFF
78+
run: cmake $GITHUB_WORKSPACE -DCMAKE_CXX_FLAGS="--coverage" -DBUILD_DOCS=OFF
7979

8080
- name: build
8181
shell: bash

.github/workflows/sonarcloud.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
name: SonarCloud
1919
runs-on: ubuntu-latest
2020
steps:
21-
- uses: actions/checkout@v4
21+
- uses: actions/checkout@v2
2222
with:
2323
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
2424
submodules: 'recursive'

.gitignore

Lines changed: 12 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -1,75 +1,24 @@
1-
# Python build artifacts
2-
__pycache__/
3-
*.py[cod]
4-
*$py.class
5-
*.so
6-
*.egg-info/
7-
dist/
8-
build/
9-
.eggs/
10-
*.egg
11-
12-
# LaTeX build artifacts
131
*.aux
142
*.log
153
*.out
164
*.synctex.gz
175
*.toc
186
*.pyc
7+
*.so
8+
*.egg-info/
199

20-
# CMake build artifacts
21-
CMakeCache.txt
22-
CMakeFiles/
23-
cmake_install.cmake
24-
Makefile
25-
install_manifest.txt
26-
*.cmake
27-
!*Config.cmake.in
28-
*-prefix/
29-
*-build/
30-
31-
# Compiled extensions
32-
*.dll
33-
*.dylib
34-
*.pyd
35-
36-
# IDE files
37-
.vscode/
38-
.idea/
39-
*.swp
40-
*.swo
41-
42-
# OS files
43-
.DS_Store
44-
Thumbs.db
45-
46-
# Testing
47-
.pytest_cache/
48-
.coverage
49-
htmlcov/
50-
51-
# Virtual environments
52-
venv/
53-
env/
54-
.env
55-
56-
# Temporary files
57-
*.tmp
58-
*.bak
59-
*~
60-
61-
# Build directories
62-
build/
63-
install/
64-
cmake_install/
65-
ODEVisualizationLib.egg-info/
66-
67-
# Documentation source (keep only specific files)
6810
doc/source/*
6911
!doc/source/figures/
7012
!doc/source/report.tex
7113
!doc/source/references.bib
7214

15+
build/
16+
install/
17+
.vscode/
18+
.idea/
19+
__pychache__/
20+
ODEVisualizationLib.egg-info/
21+
7322
examples/applications/c++/*
7423
!examples/applications/c++/CMakeLists.txt
7524
!examples/applications/c++/include
@@ -107,3 +56,6 @@ examples/further_systems/FourPointSystem/*
10756
!examples/further_systems/FourPointSystem/src
10857

10958
config.h
59+
odevis/cmake_install/
60+
61+
examples/flow_equations/Betafunctionsyukawa/

.readthedocs.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
version: 2
22

33
sphinx:
4-
configuration: odevis/doc/conf.py
4+
configuration: doc/conf.py
55

66
formats: all
77

@@ -11,4 +11,4 @@ submodules:
1111

1212
python:
1313
install:
14-
- requirements: odevis/doc/requirements-rtd.txt
14+
- requirements: doc/requirements-rtd.txt

CMakeLists.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON)
3333
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
3434

3535
# Setup install directories for the external projects
36-
set(SUPERBUILD_INSTALL_DIR ${CMAKE_BINARY_DIR}/installed)
36+
set(SUPERBUILD_INSTALL_DIR ${CMAKE_BINARY_DIR}/installed CACHE PATH "Directory where superbuild dependencies are installed")
3737
set(CMAKE_PREFIX_PATH ${SUPERBUILD_INSTALL_DIR} ${CMAKE_PREFIX_PATH})
3838

3939
# Find Boost (required)
@@ -53,6 +53,10 @@ FetchContent_MakeAvailable(nlohmann_json)
5353
# Store the nlohmann/json path to pass to dependencies
5454
get_target_property(JSON_INCLUDE_DIR nlohmann_json::nlohmann_json INTERFACE_INCLUDE_DIRECTORIES)
5555

56+
# Copy nlohmann/json headers to superbuild directory immediately for examples to use
57+
file(COPY ${nlohmann_json_SOURCE_DIR}/include/nlohmann
58+
DESTINATION ${SUPERBUILD_INSTALL_DIR}/include)
59+
5660
# 1. devdat library
5761
if(USE_SYSTEM_DEVDAT)
5862
find_package(devdat REQUIRED)

MANIFEST.in

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,17 @@ include pyproject.toml
77
recursive-include . CMakeLists.txt
88
recursive-include cmake *.cmake.in
99
recursive-include cmake *.cmake
10-
recursive-include odevis/cmake *.cmake.in
11-
recursive-include odevis/cmake *.cmake
1210

1311
# Include all source files
14-
recursive-include odevis/src *.cpp *.cu *.hpp *.h
15-
recursive-include odevis/include *.hpp *.h
16-
recursive-include odevis/python *.cpp *.cu *.hpp *.h *.py
12+
recursive-include src *.cpp *.cu *.hpp *.h
13+
recursive-include include *.hpp *.h
14+
recursive-include python *.cpp *.cu *.hpp *.h *.py
1715

1816
# Include flow equation wrapper
19-
graft odevis/python/flow_equation_wrapper/
17+
graft python/flow_equation_wrapper/
2018

2119
# Include test files
22-
recursive-include odevis/tests *.py *.cpp *.cu *.hpp *.h
20+
recursive-include tests *.py *.cpp *.cu *.hpp *.h
2321

2422
# Exclude build artifacts and temporary files
2523
global-exclude *.pyc
@@ -34,4 +32,4 @@ global-exclude build/*
3432
global-exclude *.egg-info/*
3533

3634
# Include package data files
37-
recursive-include odevis/python *.json *.yaml *.yml
35+
recursive-include python *.json *.yaml *.yml

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,8 +128,8 @@ If you use ODEVisualization in your research, please cite:
128128

129129
```bibtex
130130
@software{odevisualization,
131-
title={ODEVisualization: GPU-Accelerated Analysis of Ordinary Differential Equations},
132-
author={Kades, Lukas},
131+
title={ODE Visualization: GPU-Accelerated Analysis of Ordinary Differential Equations for the Functional Renormalization Group},
132+
author={Kades, Lukas; Sadlo, Filip; Pawlowski, Jan M.}
133133
url={https://github.com/statphysandml/ODEVisualization},
134134
version={1.0.0},
135135
year={2025}

examples/applications/python/evolution_t.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from lorentzattractor.lorentz_attractor import LorentzAttractor
1+
from lorentz_attractor import LorentzAttractor
22

33
# from odesolver.observers import TrajectoryObserver, IntersectionObserver
44

examples/applications/python/experiments.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import numpy as np
22
from odesolver.coordinates import Coordinates
33

4-
from lorentzattractor.lorentz_attractor import LorentzAttractor
4+
from lorentz_attractor import LorentzAttractor
55

66
from odesolver.recursive_search import RecursiveSearch
77

0 commit comments

Comments
 (0)