Erik Schnetter <schnetter@gmail.com>

November 25, 2014


This is an example thorn describing how to use the TATPETSc interface to PETSc. It solves the Poisson equation for a spherical charge distribution on a uniform grid.

1 Introduction

PETSc is a well-known library for solving elliptic equations. TATPETSc is a Cactus thorn that provides a wrapper for calling PETSc to solve elliptic equations on uniform grids. (TATPETSc currently supports neither mesh refinement nor multi-block systems.) TATPETSc can solve both linear and non-linear systems.

2 Physical System

Here we solve the Poisson equation

ΔΦ(x) = ρ(x) (1)

where the right hand side ρ is given by

ρ(r) = QV r R 0 r > R (2)