dimitris kalamaras

math, social network analysis, web dev, free software…

Day: August 5, 2008

Sparse Linear Systems Solver With SOR

This is a very simple Pascal program I wrote in mid 1990s, which solves a sparse NxN linear system using the Succesive Overrelaxation Method (SOR), which in turn is based on Gauss Seidel Method.
Both methods are iterative.

N is initially set at maximum …64.
You need the W factor for the SOR to complete successful. The theory assures us that it must be W=1.062.

Read More

Tridiagonal Linear System Solver

This Pascal program is usefull in solving large tridiagonal linear systems. An example is the systems emerging from numerically integrating parabolic PDE’s by Finite Differences method.

It was ported to Turbo Pascal from a Fortran 77 program.
Its usage is very simple. All you have to do is to enter dimension of the system and the data, ie the three diagonals and the constant vector. Have fun…

Read More

LIFO (2001)

The goal of this project was to create a class (named lifo) of Last-In-First-Out Lists (Stacks) of integers with variable length. The class actually defines a new Data Type, named lifo. Each variable of this type will be a LIFO List. Of course, the class must have defined some operations (member-functions) for handling the lists, ie PUSH an integer to a stack, POP an integer from the stack, PRINT a list, COPY one list to another, COMPARE two lists, CONCATENATE two lists, SEARCH a list for an element etc.
The program is quite simple. It creates an “array” a of 100 elements of type lifo. Thus, it creates 100 LIFO lists and displayes a simple menu as user interface with the above actions.

It was written in Borland C++ v.5 but I think you can compile and run it in any compiler due of its simplicity. It only requires the iostream.h for cout and cin.

Read More

Powered by WordPress & Theme by Anders Norén