dir templates for Base Directory file BiCG.f for * , SUBROUTINE BICG( N, B, X, WORK, LDW, ITER, RESID, MATVEC, , $ MATVECTRANS, PSOLVE, PSOLVETRANS, INFO ) , * , * , * -- Iterative template routine -- , * Univ. of Tennessee and Oak Ridge National Laboratory , * October 1, 1993 , * Details of this algorithm are described in "Templates for the , * Solution of Linear Systems: Building Blocks for Iterative size 8109 file BiCGREVCOM.f for * , SUBROUTINE BICGREVCOM( N, B, X, WORK, LDW, ITER, RESID, INFO, , $ NDX1, NDX2, SCLR1, SCLR2, IJOB) , * , * , * -- Iterative template routine -- , * Univ. of Tennessee and Oak Ridge National Laboratory , * October 1, 1993 , * Details of this algorithm are described in "Templates for the , * Solution of Linear Systems: Building Blocks for Iterative size 10373 file BiCG.c for /* BiCG.f -- translated by f2c (version of 20 August 1993 13:15:44). , You must link the resulting object file with the libraries: , -lf2c -lm (in that order) , */ , , #include "f2c.h" , , /* Table of constant values */ , , static integer c__1 = 1; size 9092 file BiCGSTAB.f for * , SUBROUTINE BICGSTAB( N, B, X, WORK, LDW, ITER, RESID, MATVEC, , $ PSOLVE, INFO ) , * , * -- Iterative template routine -- , * Univ. of Tennessee and Oak Ridge National Laboratory , * October 1, 1993 , * Details of this algorithm are described in "Templates for the , * Solution of Linear Systems: Building Blocks for Iterative , * Methods", Barrett, Berry, Chan, Demmel, Donato, Dongarra, size 6987 file BiCGSTABREVCOM.f for * , SUBROUTINE BICGSTABREVCOM(N, B, X, WORK, LDW, ITER, RESID, INFO, , $ NDX1, NDX2, SCLR1, SCLR2, IJOB) , * , * -- Iterative template routine -- , * Univ. of Tennessee and Oak Ridge National Laboratory , * October 1, 1993 , * Details of this algorithm are described in "Templates for the , * Solution of Linear Systems: Building Blocks for Iterative , * Methods", Barrett, Berry, Chan, Demmel, Donato, Dongarra, size 11714 file CG.f for * , SUBROUTINE CG( N, B, X, WORK, LDW, ITER, RESID, MATVEC, , $ PSOLVE, INFO ) , * , * -- Iterative template routine -- , * Univ. of Tennessee and Oak Ridge National Laboratory , * October 1, 1993 , * Details of this algorithm are described in "Templates for the , * Solution of Linear Systems: Building Blocks for Iterative , * Methods", Barrett, Berry, Chan, Demmel, Donato, Dongarra, size 5861 file CGREVCOM.f for * , SUBROUTINE CGREVCOM( N, B, X, WORK, LDW, ITER, RESID, INFO, , $ NDX1, NDX2, SCLR1, SCLR2, IJOB) , * , * -- Iterative template routine -- , * Univ. of Tennessee and Oak Ridge National Laboratory , * October 1, 1993 , * Details of this algorithm are described in "Templates for the , * Solution of Linear Systems: Building Blocks for Iterative , * Methods", Barrett, Berry, Chan, Demmel, Donato, Dongarra, size 8143 file CGS.f for * , SUBROUTINE CGS( N, B, X, WORK, LDW, ITER, RESID, MATVEC, PSOLVE, , $ INFO ) , * , * -- Iterative template routine -- , * Univ. of Tennessee and Oak Ridge National Laboratory , * October 1, 1993 , * Details of this algorithm are described in "Templates for the , * Solution of Linear Systems: Building Blocks for Iterative , * Methods", Barrett, Berry, Chan, Demmel, Donato, Dongarra, size 6841 file CGSREVCOM.f for * , SUBROUTINE CGSREVCOM(N, B, X, WORK, LDW, ITER, RESID, INFO, , $ NDX1, NDX2, SCLR1, SCLR2, IJOB) , * , * -- Iterative template routine -- , * Univ. of Tennessee and Oak Ridge National Laboratory , * October 1, 1993 , * Details of this algorithm are described in "Templates for the , * Solution of Linear Systems: Building Blocks for Iterative , * Methods", Barrett, Berry, Chan, Demmel, Donato, Dongarra, size 11578 file Cheby.f for * , SUBROUTINE CHEBY( N, B, X, WORK, LDW, ITER, RESID, MATVEC, , $ PSOLVE, INFO ) , * , * -- Iterative template routine -- , * Univ. of Tennessee and Oak Ridge National Laboratory , * October 1, 1993 , * Details of this algorithm are described in "Templates for the , * Solution of Linear Systems: Building Blocks for Iterative , * Methods", Barrett, Berry, Chan, Demmel, Donato, Dongarra, size 6448 file ChebyREVCOM.f for * , SUBROUTINE CHEBYREVCOM( N, B, X, WORK, LDW, ITER, RESID, INFO, , $ NDX1, NDX2, SCLR1, SCLR2, IJOB) , * , * -- Iterative template routine -- , * Univ. of Tennessee and Oak Ridge National Laboratory , * October 1, 1993 , * Details of this algorithm are described in "Templates for the , * Solution of Linear Systems: Building Blocks for Iterative , * Methods", Barrett, Berry, Chan, Demmel, Donato, Dongarra, size 8147 file GMRES.f for * , SUBROUTINE GMRES( N, B, X, RESTRT, WORK, LDW, WORK2, LDW2, , $ ITER, RESID, MATVEC, PSOLVE, INFO ) , * , * -- Iterative template routine -- , * Univ. of Tennessee and Oak Ridge National Laboratory , * October 1, 1993 , * Details of this algorithm are described in "Templates for the , * Solution of Linear Systems: Building Blocks for Iterative , * Methods", Barrett, Berry, Chan, Demmel, Donato, Dongarra, size 6401 file GMRESREVCOM.f for * , SUBROUTINE GMRESREVCOM(N, B, X, RESTRT, WORK, LDW, WORK2, , $ LDW2, ITER, RESID, INFO, NDX1, NDX2, SCLR1, , $ SCLR2, IJOB) , * , * -- Iterative template routine -- , * Univ. of Tennessee and Oak Ridge National Laboratory , * October 1, 1993 , * Details of this algorithm are described in "Templates for the , * Solution of Linear Systems: Building Blocks for Iterative size 15785 file Jacobi.f for * , SUBROUTINE JACOBI( N, B, X, WORK, LDW, ITER, RESID, MATVEC, , $ INFO ) , * , * -- Iterative template routine -- , * Univ. of Tennessee and Oak Ridge National Laboratory , * October 1, 1993 , * Details of this algorithm are described in "Templates for the , * Solution of Linear Systems: Building Blocks for Iterative , * Methods", Barrett, Berry, Chan, Demmel, Donato, Dongarra, size 5611 file JacobiREVCOM.f for * , SUBROUTINE JACOBIREVCOM(N, B, X, WORK, LDW, ITER, RESID, , $ INFO, NDX1, NDX2, SCLR1, SCLR2, IJOB) , * , * -- Iterative template routine -- , * Univ. of Tennessee and Oak Ridge National Laboratory , * October 1, 1993 , * Details of this algorithm are described in "Templates for the , * Solution of Linear Systems: Building Blocks for Iterative , * Methods", Barrett, Berry, Chan, Demmel, Donato, Dongarra, size 7227 file Makefile for FC = gcc , , FFLAGS = , , f2cLIBS = F2CLIBS/libF77.a F2CLIBS/libI77.a , , tester_o = Tester.o MatGen.o dspdchk.o dnsychk.o \ , CG.o BiCG.o CGS.o BiCGSTAB.o GMRES.o QMR.o Cheby.o \ , Jacobi.o SOR.o Utils.o \ , MatVec.o PSolve.o \ size 430 file MatGen.f for * , * This file contains routines for forming matrices that result from , * a 5- or 7-point discretization of elliptic PDEs with Dirichlet , * boundary conditions, and a consistent mass matrix "Wathen". , * , * GEN57PT and GETSTEN are from SPARSEKIT. They actually form the , * row compressed matrix. , * , * COEFF provides the functions for computing the coefficients , * of the PDE. size 18903 file MatVec.f for * , SUBROUTINE MATVEC( ALPHA, X, BETA, Y ) , * , * This MatVec routine assumes the matrix is in dense format, , * and uses the BLAS DGEMV. , * , * .. Scalar Arguments .. , DOUBLE PRECISION ALPHA, BETA , * .. , * .. Array Arguments .. size 1603 file PSolve.f for * , * This file contains the preconditioner solve routines: , * , * PSOLVE and PSOLVETRANS call the appropriate solver: , * , * PSOLVENONE and PSOLVENONETRANS for using no preconditioning. , * , * PSOLVEJAC and PSOLVEJACTRANS for Jacobi preconditioning. , * , * Also included are the solvers for QMR which require left and right size 7489 file QMR.f for * , SUBROUTINE QMR( N, B, X, WORK, LDW, ITER, RESID, MATVEC, , $ MATVECTRANS, PSOLVEQ, PSOLVETRANSQ, INFO ) , * , * , * -- Iterative template routine -- , * Univ. of Tennessee and Oak Ridge National Laboratory , * October 1, 1993 , * Details of this algorithm are described in "Templates for the , * Solution of Linear Systems: Building Blocks for Iterative size 9658 file QMRREVCOM.f for * , SUBROUTINE QMRREVCOM(N, B, X, WORK, LDW, ITER, RESID, INFO, , $ NDX1, NDX2, SCLR1, SCLR2, IJOB) , * , * , * -- Iterative template routine -- , * Univ. of Tennessee and Oak Ridge National Laboratory , * October 1, 1993 , * Details of this algorithm are described in "Templates for the , * Solution of Linear Systems: Building Blocks for Iterative size 15379 file README for ============= README file for testing the Iterative Templates ================== , , This directory contains the double precision C version of the Iterative , Templates, along with a test routine that the user can compile and execute , in order to verify that the routines are working. , , ================================================================================ , A test routine has been included with the template code. The user should run , the test to make sure that the code has been successfully downloaded and , unpacked. To do this, follow the following directions: size 4107 file SOR.f for * , SUBROUTINE SOR( N, B, X, WORK, LDW, ITER, RESID, MATVEC, , $ BACKSOLVE, INFO ) , * , * -- Iterative template routine -- , * Univ. of Tennessee and Oak Ridge National Laboratory , * October 1, 1993 , * Details of this algorithm are described in "Templates for the , * Solution of Linear Systems: Building Blocks for Iterative , * Methods", Barrett, Berry, Chan, Demmel, Donato, Dongarra, size 6483 file dnsychk.c for /* dnsychk.f -- translated by f2c (version of 20 August 1993 13:15:44). , You must link the resulting object file with the libraries: , -lf2c -lm (in that order) , */ , , #include "f2c.h" , , /* Common Block Declarations */ , , struct { size 12618 file SORREVCOM.f for * , SUBROUTINE SORREVCOM(N, B, X, WORK, LDW, ITER, RESID, INFO, , $ NDX1, NDX2, SCLR1, SCLR2, IJOB) , * , * -- Iterative template routine -- , * Univ. of Tennessee and Oak Ridge National Laboratory , * October 1, 1993 , * Details of this algorithm are described in "Templates for the , * Solution of Linear Systems: Building Blocks for Iterative , * Methods", Barrett, Berry, Chan, Demmel, Donato, Dongarra, size 8609 file STOPTEST2.f for * , SUBROUTINE STOPTEST2( N, R, B, BNRM2, RESID, TOL, INFO ) , * , * .. Scalar Arguments .. , INTEGER N, INFO , DOUBLE PRECISION RESID, TOL, BNRM2 , * .. , * .. Array Arguments .. , DOUBLE PRECISION R( * ), B( * ) , * .. size 1840 file Tester.f for * , PROGRAM TEMPLATESTESTER , * , * Test program for the DOUBLE PRECISION iterative templates. , * , * The program must be driven by a short data file. The first 18 records , * of the file are read using list-directed input, the last 16 records , * are read using the format ( A6, L2 ). An annotated example of a data , * file s a follows: , * size 25449 file Utils.f for * , * This file contains routines used by Jacobi, SOR, and Chebyshev: , * , * Jacobi/SOR: , * , * MATSPLIT calls specific matrix splitting routine , * JACSPLIT , * SORSPLIT , * BACKSOLVE , * size 7125 file dblas.f for subroutine daxpy(n,da,dx,incx,dy,incy) , c , c constant times a vector plus a vector. , c uses unrolled loops for increments equal to one. , c jack dongarra, linpack, 3/11/78. , c , double precision dx(1),dy(1),da , integer i,incx,incy,ix,iy,m,mp1,n , c , if(n.le.0)return size 89499 file dlapack.f for SUBROUTINE DSYEV( JOBZ, UPLO, N, A, LDA, W, WORK, LWORK, INFO ) , * , * -- LAPACK driver routine (version 1.1) -- , * Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd., , * Courant Institute, Argonne National Lab, and Rice University , * March 31, 1993 , * , * .. Scalar Arguments .. , CHARACTER JOBZ, UPLO , INTEGER INFO, LDA, LWORK, N size 188929 file dnsychk.f for * , SUBROUTINE DNSYCHK( X, LDX, B, X0, WORK, LDW, PFORM, MATVEC, , $ MATVECTRANS, PSOLVE, PSOLVETRANS, PSOLVEQ, , $ PSOLVETRANSQ, BACKSOLVE, TOL, SCALEDTOL, , $ LTEST, NSYRES, NUMTESTS, NUMSUSP, CRITERR ) , * , * .. Scalar Arguments .. , INTEGER LDW, LDX, NUMTESTS, NUMSUSP, CRITERR , DOUBLE PRECISION TOL, SCALEDTOL , LOGICAL NSYRES size 8716 file dspdchk.f for * , SUBROUTINE DSPDCHK( X, LDX, B, X0, WORK, LDW, PFORM, MATVEC, , $ MATVECTRANS, PSOLVE, PSOLVETRANS, PSOLVEQ, , $ PSOLVETRANSQ, BACKSOLVE, TOL, SCALEDTOL, , $ LTEST, SPDRES, NUMTESTS, NUMSUSP, CRITERR ) , * , * .. Scalar Arguments .. , INTEGER LDW, LDX, NUMTESTS, NUMSUSP, CRITERR , DOUBLE PRECISION TOL, SCALEDTOL , LOGICAL SPDRES size 10728 file dutils.f for DOUBLE PRECISION FUNCTION DLARAN( ISEED ) , * , * -- LAPACK auxiliary routine (version 1.1) -- , * Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd., , * Courant Institute, Argonne National Lab, and Rice University , * February 29, 1992 , * , * .. Array Arguments .. , INTEGER ISEED( 4 ) , * .. size 2675 file test.data for 1.0D-15 CONVERGENCE TOLERANCE , 1.0D+1 SCALED RESIDUAL TOLERANCE , CG T PUT F FOR NO TEST. ALGORITHMS TO BE TESTED , CHEBY T PUT F FOR NO TEST. , SOR T PUT F FOR NO TEST. , BICG T PUT F FOR NO TEST. , CGS T PUT F FOR NO TEST. , BICGS T PUT F FOR NO TEST. , GMRES T PUT F FOR NO TEST. , QMR T PUT F FOR NO TEST. size 1706 file test.results for , DETAILS OF ITERATIVE TEMPLATES TEST: , , Univ. of Tennessee and Oak Ridge National Laboratory , October 1, 1993 , Details of these algorithms are described in "Templates , for the Solution of Linear Systems: Building Blocks for , Iterative Methods", Barrett, Berry, Chan, Demmel, Donato, , Dongarra, Eijkhout, Pozo, Romine, and van der Vorst, , SIAM Publications, 1993. size 9112 file BiCGSTAB.c for /* BiCGSTAB.f -- translated by f2c (version of 20 August 1993 13:15:44). , You must link the resulting object file with the libraries: , -lf2c -lm (in that order) , */ , , #include "f2c.h" , , /* Table of constant values */ , , static integer c__1 = 1; size 9024 file CG.c for /* CG.f -- translated by f2c (version of 20 August 1993 13:15:44). , You must link the resulting object file with the libraries: , -lf2c -lm (in that order) , */ , , #include "f2c.h" , , /* Table of constant values */ , , static integer c__1 = 1; size 6664 file CGS.c for /* CGS.f -- translated by f2c (version of 20 August 1993 13:15:44). , You must link the resulting object file with the libraries: , -lf2c -lm (in that order) , */ , , #include "f2c.h" , , /* Table of constant values */ , , static integer c__1 = 1; size 8653 file Cheby.c for /* Cheby.f -- translated by f2c (version of 20 August 1993 13:15:44). , You must link the resulting object file with the libraries: , -lf2c -lm (in that order) , */ , , #include "f2c.h" , , /* Table of constant values */ , , static integer c__1 = 1; size 6581 file F2CLIBS size 512 file GMRES.c for /* GMRES.f -- translated by f2c (version of 20 August 1993 13:15:44). , You must link the resulting object file with the libraries: , -lf2c -lm (in that order) , */ , , #include "f2c.h" , , /* Table of constant values */ , , static integer c__1 = 1; size 11664 file Jacobi.c for /* Jacobi.f -- translated by f2c (version of 20 August 1993 13:15:44). , You must link the resulting object file with the libraries: , -lf2c -lm (in that order) , */ , , #include "f2c.h" , , /* Table of constant values */ , , static doublereal c_b2 = 1.; size 5558 file MatGen.c for /* MatGen.f -- translated by f2c (version of 20 August 1993 13:15:44). , You must link the resulting object file with the libraries: , -lf2c -lm (in that order) , */ , , #include "f2c.h" , , /* Table of constant values */ , , static doublereal c_b14 = 2.7182817459106; size 21483 file MatVec.c for /* MatVec.f -- translated by f2c (version of 20 August 1993 13:15:44). , You must link the resulting object file with the libraries: , -lf2c -lm (in that order) , */ , , #include "f2c.h" , , /* Common Block Declarations */ , , struct { size 1502 file PSolve.c for /* PSolve.f -- translated by f2c (version of 20 August 1993 13:15:44). , You must link the resulting object file with the libraries: , -lf2c -lm (in that order) , */ , , #include "f2c.h" , , /* Common Block Declarations */ , , struct { size 9010 file QMR.c for /* QMR.f -- translated by f2c (version of 20 August 1993 13:15:44). , You must link the resulting object file with the libraries: , -lf2c -lm (in that order) , */ , , #include "f2c.h" , , /* Table of constant values */ , , static integer c__1 = 1; size 13463 file SOR.c for /* SOR.f -- translated by f2c (version of 20 August 1993 13:15:44). , You must link the resulting object file with the libraries: , -lf2c -lm (in that order) , */ , , #include "f2c.h" , , /* Table of constant values */ , , static integer c__1 = 1; size 7064 file Tester.c for /* Tester.f -- translated by f2c (version of 20 August 1993 13:15:44). , You must link the resulting object file with the libraries: , -lf2c -lm (in that order) , */ , , #include "f2c.h" , , /* Common Block Declarations */ , , struct { size 50478 file Utils.c for /* Utils.f -- translated by f2c (version of 20 August 1993 13:15:44). , You must link the resulting object file with the libraries: , -lf2c -lm (in that order) , */ , , #include "f2c.h" , , /* Common Block Declarations */ , , struct { size 10835 file dblas.c for /* dblas.f -- translated by f2c (version of 20 August 1993 13:15:44). , You must link the resulting object file with the libraries: , -lf2c -lm (in that order) , */ , , #include "f2c.h" , , /* Table of constant values */ , , static doublereal c_b91 = 1.; size 86346 file dlapack.c for /* dlapack.f -- translated by f2c (version of 20 August 1993 13:15:44). , You must link the resulting object file with the libraries: , -lf2c -lm (in that order) , */ , , #include "f2c.h" , , /* Table of constant values */ , , static integer c__1 = 1; size 199281 file dspdchk.c for /* dspdchk.f -- translated by f2c (version of 20 August 1993 13:15:44). , You must link the resulting object file with the libraries: , -lf2c -lm (in that order) , */ , , #include "f2c.h" , , /* Common Block Declarations */ , , struct { size 14768 file f2c.h for /* f2c.h -- Standard Fortran to C header file */ , , /** barf [ba:rf] 2. "He suggested using FORTRAN, and everybody barfed." , , - From The Shogakukan DICTIONARY OF NEW ENGLISH (Second edition) */ , , #ifndef F2C_INCLUDE , #define F2C_INCLUDE , , typedef long int integer; size 4206