A python implementation of the Oliker-Prussner-Method for solving the 2 dimensional Monge-Ampère-Equation.
Project description
Oliker-Prussner-Method
This Python package implements the Oliker-Prussner-Method [1] for solving a two dimensional version of the Monge-Ampère-Equation:
$$\det \left(D^2 u(x,y)\right)=f(x,y)$$
This was originally a project as part of a bachelor's thesis and is currently being maintained even after its completion. A copy of the thesis (german only) is included as a detailed documentation about the working principles of this method.
We should also mention that this software does not implement the additional Newton-Iteration proposed by Oliker and Prussner in [1], that can be used to gain an additional convergence speed up. We only implemented the pure iteration sceme from Oliker and Prussner.
How to use this software
We now give brief instructions on how to use and manipulate this software for your own purpose, including neccessary steps on how to set up python correctly.
When executing this software, be aware that the running time increases quickly with a growing number of grid points! With as less as 1000 total grid points we began to see running times of several hours and by increasing the accuracy of the terminal criteria (the Monge-Ampère-Measure that shall be approximated) we even saw running times of multiple days. We should also mention, that the code is currently not parallelized! THUS ONLY RUN BIG EXAMPLES WITH DECENT PREPARATION AND/OR CODE MODIFICATION!
Software parts
This GitHub repository contains an example file main.py for a basic workflow when solving the Monge-Ampère-Equation.
The functionallity of this package is distributed among the following four files (located in the src folder):
oliker_prussner_method.core: core functionalities for running the iteration sceme of the Oliker-Prussner-Method.oliker_prussner_method.initialisation: Creates initial functions and calculating the desired initial measures for the iteration sceme from the right hand side function $f$.oliker_prussner_metod.triangulation: Contains important functionallity for handling the triangulation and convex hull.oliker_prussner_method.plotting: Contains helper functions and functionallity for plotting the results.
Python installation
This package was originally developed with Python version 3.12.9 and should work with newer versions as well.
After installing a suitable python version (Download here), you can simply download this package via pip (The example main.py is not included in the pip download!) and automatically install all dependencies:
python -m pip install oliker_prussner_method
You can also manually download the repository via git and install the package via pip into your Python environment:
mkdir path/to/new/folder
cd path/to/new/folder
git clone https://github.com/yannick-hoeffner/oliker_prussner_method .
python -m pip install -e .
Basic workflow
An example for the use of this code is supplied via the main.py file.
You have to create an initial list of grid points, a boundary mask indicating which grid point is a boundary point and the function values modeling the boundary condition.
Then oliker_prussner_method.initialisation.py automatically calculates an initial triangulation and an intial function for the iteration sceme.
You then either have to supply the Monge-Ampère-Measure that the Oliker-Prussner-Method should approximate at every vertex or you can supply a python function for evaluating the right hand side function $f$. In the latter case oliker_prussner_method.initialisation.py provides functionallity for automatically calculating the Monge-Ampère-Measure at each vertex.
Now you simply need to call oliker_prussner_method.core.oliker_prussner_sceme with the gathered arrays to run the Oliker-Prussner-Method.
References
- [1] Oliker, V.I., and Prussner, L.D (1989). "On the Numerical Solution of the Equation ....-(....) = f and Its Discretizations, I.." In: Numerische Mathematik 54.3 : 271-294. http://eudml.org/doc/133318
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file oliker_prussner_method-1.0.1.tar.gz.
File metadata
- Download URL: oliker_prussner_method-1.0.1.tar.gz
- Upload date:
- Size: 16.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
210b557ac10653992bb6ca4082299560c703d0965fb6202e367ed79b790d5ca0
|
|
| MD5 |
b2224deafd04550204417576ea71d23b
|
|
| BLAKE2b-256 |
49578fbc870d7c28d995a0f183ed3b9bb615ad105687bc40b806f150c97a5ab8
|
File details
Details for the file oliker_prussner_method-1.0.1-py3-none-any.whl.
File metadata
- Download URL: oliker_prussner_method-1.0.1-py3-none-any.whl
- Upload date:
- Size: 17.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
77bec9b8ec9b7c4f05c424120d0cd8793189f9ee80fec2b4ad4695832fc1115e
|
|
| MD5 |
237fe7fb991e5bcc9f760b68cd075973
|
|
| BLAKE2b-256 |
a4bbbd90d3ab97affc25f207ef3488bca28a0dd3c88c04c9ec9187ee411e915c
|