Class PoissonEquation2D
- java.lang.Object
-
- dev.nm.analysis.differentialequation.pde.finitedifference.elliptic.dim2.PoissonEquation2D
-
- All Implemented Interfaces:
PDE
public class PoissonEquation2D extends Object implements PDE
Poisson's equation is an elliptic PDE that takes the following general form. \[ \frac{\partial^2 u}{\partial x^2} + \frac{\partial^2 u}{\partial y^2} = f(x, y) \] with Dirichlet boundary conditions: \[ u(0, y) = g(0, y) \\ u(a, y) = g(a, y) \\ u(x, 0) = g(x, 0) \\ u(x, b) = g(x, b) \] assuming that the domain of the independent variables is a rectangular region in the x-y plane. Note that LaPlace's equation emerges as a special case when \(f(x, y) = 0\).- See Also:
- Wikipedia: Poisson's equation
-
-
Constructor Summary
Constructors Constructor Description PoissonEquation2D(double a, double b, BivariateRealFunction f, BivariateRealFunction g)
Constructs a Poisson's equation problem.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double
a()
Gets the width (x-axis) of the rectangular region.double
b()
Gets the height (y-axis) of the rectangular region.double
f(double x, double y)
The forcing term.double
g(double x, double y)
The boundary value function.
-
-
-
Constructor Detail
-
PoissonEquation2D
public PoissonEquation2D(double a, double b, BivariateRealFunction f, BivariateRealFunction g)
Constructs a Poisson's equation problem.- Parameters:
a
- the region of interest (0, a)b
- the region of interest (0, b)f
- the forcing term in the equation f(x, y)g
- the Dirichlet boundary condition g(x, y)
-
-
Method Detail
-
a
public double a()
Gets the width (x-axis) of the rectangular region.- Returns:
- the x size of the region
-
b
public double b()
Gets the height (y-axis) of the rectangular region.- Returns:
- the y size of the region
-
f
public double f(double x, double y)
The forcing term.- Parameters:
x
- the first independent variabley
- the second independent variable- Returns:
- f(x, y), the forcing function
-
g
public double g(double x, double y)
The boundary value function. These are Dirichlet (or first-type) boundary conditions.- Parameters:
x
- the first independent variabley
- the second independent variable- Returns:
- g(x, y), the boundary condition
-
-