https://github.com/simonschoelly/poisson-solver
A solver for a modified poisson equation using cuda.
https://github.com/simonschoelly/poisson-solver
cpp cuda finite-difference gpgpu pgc poisson-equation preconditioned-conjugate-gradient thomas-algorithm
Last synced: 5 months ago
JSON representation
A solver for a modified poisson equation using cuda.
- Host: GitHub
- URL: https://github.com/simonschoelly/poisson-solver
- Owner: simonschoelly
- Created: 2018-02-27T13:51:45.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2018-06-30T15:58:41.000Z (over 7 years ago)
- Last Synced: 2025-03-01T18:14:30.927Z (10 months ago)
- Topics: cpp, cuda, finite-difference, gpgpu, pgc, poisson-equation, preconditioned-conjugate-gradient, thomas-algorithm
- Language: C++
- Homepage:
- Size: 204 KB
- Stars: 0
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Poisson-Solver
This repository contains a solver for the the modified Poisson-equation
-Δu(x) + αu(x) = f(x), x∈Ω, ∂Ω = 0, α >0
where the domain Ω is either square or cubic.
The solver discretizes this equation using central finite differences to get a linear system and then
runs the preconditioned conjugate gradient method to solve this system.
For the preconditioner we use a tridiagonal matrix that we can efficiently invert using Cuda on a Nvidia graphic card.
I developed this code for my Bachelor thesis but did not look at it since then. It still seems to compile though. Maybe someone has a use for it.
## Directory structure
├── README.md
├── cublas_wrapper.h # wrapper functions around some cublas functions
├── makefile
├── misc.h # some small helper functions
├── preconditioner.h # Cuda kernels that solve solve the linear system for the preconditioner
├── solver.h # functions that apply the preconditioned conjugate gradient to solve the problem
└── test.cu # demonstrates how to use the given code and runs tests for the different implementations.