## Poisson

November 25, 2014

Abstract

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 reﬁnement nor multi-block systems.) TATPETSc can solve both linear and non-linear systems.

### 2 Physical System

Here we solve the Poisson equation

$\begin{array}{rcll}\Delta \Phi \left(x\right)& =& \rho \left(x\right)& \text{(1)}\text{}\text{}\end{array}$

where the right hand side $\rho$ is given by

$\begin{array}{rcll}\rho \left(r\right)& =& \left\{\begin{array}{cc}Q∕V\hfill & r\le R\hfill \\ 0\hfill & r>R\hfill \end{array}\right\& \text{(2)}\text{}\text{}\end{array}$