Skip to content

Latest commit

 

History

History
35 lines (25 loc) · 2.19 KB

README.md

File metadata and controls

35 lines (25 loc) · 2.19 KB

Poisson Solver:

This project contains the files which solve the Maxwell's constraint equation for electric fields:

This is done in the electrostatic limit:

Hence the reduced equation we need to solve is:

Dependencies:

The solver makes use of ArrayFire and requires it to be built and installed on the system of usage in addition to the python interface(arrayfire-python. The following Python packages are also required:

  • numpy
  • pytest

Once ArrayFire is installed successfully, all other dependencies can be installed using pip install -r requirements.txt

Usage:

The function fft_poisson assumes that in the density array, x varies along axis 0, y varies along axis 1, z varies along axis 2. Additionally, we consider cell centered formulation to be used throughout. Hence the density array needs to be passed to the function following these conventions:

from fft_poisson_3d import fft_poisson
Ex, Ey, Ez = fft_poisson(rho, dx, dy, dz)

Testing:

The solver can be tested by running:

py.test test_fft_poisson_3d.py