C ********************************************************************** C * * C * SOFTWARE LICENSING * C * * C * This program is free software; you can redistribute * C * it and/or modify it under the terms of the GNU * C * General Public License as published by the Free * C * Software Foundation, either Version 2 of the * C * license, or (at your option) any later version. * C * * C * This program is distributed in the hope that it * C * will be useful, but without any warranty; without * C * even the implied warranty of merchantability or * C * fitness for a particular purpose. See the GNU * C * General Public License for more details. * C * * C * A copy of the GNU General Public License is * C * available at http://www.gnu.org/copyleft/gpl.html * C * or by writing to the Free Software Foundation, Inc.,* C * 59 Temple Place - Suite 330, Boston, MA 02111, USA. * C * * C ********************************************************************** C ------------------------------------------------------------------ SUBROUTINE SMOOTH(A,FSM,IM,JM,NITS) C------------------------------------------------------------------- C THIS ROUTINE SMOOTHS DATA WITH A FIVE POINT LAPLACIAN FILTER. C------------------------------------------------------------------- DIMENSION A(IM,JM),FSM(IM,JM) DO 100 N=1,NITS c DO 200 J=2,JM-1 c DO 200 I=2,IM-1 DO 200 J=JM-1,2,-1 DO 200 I=IM-1,2,-1 C SMFAC=FSM(I+1,J)+FSM(I,J-1)+FSM(I-1,J)+FSM(I,J+1)+1.E-10 A(I,J)=A(I,J)+(.5/SMFAC) 1 *(A(I+1,J)*FSM(I+1,J)+A(I,J-1)*FSM(I,J-1) 2 +A(I-1,J)*FSM(I-1,J)+A(I,J+1)*FSM(I,J+1) 3 -SMFAC*A(I,J)) A(I,J)=A(I,J)*FSM(I,J) 200 CONTINUE 100 CONTINUE RETURN END