Skip to content

Commit 057c241

Browse files
committed
Added back-end API figure to tutorial
1 parent 7ac9f3f commit 057c241

File tree

2 files changed

+37
-5
lines changed

2 files changed

+37
-5
lines changed
161 KB
Loading

tutorials/developers-tutorial1/developers-help-1.ipynb

Lines changed: 37 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,47 @@
2323
"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**."
2424
]
2525
},
26+
{
27+
"cell_type": "markdown",
28+
"metadata": {},
29+
"source": [
30+
"## The Back-end API"
31+
]
32+
},
2633
{
2734
"cell_type": "markdown",
2835
"metadata": {},
2936
"source": [
3037
"The necessary bricks for building the new DMD version are:\n",
3138
"\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+
"![](PyDMD-structure.png)\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",
3567
"\n",
3668
"We start the new module by importing all these classes and the usual math environment (`matplotlib`+`numpy`)."
3769
]
@@ -393,9 +425,9 @@
393425
"name": "python",
394426
"nbconvert_exporter": "python",
395427
"pygments_lexer": "ipython3",
396-
"version": "3.9.6"
428+
"version": "3.11.5"
397429
}
398430
},
399431
"nbformat": 4,
400-
"nbformat_minor": 2
432+
"nbformat_minor": 4
401433
}

0 commit comments

Comments
 (0)