Ryan Krattiger and Russley Shaw
Solve the Poisson Equation for a simple case. The problem is presented as such...
Uxx + Uyy = 2(x2 + y2) | D: 0 < x < 1 and 0 < y < 1 | |
---|---|---|
with boundary conditions (BC) as | ||
U(x,0) = 1 - x2 | U(x,1) = 2(1 - x2) | 0 < x < 1 |
U(0,y) = 1 + y2 | U(1,y) = 0 | 0 < y < 1 |
The analytical solution is known to be...
U(x,y) = (1 - x2)(1 + y2)
Data structures that are commonly used in linear algebra are Vectors and Matrices. In order to take advantage of special matrices, a interface is used and derived into the following listed matrices.
Underlying data structure, operators like a hybrid of the STL vector and a math Vector.
Abstract matrix type, defines the interface for all other matrix types.
A data structure for densely packed matrix data.
A matrix that holds banded matrix data. Assumes a relatively dense banding between the center band and the outer bands.
A tridiagonal matrix, derived from the BandedMatrix
Also can be used as a Triangle matrix. Store the upper and lower triangle data respectively. This matrix is assumed to always be square.
Stores a dense set of matrix data that is symmetric. This matrix is assumed to always be square.
Solvers that are used to solver numerical problems in linear algebra.
A Poisson solver that handles all Poisson equations taking BoundaryConditions and a Forcing function. The solver allows the user to define the number of points to solve over.
Steepest descent optimization scheme implemented for matrix solving.
The iterative Gauss-Seiedel method, also known as Liebmann method, to solving systems of linear equations.
A class to store upper and lower boundary conditions. Currently only for a 2D domain of x and y.
An abstract functor class that is used to the Poisson forcing function.
A unit testing library
There are unit tests made up and exist in the /test
folder and are compiled in the command make test
.
The driver is the main program that demonstrates the usage of this class library using the Poisson solver. Additionally it includes important unit tests. At this stage tester.cpp and driver.cpp are very similar in funcitonality. However, driver is intended to be a demonstration of general usage as it would be done by scientists and engineers.