|
23 | 23 | "In this tutorial we will indeed create from scratch a new version of the original DMD; such extension will be totally useless from a scientific perspective, the only purpose is showing the suggested steps to implement new variants inside **PyDMD**." |
24 | 24 | ] |
25 | 25 | }, |
| 26 | + { |
| 27 | + "cell_type": "markdown", |
| 28 | + "metadata": {}, |
| 29 | + "source": [ |
| 30 | + "## The Back-end API" |
| 31 | + ] |
| 32 | + }, |
26 | 33 | { |
27 | 34 | "cell_type": "markdown", |
28 | 35 | "metadata": {}, |
29 | 36 | "source": [ |
30 | 37 | "The necessary bricks for building the new DMD version are:\n", |
31 | 38 | "\n", |
32 | | - "- [`DMDBase`](https://mathlab.github.io/PyDMD/dmdbase.html), the actual backbone of all the different implemented versions;\n", |
33 | | - "- `DMDTimeDict`, the class that manages the time window;\n", |
34 | | - "- `DMDOperator`, the class that manages the so-called DMD operator;\n", |
| 39 | + "- [`DMDBase`](https://pydmd.github.io/PyDMD/dmdbase.html), the actual backbone of all the different implemented versions;\n", |
| 40 | + "- [`DMDTimeDict`](https://github.com/PyDMD/PyDMD/blob/7ac9f3fa855e9a5e7008daad9906eaa6e59ba80a/pydmd/dmdbase.py#L759), the class that manages the time window;\n", |
| 41 | + "- [`DMDOperator`](https://pydmd.github.io/PyDMD/dmdoperator.html), the class that manages the so-called DMD operator;\n", |
| 42 | + "\n", |
| 43 | + "The following schematic outlines the general structure of every `DMDBase` module.\n", |
| 44 | + "\n", |
| 45 | + "In general, all `PyDMD` modules should be capable of the following tasks:\n", |
| 46 | + "1) Accepting and storing DMD algorithm parameters.\n", |
| 47 | + "2) Performing DMD given snapshot data $\\mathbf{X}$ via the `fit` method, which often does the following:\n", |
| 48 | + " - prepares and stores the input data,\n", |
| 49 | + " - sets the `DMDTimeDict`s,\n", |
| 50 | + " - computes the DMD operator and its eigendecomposition, and\n", |
| 51 | + " - (this is done by invoking the `DMDOperator`'s `compute_operator` function)\n", |
| 52 | + " - computes the DMD amplitudes using the computed operator.\n", |
| 53 | + "3) Fetching and utilizing DMD results, such as:\n", |
| 54 | + " - the reduced DMD operator $\\tilde{\\mathbf{A}}$\n", |
| 55 | + " - the spatial modes $\\mathbf{\\Phi}$ (the eigenvectors of $\\mathbf{A}$)\n", |
| 56 | + " - the temporal frequencies $\\mathbf{\\Lambda}$ (the eigenvalues of $\\mathbf{A}$)\n", |
| 57 | + " - the spatiotemporal mode amplitudes $\\mathbf{b}$\n", |
| 58 | + "\n", |
| 59 | + "Hence different modules implement different DMD variants, where any number of these steps may be performed differently." |
| 60 | + ] |
| 61 | + }, |
| 62 | + { |
| 63 | + "cell_type": "markdown", |
| 64 | + "metadata": {}, |
| 65 | + "source": [ |
| 66 | + "## Building a New PyDMD Module\n", |
35 | 67 | "\n", |
36 | 68 | "We start the new module by importing all these classes and the usual math environment (`matplotlib`+`numpy`)." |
37 | 69 | ] |
|
393 | 425 | "name": "python", |
394 | 426 | "nbconvert_exporter": "python", |
395 | 427 | "pygments_lexer": "ipython3", |
396 | | - "version": "3.9.6" |
| 428 | + "version": "3.11.5" |
397 | 429 | } |
398 | 430 | }, |
399 | 431 | "nbformat": 4, |
400 | | - "nbformat_minor": 2 |
| 432 | + "nbformat_minor": 4 |
401 | 433 | } |
0 commit comments