Two application routines are constructed that lead to the solution of sparse linear systems of algebraic equations with size (M+N) by (M+N). The operations to build the matrices and solve the equations use the defined operations for sparse matrices and the provided utilities to build the data structures.
There are two executables which may be generated using the makefile.
Routine driverPiecewiseLinear fits a piecewise-linear, continuous function to sampled points of the quadratic function, t**2. The use of t**2 is for illustration only.
This program uses piece-wise linear, continuous functions to solve a boundary value problem using finite elements. The problem is Airy's equation with values x(0)=1 and x(1)=1 and requires the solution of a linear system of size (2*n - 2) by (2*n - 2).
Data Fitting of y(t)=t**2, (0,1). The number of breakpoints (N) and data points (M) 2000 14810 Relative Error (1) (Vector Norm) with solution and computed residual = 1.97996E-13 The SuperLU factorization completed with N = 16810 The nonzero values of L, U and their sum = 126191 120569 246760 Memory Usage (KBytes) for LU step = 2.528608E+03 Total Usage (KBytes) for all terms = 6.361288E+03 Repeated Data Fitting of y(t)=t**2, (0,1) - No Factorization -. The number of breakpoints (N) and data points (M) 2000 14810 Relative Error (2) (Vector Norm) with solution and computed residual = 1.97996E-13
x(2) = 0.1000E+01 x(n-1) = 0.1000E+01 With n function values = 10001 Maximum Least Squares Residual Value = 4.9998D-09