<- previous index next ->
When the number of degrees of freedom gets large, the size of the matrix for the system of simultaneous equations may get larger than acceptable for your computer. For example a four dimensional PDE with 10 DOF in each dimension has 10^4 = 10,000 DOF. The non sparse simultaneous equations would require at least 10,000 by 10,000 entries, 10^8 times 8 bytes = 0.8GB. Much larger PDE's, need to be solved. A sparse matrix stores only the non zero entries. A system of simultaneous equations does not have a unique solution if any row is all zeros, thus a sparse structure has at least one entry of each row. Then in each row, the column index and value are stored for the non zero values. Typical spare data structures use a singly linked list for each row, keeping the column index in increasing numerical order. Optimized code is typically written for inserting and adding entries, solving simultaneous equations, vector times matrix multiplication and a few other operations. For various languages, the sparse packages are shown with the initial test programs and several PDE solutions."C" implementation of sparse
"C" source code sparse.c "C" header file sparse.c "C" test code test_sparse.c test output test_sparse_c.out "C" more test code test1_sparse.c test output test1_sparse_c.out simple conversion to sparse_abc.c output of sparse_abc_c.out "C" source code pde44_sparse.c test_output pde44_sparse_c.outAda implementation of sparse
For subscripts starting with zero Ada source code sparse.adb Ada package specification sparse.ads Ada test code test_sparse.adb test output test_sparse_ada.out For subscripts starting with one Ada source code sparse1.adb Ada package specification sparse1.ads Ada test code test_sparse1.adb test output test_sparse1_ada.out simple conversion to sparse_abc.adb output of sparse_abc_ada.out Ada source code pde44_sparse.adb test_output pde44_sparse_ada.outJava implementation of sparse
Java source code sparse.java Java test code test_sparse.java test output test_sparse_java.out simple conversion to sparse_abc.java output of sparse_abc_java.out Java source code pde44_sparse.java test_output pde44_sparse_java.outFortran implementation of sparse
For subscripts starting with zero Fortran source code sparse.f90 Fortran test code test_sparse.f90 test output test_sparse_f90.out For subscripts starting with one Fortran source code sparse1.f90 Fortran test code test_sparse1.f90 test output test_sparse1_f90.out Fortran source code pde44_sparse.f90 test_output pde44_sparse_f90.out
<- previous index next ->