poisson-fast-mc

Fast Monte Carlo estimator for numerically solving a Poisson PDE.

https://github.com/johnny-godoy/poisson-fast-mc

Science Score: 44.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (9.2%) to scientific vocabulary

Keywords

jupyter-notebook laplace-equation monte-carlo numerical-methods partial-differential-equations python
Last synced: 6 months ago · JSON representation ·

Repository

Fast Monte Carlo estimator for numerically solving a Poisson PDE.

Basic Info
  • Host: GitHub
  • Owner: johnny-godoy
  • License: mit
  • Language: Python
  • Default Branch: main
  • Homepage:
  • Size: 3.11 MB
Statistics
  • Stars: 2
  • Watchers: 1
  • Forks: 0
  • Open Issues: 0
  • Releases: 0
Topics
jupyter-notebook laplace-equation monte-carlo numerical-methods partial-differential-equations python
Created over 3 years ago · Last pushed over 2 years ago
Metadata Files
Readme License Citation

README.md

Monte Carlo solver for the Poisson Equation

In this repository, we provide a Python library with solvers for the Poisson equation on a square domain with Dirichlet conditions using Monte Carlo methods, including our own custom solver with significant optimizations.

Installation and usage

To install the Python library, run the following command:

pip install git+https://github.com/johnny-godoy/poisson-fast-mc.git After that, you can import solvers from the following files:

  • monte_carlo_solvers.py Uses the usual implementation, obtained from here. It also adds bayesian estimations for the probability of an endpoint being reached from a starting point.
  • subwalk_monte_carlo_solvers.py Uses our own custom implementation which improves runtime by reusing every subwalk of the generated random walks.
  • finite_difference_solver.py The usual finite difference solver.
  • hybrid_solver.py A hybrid solver that uses the subwalk solver to obtain a primer, and then uses conjugate gradient iterations starting from the primer to solve the finite difference system.

With the Python code:

from poisson_mc_comparison import {solver_filename}

Reports

The report directory contains a Jupyter Notebook, a poster and a slideshow, and were designed to explain the algorithms and their performances. Note that these are in Spanish. You may also view the Jupyter Notebook report as HTML here.

About

The reports were done as a capstone project for the course MA5307: "Numerical Analysis in Partial Differential Equations, Theory and Practice", taught by Axel Osses at Universidad de Chile, Department of Mathematical Engineering.

The original subject of this project was to compare the performance of a simple MC solver with the finite difference solver, but we ended up also designing the subwalk solver to improve performance over the usual MC solver.

Owner

  • Name: Johnny Godoy
  • Login: johnny-godoy
  • Kind: user

Finishing my degree in Mathematical Engineering (equivalent to an M.Sc. in Applied Mathematics) and M.Sc. in Data Science. I like cows.

Citation (CITATION.cff)

cff-version: 1.2.0
message: "If you use this software, please cite it as below."
authors:
- family-names: "Godoy"
  given-names: "Johnny"
- family-names: "Santidrián"
  given-names: "Javier"
- family-names: "Yañez"
  given-names: "Patricio"
title: "Fast Monte Carlo solver for the Poisson Equation using subwalks"
version: 1.0.0
date-released: 2022-08-03
url: "https://github.com/johnny-godoy/poisson-fast-mc"

GitHub Events

Total
Last Year