Skip to content

ofmla/digital_filtering_HT_integrals

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

htcomp

Digital filtering for evaluating Hankel transform (HT) integrals.

Description

Just an exercise in refactoring legacy Fortran code (Fortran IV) from the paper: Anderson W L 1979 Numerical integration of related HTs of orders 0 and 1 adaptive digital filtering; Geophysics 44 1287–1305.

Compiling

A Fortran Package Manager (FPM) manifest file is included so that a test (driver program) can be compiled with FPM. When you run the command:

fpm test --profile release --V

you will get the following output:

...
TEST results for zhanks driver
 INTEGRAL  N    B            TOL          EXACT           FILTERED        ABS.ERROR       REL.ERROR      NF  NEW

     1     0  0.10000E-03  0.10000E-05  0.50000000E+00  0.50000039E+00  0.38967043E-06  0.77934085E-06  150   1
     2     1  0.10000E-03  0.10000E-05  0.24999999E-04  0.25000006E-04  0.69950463E-11  0.27980186E-06    0   0
     3     1  0.10000E-03  0.10000E-06  0.49999999E-04  0.50000130E-04  0.13107596E-09  0.26215193E-05  150   1
     4     1  0.10000E-03  0.10000E-06  0.12500000E-04  0.12500003E-04  0.33915416E-11  0.27132334E-06    0   0
     5     0  0.10000E-03  0.10000E-06  0.50000000E+00  0.50001414E+00  0.14138358E-04  0.28276715E-04    0   0

     1     0  0.10000E-02  0.10000E-05  0.49999988E+00  0.49999994E+00  0.64144521E-07  0.12828907E-06  150   1
     2     1  0.10000E-02  0.10000E-05  0.24999995E-03  0.25000001E-03  0.65469077E-10  0.26187636E-06    0   0
     3     1  0.10000E-02  0.10000E-06  0.49999965E-03  0.49999979E-03  0.13731266E-09  0.27462551E-06  150   1
     4     1  0.10000E-02  0.10000E-06  0.12499996E-03  0.12499999E-03  0.31862884E-10  0.25490316E-06    0   0
     5     0  0.10000E-02  0.10000E-06  0.49999994E+00  0.50000136E+00  0.14177757E-05  0.28355517E-05    0   0

     1     0  0.50000E-02  0.10000E-06  0.49999688E+00  0.49999690E+00  0.27180696E-07  0.54361732E-07  150   1
     2     1  0.50000E-02  0.10000E-06  0.12499922E-02  0.12499925E-02  0.32601407E-09  0.26081289E-06    0   0
     3     1  0.50000E-02  0.10000E-07  0.24999531E-02  0.24999537E-02  0.65047888E-09  0.26019644E-06  150   1
     4     1  0.50000E-02  0.10000E-07  0.62499413E-03  0.62499429E-03  0.16155917E-09  0.25849710E-06    0   0
     5     0  0.50000E-02  0.10000E-07  0.49999844E+00  0.49999873E+00  0.28798836E-06  0.57597853E-06    0   0

     1     0  0.10000E-01  0.10000E-07  0.49998750E+00  0.49998750E+00  0.51438244E-08  0.10287906E-07  150   1
     2     1  0.10000E-01  0.10000E-07  0.24999374E-02  0.24999381E-02  0.70279915E-09  0.28112669E-06    0   0
     3     1  0.10000E-01  0.10000E-08  0.49996249E-02  0.49996262E-02  0.13021646E-08  0.26045247E-06  150   1
     4     1  0.10000E-01  0.10000E-08  0.12499531E-02  0.12499534E-02  0.32739083E-09  0.26192249E-06    0   0
     5     0  0.10000E-01  0.10000E-08  0.49999375E+00  0.49999390E+00  0.14734650E-06  0.29469669E-06    0   0

     1     0  0.50000E-01  0.10000E-07  0.49968760E+00  0.49968759E+00  0.47307774E-08  0.94674702E-08  150   1
     2     1  0.50000E-01  0.10000E-07  0.12492190E-01  0.12492194E-01  0.39712480E-08  0.31789846E-06    0   0
     3     1  0.50000E-01  0.10000E-08  0.24953223E-01  0.24953229E-01  0.59189912E-08  0.23720348E-06  150   1
     4     1  0.50000E-01  0.10000E-08  0.62441453E-02  0.62441468E-02  0.15332954E-08  0.24555729E-06    0   0
     5     0  0.50000E-01  0.10000E-08  0.49984382E+00  0.49984385E+00  0.30725728E-07  0.61470656E-07    0   0

     1     0  0.10000E+00  0.10000E-07  0.49875156E+00  0.49875155E+00  0.80413606E-08  0.16122978E-07  150   1
     2     1  0.10000E+00  0.10000E-07  0.24937578E-01  0.24937585E-01  0.67203317E-08  0.26948614E-06    0   0
     3     1  0.10000E+00  0.10000E-08  0.49628099E-01  0.49628107E-01  0.84753220E-08  0.17077668E-06   95   1
     4     1  0.10000E+00  0.10000E-08  0.12453271E-01  0.12453274E-01  0.27023863E-08  0.21700212E-06    0   0
     5     0  0.10000E+00  0.10000E-08  0.49937617E+00  0.49937618E+00  0.13414384E-07  0.26862283E-07   55   0

     1     0  0.50000E+00  0.10000E-07  0.46970653E+00  0.46970649E+00  0.43851664E-07  0.93359707E-07   75   1
     2     1  0.50000E+00  0.10000E-07  0.11742663E+00  0.11742662E+00  0.15153875E-07  0.12904973E-06    0   0
     3     1  0.50000E+00  0.10000E-08  0.21114562E+00  0.21114559E+00  0.30084567E-07  0.14248255E-06   77   1
     4     1  0.50000E+00  0.10000E-08  0.57067206E-01  0.57067182E-01  0.23948458E-07  0.41965360E-06    0   0
     5     0  0.50000E+00  0.10000E-08  0.48507125E+00  0.48507124E+00  0.12060849E-07  0.24864076E-07   73   0

     1     0  0.10000E+01  0.10000E-08  0.38940039E+00  0.38940056E+00  0.16363888E-06  0.42023296E-06   75   1
     2     1  0.10000E+01  0.10000E-08  0.19470020E+00  0.19469975E+00  0.44437594E-06  0.22823600E-05    0   0
     3     1  0.10000E+01  0.10000E-09  0.29289322E+00  0.29289327E+00  0.48626140E-07  0.16602003E-06   80   1
     4     1  0.10000E+01  0.10000E-09  0.89442719E-01  0.89442761E-01  0.41850588E-07  0.46790380E-06    0   0
     5     0  0.10000E+01  0.10000E-09  0.44721360E+00  0.44721363E+00  0.31677126E-07  0.70832206E-07   70   0

     1     0  0.20000E+01  0.10000E-08  0.18393972E+00  0.18393949E+00  0.23133445E-06  0.12576645E-05   72   1
     2     1  0.20000E+01  0.10000E-08  0.18393972E+00  0.18394082E+00  0.10955669E-05  0.59561190E-05    0   0
     3     1  0.20000E+01  0.10000E-09  0.27639320E+00  0.27639319E+00  0.11919114E-07  0.43123760E-07   79   1
     4     1  0.20000E+01  0.10000E-09  0.88388348E-01  0.88388277E-01  0.70727641E-07  0.80019191E-06    0   0
     5     0  0.20000E+01  0.10000E-09  0.35355339E+00  0.35355336E+00  0.28972155E-07  0.81945630E-07   72   0

which aligns with the results reported in the original paper and suggests that the refactoring was successful.

About

Digital filtering for evaluating Hankel transform integrals.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors