Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
83 commits
Select commit Hold shift + click to select a range
67380e2
start modifying benchmark code
SteveBronder Nov 12, 2024
141da5d
get bremer working for pyriccati
SteveBronder Nov 13, 2024
35678b3
update benchmarks so that passed data is opened up. Need to still do …
SteveBronder Nov 14, 2024
54c5d37
examples run
SteveBronder Nov 15, 2024
aab33ad
adds docs for benchmarks
SteveBronder Nov 18, 2024
98a2958
add how to write output to csv
SteveBronder Nov 18, 2024
e9c01d6
move solve_ivp benchmark into it's own file instead of overwriting fi…
SteveBronder Nov 18, 2024
eac23e9
run black formatter over solve_ivp_benchmark
SteveBronder Nov 18, 2024
2cdee29
Start work on new evolver function
fruzsinaagocs Dec 5, 2024
cc5e760
Merge branch 'feature/benchmarks' of github.com:SteveBronder/riccatic…
fruzsinaagocs Dec 5, 2024
e6d4099
Adds stiff example to benchmarks
fruzsinaagocs Jan 2, 2025
feaac72
Removes buggy evolver
fruzsinaagocs Jan 2, 2025
6a475e5
making sure boundaries are satisfied for all tests
SteveBronder Jan 6, 2025
c2557ae
use while loop for choose_nonosc_stepsize
SteveBronder Jan 8, 2025
d479f7a
small fixes for solve_ivp_bench
SteveBronder Jan 8, 2025
ef8f7fe
update requirements and add debugging for airy bdf example
SteveBronder Jan 22, 2025
f6db39c
update docs
SteveBronder Jan 22, 2025
5bbe516
initial schrodinger eq plots
SteveBronder Jan 22, 2025
c76edcf
initial schrodinger eq plots
SteveBronder Jan 22, 2025
eccf76a
update schrodinger
SteveBronder Jan 23, 2025
25b23eb
schrodinger working
SteveBronder Jan 24, 2025
23c794e
update schrodinger code
SteveBronder Jan 27, 2025
bbcc659
update schrod
SteveBronder Jan 27, 2025
11e579a
update schrodinger to go right right to middle in second solve
SteveBronder Jan 27, 2025
2b91b0a
update plots
SteveBronder Jan 27, 2025
73a8753
x axis as quantum number for schrodinger error plot
SteveBronder Jan 27, 2025
0a07465
update readme.md for benchmarks
SteveBronder Jan 28, 2025
02660f5
update readme.md for benchmarks
SteveBronder Jan 28, 2025
dd8f76a
update readme.md for benchmarks
SteveBronder Jan 28, 2025
a19cc6b
update readme.md for benchmarks
SteveBronder Jan 28, 2025
46068fb
update readme.md for benchmarks
SteveBronder Jan 28, 2025
3f6acab
updates code partially to work with complex omega returns
SteveBronder Jan 29, 2025
66aff31
remove debugging and add schrodinger energy test
SteveBronder Jan 30, 2025
99fd467
update with bounds search for schrodinger
SteveBronder Jan 30, 2025
4ca09cf
update with bounds search for schrodinger
SteveBronder Jan 30, 2025
006e027
update riccati tests and add test schrodinger eq
SteveBronder Jan 30, 2025
f7e9482
update
SteveBronder Feb 6, 2025
7c4e4e8
setup problem to run
SteveBronder Feb 19, 2025
52cb48d
debugging stuff
SteveBronder Feb 21, 2025
7d732cd
schrodinger test works
SteveBronder Feb 24, 2025
abd9bdc
Merge pull request #11 from SteveBronder/debug-stuff
SteveBronder Feb 24, 2025
8947076
python bindings failing (good)
SteveBronder Feb 24, 2025
9b95202
test_schrod now works
SteveBronder Feb 25, 2025
79a398b
add test for schrodinger. All of the python tests passing
SteveBronder Feb 25, 2025
b146a2f
use for loop in nonosc_step
SteveBronder Feb 26, 2025
3fecd7f
use for loop in nonosc_step
SteveBronder Feb 26, 2025
422d727
cleanup
SteveBronder Feb 26, 2025
14ffed8
update pymain
SteveBronder Feb 26, 2025
d8cf82f
all tests passing
SteveBronder Feb 26, 2025
be28071
reformat everything
SteveBronder Feb 26, 2025
3890d51
Merge pull request #10 from SteveBronder/fix/complex-omega-fun
SteveBronder Feb 26, 2025
5f6ff1d
reformat everything
SteveBronder Feb 26, 2025
fa48207
update
SteveBronder Feb 26, 2025
921fe87
update evolve to use a locally scoped allocator scheme
SteveBronder Feb 27, 2025
cf039b1
update data
SteveBronder Feb 27, 2025
830b395
upd
SteveBronder Feb 28, 2025
cbf6a0b
update
SteveBronder Feb 28, 2025
0f32805
update benchmarks
SteveBronder Feb 28, 2025
5ca2169
update osc step end criterion
SteveBronder Mar 3, 2025
d6d9a74
update schrod
SteveBronder Mar 5, 2025
3294f89
update graphs
SteveBronder Mar 6, 2025
8462641
update table
SteveBronder Mar 6, 2025
0478f97
update table
SteveBronder Mar 6, 2025
46916b7
update table
SteveBronder Mar 6, 2025
2bb3b86
update table
SteveBronder Mar 6, 2025
66d614b
update osc step early exit
SteveBronder Mar 6, 2025
001292a
update when to use osc vs nonosc for imaginary omega
SteveBronder Mar 13, 2025
9bf406f
update schrodinger
SteveBronder Mar 13, 2025
bf9f96f
update schrod plots
SteveBronder Mar 13, 2025
05eee34
update schrod plots
SteveBronder Mar 13, 2025
6f4fb65
update
SteveBronder Mar 14, 2025
f9dfeb3
merge to other
SteveBronder Mar 14, 2025
2da5f6e
Example to how no osc steps
fruzsinaagocs Mar 17, 2025
67ddb81
update
SteveBronder Mar 17, 2025
7b77982
update
SteveBronder Mar 17, 2025
5e443de
update schrod eq
SteveBronder Mar 17, 2025
918a8cd
update tests
SteveBronder Mar 17, 2025
caea127
update plots
SteveBronder Mar 17, 2025
1071e35
Got to the relative error comparison for Airy
fruzsinaagocs Apr 10, 2025
49dc9f5
Went through paper and added citations
fruzsinaagocs Apr 11, 2025
1cfaae4
small changes to readme.md
SteveBronder Apr 30, 2025
fcb34aa
update the graphs for riccaticpp
SteveBronder May 7, 2025
fb06dcd
Update readme.md
fruzsinaagocs May 8, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,7 @@ build/*
examples/build/*
riccati/__pycache__/*
.vscode/*
env/*
.venv/*
tests/python/__pycache__/test*
nohup.out
src/pyriccaticpp/__pycache__/*.pyc
6 changes: 3 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ project(
LANGUAGES C CXX)

include(FetchContent)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED NO)
cmake_policy(SET CMP0135 NEW)
cmake_policy(SET CMP0077 NEW)
set(CMAKE_CXX_EXTENSIONS NO)
if (CMAKE_BUILD_TYPE MATCHES Debug)
if (CMAKE_BUILD_TYPE MATCHES DEBUG)
set(CMAKE_VERBOSE_MAKEFILE YES)
endif()
option(RICCATI_BUILD_TESTING "Build the test targets for the library" OFF)
Expand Down Expand Up @@ -69,7 +69,7 @@ endif()

if (NOT CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
set(CMAKE_CXX_FLAGS_RELEASE
"-O3 -march=native -mtune=native -DRICCATI_DEBUG=false"
"-O3 -march=native -mtune=native"
CACHE STRING "Flags used by the C++ compiler during Release builds."
FORCE)
endif()
Expand Down
23 changes: 18 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ $$

![bench1](./imgs/bremer_together1.png)

The blue area in the graph of errors is the best possible lower bound for error calculated by Bremer.
Because the results of each algorithm are compared relative to Bremer's values, the algorithms may report
The blue area in the graph of errors is the best possible lower bound for error calculated by Bremer.
Because the results of each algorithm are compared relative to Bremer's values, the algorithms may report
smaller values than the actual possible error, but should be considered bounded by the blue area.

## Documentation
Expand Down Expand Up @@ -93,6 +93,19 @@ cd build/tests
make -j4 riccati_test && ctest
```

For the python tests and benchmarks it is recommended to setup a virtual environment

```bash
# From the top level of this directory
python -m venv ./.venv
source ./.venv/bin/activate
pip install -r requirements.txt
# Install pyriccaticpp
pip install .
# Now run benchmarks
python3 ./benchmarks/solve_ivp_bench.py
```

## Example

As an example we will solve Bremer's Eq. 237 where the omega and gamma functions are given by the following.
Expand All @@ -103,8 +116,8 @@ l = 10
\gamma(x) = 0
$$

In the code we use the `riccati::vectorize` function to convert the scalar functions to vector functions.
We then use the `riccati::make_solver` function to create the solver object.
In the code we use the `riccati::vectorize` function to convert the scalar functions to vector functions.
We then use the `riccati::make_solver` function to create the solver object.
Finally we use the `riccati::evolve` function to solve the ODE.

```cpp
Expand All @@ -130,4 +143,4 @@ FetchContent_MakeAvailable(riccaticpp)
target_link_libraries(target_name riccati)
```

See the example [here]()
See the example [here]()
2 changes: 1 addition & 1 deletion benchmarks/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ target_link_libraries(brenner237 riccati Eigen3::Eigen)
message(STATUS ${CMAKE_CURRENT_SOURCE_DIR})
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/fig1.py
${CMAKE_CURRENT_BINARY_DIR}/fig1.py COPYONLY)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/data/eq237.txt
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/data/eq237.csv
${CMAKE_CURRENT_BINARY_DIR}/data/eq237.txt COPYONLY)

ExternalProject_Add(
Expand Down
8 changes: 8 additions & 0 deletions benchmarks/data/eq237.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
lamb,y1,relative_error
1e1,0.2913132934408612e0,7e-14
1e2,0.5294889561602804e0,5e-13
1e3,-0.6028749132401260e0,3e-12
1e4,-0.4813631690625038e0,5e-11
1e5,0.6558931145821987e0,3e-10
1e6,-0.4829009413372087e0,5e-9
1e7,-0.6634949630196019e0,4e-8
9 changes: 0 additions & 9 deletions benchmarks/data/eq237.txt

This file was deleted.

2 changes: 1 addition & 1 deletion benchmarks/fig1.py
Original file line number Diff line number Diff line change
Expand Up @@ -542,7 +542,7 @@ def f(t, y):
outdir = os.getcwd() + "/data/"
epss, epshs, ns = [1e-12, 1e-6], [1e-13, 1e-9], [35, 20]

#Let the benchmark run
# Let the benchmark run
for x in range(30):
for algo in Algo:
for m in np.logspace(1, 7, num=7):
Expand Down
Loading
Loading