This repository contains the source code, which contains selected contributions of the paper Kinon, P. L., Morandin, R. & Schulze, P. (2025): Discrete gradient methods for port-Hamiltonian differential-algebraic equations.
If you found our project helpful or you have used it in your academic work, please consider citing it:
@misc{kinon_morandin_schulze_2025,
title={Discrete gradient methods for port-Hamiltonian differential-algebraic equations},
author={Philipp L. Kinon and Riccardo Morandin and Philipp Schulze},
year={2025},
eprint={2505.18810},
archivePrefix={arXiv},
primaryClass={math.NA},
url={https://arxiv.org/abs/2505.18810},
}
and the latest Zenodo-DOI. Please see license.
The implementation of time integrators and example systems has been done in the package pydykit
, which is used here.
-
Clone this repository to your machine.
-
Open a terminal and navigate to your local clone.
-
Create a new virtual environment and activate it. We recommend using
venv
:python3.12 -m venv .venv source .venv/bin/activate
pip install pydykit==0.0.6
This repo can be used in two ways:
-
For validation:
Extract your desired result data as
.csv
-file data from the results folder. -
For verification:
In the terminal, with the activated environment, run your desired script:
python scripts/*.py
This will overwrite the correspoding results file in the results folder. For the error analysis choose the desired integration scheme in the respective script.