C C $Id: cmbsub.F,v 1.4 1998/07/16 16:39:32 jjv5 Exp arjan $ C C------------------------------------------------------------------------ subroutine cmbsub(ipoint, natot, nbig, ibig, ierror) implicit double precision(a-h,o-z) #include "divcon.dim" #include "divcon.h" CC-------------------------------------------------------------------CC C first do some consistency checking iok = 0 do i=1,ncores iok = iok + icorel1(i+1)-icorel1(i) enddo if (iok.ne.niclust) then C-RDC write(iout,'(" ERROR: CLUSTER LIST IN COMBSUB PARAMETERS", C-RDC & " AND NCORE LIST", C-RDC & /" IN CLUSTER PARAMETERS ARE NOT CONSISTENT")') ierror = 1 return endif iok = 0 do 10 k=1,niclust do i=1,ncores jb = icorel1(i) je = icorel1(i+1)-1 do j=jb,je if (icorel(j).eq.iclustl(k)) then iok = iok + 1 goto 10 endif enddo enddo 10 continue if (iok.ne.niclust) then C-RDC write(iout,'(" ERROR: CLUSTER LIST IN COMBSUB PARAMETERS", C-RDC & " AND NCORE LIST", C-RDC & /" IN CLUSTER PARAMETERS ARE NOT CONSISTENT")') ierror = 1 return endif C first do the cluster-based subsetting call clustsub(ipoint, natot, nbig, ibig, ierror) if (ierror.ne.0) return C then do the grid-based subsetting if (resgr) then call resgrid(ipoint, natot, nbig, ibig, ierror) elseif (atgr) then call atgrid(ipoint, natot, nbig, ibig, ierror) elseif (mixgr) then call mixgrid(ipoint, natot, nbig, ibig, ierror) endif if (ierror.ne.0) return natavg = natot/nsub C-RDC write(iout,'(//" OVERAL SUMMARY OF COMBINED SUBSETTING:", C-RDC & /" -------------------------------------", C-RDC & //" NUMBER OF SUBSYSTEMS = ",I4, C-RDC & /" AVERAGE SUBSYSTEM SIZE = ",I4, C-RDC & /" MAXIMUM SUBSYSTEM SIZE = ",I4, C-RDC & /" LARGEST SUBSYSTEM = #",I4/)') C-RDC & nsub,natavg,nbig,ibig if (screen) then C-RDC write(iscr,'(/"combsub subsetting: nsub = ",i4,", av. size = ", C-RDC & i4," max. size = ",i4)') nsub,natavg,nbig endif end