# 4.3.7. pde.pdes.laplace module¶

Solvers for Poisson’s and Laplace’s equation

solve_laplace_equation(grid, bc, label="Solution to Laplace's equation")[source]

Solve Laplace’s equation on a given grid.

This is implemented by calling solve_poisson_equation() with a vanishing right hand side.

Parameters
Returns

The field that solves the equation. This field will be defined on the given grid.

Return type

ScalarField

solve_poisson_equation(rhs, bc, label="Solution to Poisson's equation", **kwargs)[source]

Solve Laplace’s equation on a given grid

Denoting the current field by $$u$$, we thus solve for $$f$$, defined by the equation

$\nabla^2 u(\boldsymbol r) = -f(\boldsymbol r)$

with boundary conditions specified by bc.

Note

In case of periodic or Neumann boundary conditions, the right hand side $$f(\boldsymbol r)$$ needs to satisfy the following condition

$\int f \, \mathrm{d}V = \oint g \, \mathrm{d}S \;,$

where $$g$$ denotes the function specifying the outwards derivative for Neumann conditions. Note that for periodic boundaries $$g$$ vanishes, so that this condition implies that the integral over $$f$$ must vanish for neutral Neumann or periodic conditions.

Parameters
Returns

The field $$u$$ that solves the equation. This field will be defined on the same grid as rhs.

Return type

ScalarField