filter.f

Go to the documentation of this file.
00001 C:\opentelemac\v7p0\sources\utils\bief\filter.f
00002 !
00065                      SUBROUTINE FILTER
00066 !                    *****************
00067 !
00068      &(VEC,BLDMAT,T1,T2,
00069      & A,FORMUL,
00070      & XMUL,F,G,H,U,V,W,
00071      & MESH,MSK,MASKEL,N)
00072 !
00073 !***********************************************************************
00074 ! BIEF   V6P1                                   21/08/2010
00075 !***********************************************************************
00076 !
00077 !
00078 !
00079 !
00080 !
00081 !
00082 !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00083 !| A              |<->| MATRIX (GIVEN OR BUILT DEPENDING ON BLDMAT)
00084 !| BLDMAT         |-->| IF YES : MATRIX BUILT ACCORDING TO FORMUL
00085 !| F,G,H,U,V,W    |-->| FUNCTIONS THAT MAY BE USED FOR BUILDING A
00086 !| FORMUL         |-->| FORMULA DESCRIBING THE MATRIX (AS IN MATRIX)
00087 !| MSK            |-->| IF YES, THERE IS MASKED ELEMENTS.
00088 !| MASKEL         |-->| MASKING OF ELEMENTS
00089 !|                |   | =1. : NORMAL   =0. : MASKED ELEMENT
00090 !| N              |-->| FILTERING WILL BE DONE N TIMES
00091 !| T1             |<->| WORK ARRAY
00092 !| T2             |<->| WORK ARRAY. MATRIX A LUMPED AT THE END
00093 !| VEC            |<->| VECTOR TO BE FILTERED
00094 !| XMUL           |-->| MULTIPLICATION FACTOR
00095 !|                |   | NO INFLUENCE EXCEPT ON T2.
00096 !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00097 !
00098       USE BIEF, EX_FILTER => FILTER
00099 !
00100       IMPLICIT NONE
00101       INTEGER LNG,LU
00102       COMMON/INFO/LNG,LU
00103 !
00104 !+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
00105 !
00106       INTEGER, INTENT(IN)           :: N
00107       DOUBLE PRECISION, INTENT(IN)  :: XMUL
00108       LOGICAL, INTENT(IN)           :: BLDMAT,MSK
00109       CHARACTER(LEN=16), INTENT(IN) :: FORMUL
00110       TYPE(BIEF_MESH), INTENT(INOUT):: MESH
00111       TYPE(BIEF_OBJ), INTENT(INOUT) :: VEC,A,T1,T2
00112       TYPE(BIEF_OBJ), INTENT(IN)    :: F,G,H,U,V,W,MASKEL
00113 !
00114 !+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
00115 !
00116       INTEGER I
00117 !
00118       DOUBLE PRECISION C
00119 !
00120 !-----------------------------------------------------------------------
00121 !
00122       DO I=1,N
00123 !
00124 !  COMPUTES THE MATRIX ACCORDING TO THE GIVEN FORMULATION (OPTIONAL)
00125 !
00126       IF(BLDMAT.AND.I.EQ.1) THEN
00127 !
00128           CALL MATRIX(A,'M=N     ',FORMUL,VEC%ELM,VEC%ELM,
00129      &                XMUL,F,G,H,U,V,W,MESH,MSK,MASKEL)
00130 !
00131       ENDIF
00132 !
00133 !-----------------------------------------------------------------------
00134 !
00135 !  COMPUTES THE PRODUCT A * VEC (WITH ASSEMBLY)
00136 !
00137       CALL MATVEC( 'X=AY    ',T1,A,VEC,C,MESH)
00138       IF(NCSIZE.GT.1) CALL PARCOM(T1,2,MESH)
00139 !
00140 !-----------------------------------------------------------------------
00141 !
00142 !  COMPRESSES A ON ITS DIAGONAL
00143 !
00144       IF(I.EQ.1) THEN
00145         CALL LUMP(T2,A,MESH,XMUL)
00146         IF(NCSIZE.GT.1) CALL PARCOM(T2,2,MESH)
00147         CALL OS('X=1/Y   ',T2,T2,T2,C,IOPT=2,INFINI=0.D0,ZERO=1.D-20)
00148       ENDIF
00149 !
00150 !-----------------------------------------------------------------------
00151 !
00152 !  COMPUTES F = A * F / (ASSEMBLED A)
00153 !
00154 !  CHECKS DIVISIONS BY 0 CAUSED BY EXTERNAL POINTS IN
00155 !  THE LEONARD FORMAT, WHICH CAN HAVE 0 VALUES
00156 !
00157       CALL OS('X=YZ    ',X=VEC,Y=T1,Z=T2)
00158 !
00159 !-----------------------------------------------------------------------
00160 !
00161       ENDDO ! I
00162 !
00163 !-----------------------------------------------------------------------
00164 !
00165       RETURN
00166       END

Generated on Fri Aug 31 2013 18:12:58 by S.E.Bourban (HRW) using doxygen 1.7.0