subroutine rscsl (lftblk, array, nrwblk, nbloks, rgtblk, * b, pivot, nparts, work) c double precision lftblk(1), array(1), rgtblk(1), b(1), work(1) integer nrwblk, nbloks, pivot(1), nparts c ***----------------------------------------------------------*** c * Given the factors of ABD matrix A computed by subroutine * c * 'rscfa' and stored in arrays lftblk, array, rgtblk, * c * work and pivot, this subroutine solves the linear system * c * A x = b. b is overwritten with x. See comments in * c * subroutine 'rscale' for further details. * c ***----------------------------------------------------------*** integer nsquar, wk1, wk2, wk3, wk4, minblk, remblk c ***----------------------------------------------------------*** c * Work-space allocation: * c * right blocks - work(1)..work(wk2-1) * c * 1st-level product blocks - work(wk2)..work(wk3-1) * c * 2nd-level product block - work(wk3)..work(wk4-1) * c * local storage for BLAS - work(wk4)..end * c * * c * Total requirement: nbloks*[nrwblkxnrwblk] * c * + nparts*[nrwblkxnrwblk] * c * + [nrwblkxnrwblk] * c * + nparts*[nrwblkxnrwblk] * c ***----------------------------------------------------------*** nsquar = nrwblk**2 wk1 = 1 wk2 = wk1 + nbloks*nsquar wk3 = wk2 + nparts*nsquar wk4 = wk3 + nsquar c ***----------------------------------------------------------*** c * Calculate minimum number of blocks per partition * c * Remaining blocks are distributed evenly among the * c * first partitions. * c ***----------------------------------------------------------*** minblk = nbloks/nparts remblk = nbloks - minblk*nparts c ***----------------------------------------------------------*** c * Three level forward elimination. * c ***----------------------------------------------------------*** call rscsf1(array,work(wk1),nrwblk,b, * pivot,minblk,remblk,nparts,work(wk4)) call rscsf2(array,work(wk1),work(wk2),nrwblk,b, * pivot,minblk,remblk,nparts,work(wk4)) call rscsf3(lftblk,array,work(wk1),nrwblk,rgtblk, * b,b,pivot,minblk,remblk,nparts,work(wk4)) c ***----------------------------------------------------------*** c * Three level back-solve. * c ***----------------------------------------------------------*** call rscsb3(array,work(wk1),work(wk2),work(wk3), * nrwblk,nbloks,b,b,pivot,nparts,work(wk4)) call rscsb2(array,work(wk2),nrwblk,b, * minblk,remblk,nparts,work(wk4)) call rscsb1(array,nrwblk,b, * minblk,remblk,nparts,work(wk4)) return end