|
1 | | -# Playground to use Dedalus with pySDC |
| 1 | +# Playground to use Dedalus with pySDC, and coupling with a Fourier Neural Operator (FNO) |
2 | 2 |
|
3 | 3 | :scroll: Interface for [Dedalus code](https://dedalus-project.readthedocs.io/en/latest/) so it can be used within the pySDC framework. |
4 | 4 |
|
@@ -133,6 +133,28 @@ while solver.proceed: |
133 | 133 |
|
134 | 134 | A full example script for the 2D Rayleigh-Benard Convection problem can be found [here](./rayleighBenardSDC.py). |
135 | 135 |
|
| 136 | +## SDC coupled with FNO for initial guess |
| 137 | + |
| 138 | +FNO model trained using Dedalus (or pySDC) generated data can be used to compute the initial guess for SDC sweep. |
| 139 | + |
| 140 | +This requires the installation of the [`cfno`](https://github.com/Parallel-in-Time/cfno/tree/tibo) package, |
| 141 | +and here is a template example for its usage : |
| 142 | + |
| 143 | +```python |
| 144 | +from pySDC.playgrounds.dedalus.sdc import SpectralDeferredCorrectionIMEX |
| 145 | + |
| 146 | +checkpoint = "path/to/checkpoint.pt" |
| 147 | +SpectralDeferredCorrectionIMEX.setupNN( |
| 148 | + "FNOP-2", checkpoint=checkpoint, initSweep="NN") |
| 149 | + |
| 150 | +# Build Dedalus problem and give additional SDC settings ... |
| 151 | +``` |
| 152 | + |
| 153 | +Some FNO-based sweepers are also available for `pySDC` and currently stored in the `cfno` package, |
| 154 | +see [cfno.simulation.sweeper](https://github.com/Parallel-in-Time/cfno/blob/tibo/cfno/simulation/sweeper.py). |
| 155 | +Those consists on two classes, `FNO_IMEX` and `FNO_IMEX_PINT`, |
| 156 | +allowing to run IMEX-SDC with any kind of problem implemented in `pySDC` and adapted to those type of sweeper. |
| 157 | + |
136 | 158 | ## Time-parallel SDC time-integrator for Dedalus |
137 | 159 |
|
138 | 160 | Two MPI implementations of SDC time-integrators for |
|
0 commit comments