retains the physical interpretation of the state variables and preserves the coupling structure; and
respects the symmetric property of structure-preserving space discretizations.
@harsh5332392 will take the lead on this. To begin, the main steps will be creating a SymplecticBasis class (cotangent lift algorithm) and a HamiltonianModel class that does the constrained optimization in fit() and symplectic integration in predict().
Suggested implementation steps:
Basis
[ ] Create a new file, /src/opinf/basis/_symplectic.py
[ ] Write a SymplecticBasis class that inherits from opinf.basis.LinearBasis and implement fit(). Or, you might be able to do this quickly by inheriting from the PODBasisMulti class, which represents a block diagonal POD (one POD for each variable).
[ ] Import the new class in /src/opinf/basis/__init__.py.
[ ] Write and run tests for the new classes in a new file /tests/basis/test_symplectic.py.
[ ] Compile the docs (make docs) and check that the automatically generated documentation page looks good.
[ ] If possible, write a short section about this class in docs/source/guides/reduction.md. We should probably turn this into a notebook that shows the different kinds of basis functions you get from POD and the symplectic approach.
Model Class
[ ] Create a new file, /src/opinf/models/multi/_hamiltonian.py.
[ ] Write a HamiltonianModel class in the new file.
[ ] The fit() method should take in the data matrices, do the constrained optimizations, and initialize the operators of the ROM.
[ ] Implement the predict() method with a symplectic integrator.
[ ] Write and run tests for the new class in a new file /tests/models/multi/test_hamiltonian.py
[ ] Compile the docs and check that the automatically generated documentation page looks good.
[ ] Write a tutorial as a new Jupyter Notebook, docs/source/tutorials/hamiltonian.ipynb with the linear wave equation example.
New feature: Hamiltonian Operator Inference from the paper Hamiltonian operator inference: Physics-preserving learning of reduced-order models for canonical Hamiltonian systems by Harsh Sharma (@harsh5332392), Zhu Wang, and Boris Kramer (@bokramer). The goal is to use Operator Inference for a canonical Hamiltonian system to learn a ROM that
@harsh5332392 will take the lead on this. To begin, the main steps will be creating a
SymplecticBasis
class (cotangent lift algorithm) and aHamiltonianModel
class that does the constrained optimization infit()
and symplectic integration inpredict()
.Suggested implementation steps:
Basis
/src/opinf/basis/_symplectic.py
SymplecticBasis
class that inherits fromopinf.basis.LinearBasis
and implementfit()
. Or, you might be able to do this quickly by inheriting from thePODBasisMulti
class, which represents a block diagonal POD (one POD for each variable)./src/opinf/basis/__init__.py
./tests/basis/test_symplectic.py
.make docs
) and check that the automatically generated documentation page looks good.docs/source/guides/reduction.md
. We should probably turn this into a notebook that shows the different kinds of basis functions you get from POD and the symplectic approach.Model Class
/src/opinf/models/multi/_hamiltonian.py
.HamiltonianModel
class in the new file.fit()
method should take in the data matrices, do the constrained optimizations, and initialize the operators of the ROM.predict()
method with a symplectic integrator./tests/models/multi/test_hamiltonian.py
docs/source/tutorials/hamiltonian.ipynb
with the linear wave equation example.