c----------------------------------------------------------- c Data structure for FAS multi-grid program c----------------------------------------------------------- c----------------------------------------------------------- c Main storage array; all arrays used in MG solve are c "allocated" from 'q'. The integer 'qptr' maintains c the index into 'q' representing the "high-water mark" c of allocation. See routine 'gsinit()'. c c Make sure that this array is "sensibly" dimensioned c for the machine you are running on. On SGI machines c you can type 'hinv' to find out how much physical c memory is available; the limit for regular Fortran c storage will less than or equal to physical memory c and sometimes substantially less. On einstein c the limit *is* the amount of physical memory, c but you should avoid running with that much. c c Also note that 2**20 = 1M, so that 2**20 real*8 c variables is 8M of storage. c----------------------------------------------------------- integer qsize parameter ( qsize = 2**20 ) real*8 q(qsize) common / comr8 / q integer qptr common / comi4 / qptr integer lmax parameter ( lmax = 12 ) c----------------------------------------------------------- c Pointers for various grid functions. Once these c arrays have been initialized (see routine 'gsinit'), c q(u(l)), for example, is the start of storage for c the level-l 'unknown' grid function. This c implementation uses temporary arrays ('t1', 't2', 't3') c heavily in order to keep the code relatively c straightforward. A production code (particularly a c 3-d code) should be more economical of storage. c----------------------------------------------------------- integer u(lmax), rhs(lmax), tau(lmax), & t1(lmax), t2(lmax), t3(lmax) common / comi4 / & u, rhs, tau, & t1, t2, t3 c----------------------------------------------------------- c Mesh spacings and grid sizes. c----------------------------------------------------------- real*8 h(lmax) common / comr8 / h integer nx(lmax), ny(lmax) common / comi4 / & nx, ny c----------------------------------------------------------- c Coarse grid convergence criterion and iteration limit c----------------------------------------------------------- real*8 epsi1 parameter ( epsi1 = 1.0d-10 ) integer maxsweep1 parameter ( maxsweep1 = 20 )