00001 c dg1ifwt_.F
00002 c*********************************************************************
00003 c* (c) Copyright 1994-2002 Brown Deer Technology, LLC.
00004 c* All rights reserved.
00005 c*********************************************************************
00006
00007 subroutine dg1ifwt(Sizef,ns,size,wdata,sdata,iflag)
00008
00009 implicit none
00010
00011 c ****************************************
00012 c ***** COMMON BLOCKS AND PARAMETERS *****
00013 c ****************************************
00014
00015 #include "stormdef.h"
00016 double precision H00,H10,H11
00017 parameter( H00 = STORMDEF_MATHCONST_GHB1H00d0 )
00018 parameter( H10 = STORMDEF_MATHCONST_GHB1H10d0 )
00019 parameter( H11 = STORMDEF_MATHCONST_GHB1H11d0 )
00020
00021 c *******************************
00022 c ***** VARIABLES EXCHANGED *****
00023 c *******************************
00024
00025 integer Sizef
00026 integer ns
00027 integer size
00028 double precision wdata(0:1,Sizef)
00029 double precision sdata(0:1,Sizef)
00030 integer iflag
00031
00032 c ***************************
00033 c ***** LOCAL VARIABLES *****
00034 c ***************************
00035
00036 integer i,size1,size2
00037 double precision xx(0:1,Sizef)
00038
00039 c ******************************
00040 c ***** EXTERNAL FUNCTIONS *****
00041 c ******************************
00042
00043 #ifdef STORM_FWT_FCHECKUSAGE
00044 if (size.lt.ns) then
00045 iflag=1
00046 return
00047 endif
00048 #endif
00049
00050 if (size.eq.ns) then
00051 do i=1,size
00052 sdata(0,i)=wdata(0,i)
00053 sdata(1,i)=wdata(1,i)
00054 enddo
00055 iflag=0
00056 return
00057 endif
00058
00059 do i=1,size
00060 xx(0,i)=wdata(0,i)
00061 xx(1,i)=wdata(1,i)
00062 enddo
00063
00064 size1=ns
00065
00066 10 continue
00067 size2=size1
00068 size1=2*size1
00069 do i = 1,size2
00070 sdata(0,2*i-1)=H00*xx(0,i)+H11*xx(0,size2+i)+H10*xx(1,i)
00071 sdata(1,2*i-1)=-H10*xx(0,size2+i)+H11*xx(1,i)+H00*xx(1,size2+i)
00072 sdata(0,2*i)=H00*xx(0,i)-H11*xx(0,size2+i)-H10*xx(1,i)
00073 sdata(1,2*i)= -H10*xx(0,size2+i)+H11*xx(1,i)-H00*xx(1,size2+i)
00074 enddo
00075
00076 if (size1.lt.size) then
00077 do i=1,size1
00078 xx(0,i)=sdata(0,i)
00079 xx(1,i)=sdata(1,i)
00080 enddo
00081 goto 10
00082 endif
00083
00084 #ifdef STORM_FWT_FCHECKUSAGE
00085 if (size1.ne.size) then
00086 iflag=2
00087 return
00088 endif
00089 #endif
00090
00091 iflag=0
00092
00093 return
00094 end
00095