Skip to main content

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):

  1. oliker_prussner_method.core: core functionalities for running the iteration sceme of the Oliker-Prussner-Method.
  2. oliker_prussner_method.initialisation: Creates initial functions and calculating the desired initial measures for the iteration sceme from the right hand side function $f$.
  3. oliker_prussner_metod.triangulation: Contains important functionallity for handling the triangulation and convex hull.
  4. 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

oliker_prussner_method-1.0.0.tar.gz (17.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

oliker_prussner_method-1.0.0-py3-none-any.whl (17.9 kB view details)

Uploaded Python 3

File details

Details for the file oliker_prussner_method-1.0.0.tar.gz.

File metadata

  • Download URL: oliker_prussner_method-1.0.0.tar.gz
  • Upload date:
  • Size: 17.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for oliker_prussner_method-1.0.0.tar.gz
Algorithm Hash digest
SHA256 80630386442abc9240b94cbcf24bbfec2f7cab1b5e1008d6a1b5209b6bb051e7
MD5 a175a95e1b37fe18b478ea1162f173a9
BLAKE2b-256 4b873bcb43b7c01d60070c5e00c4c795f2fc013620ead3eb416def1533b1abe0

See more details on using hashes here.

File details

Details for the file oliker_prussner_method-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for oliker_prussner_method-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6c508171abdf4a9d1312cae9248951b5ce5aacb55b02cfd112416d5f8a27285d
MD5 eaf78da1972ef900bf788f7e12cc33f3
BLAKE2b-256 7a8db5efec80072d43c90e05387386d50c8785e95cba1722f3ac8260ec32ee3e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page