Skip to content

Commit

Permalink
Merge pull request #22 from reinh-bader/fgsl_devel_1.3.0
Browse files Browse the repository at this point in the history
Fgsl devel 1.3.0 merged into master
  • Loading branch information
reinh-bader authored Aug 31, 2019
2 parents bca0dd4 + 5994f93 commit 6019e01
Show file tree
Hide file tree
Showing 1,273 changed files with 26,856 additions and 105,230 deletions.
21 changes: 21 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
@@ -1,3 +1,24 @@
Changes in 1.3.0 (by R Bader):
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This release introduces support for gsl 2.4. An overview:

1. fixes in fgsl_utils.c and mod_unit
2. fgsl_linalg_cod_*: added lssolve2 and changed QRZ to QRZT in all calls
(NOTE: keyword calls for previously existing COD routines with
QRZT argument must be updated in client code)
3. removed deprecated interfaces from interface/bspline.finc
4. specfunc changes:
* interoperable calls are now thin bindings again (save on call overhead)
5. Applying c_loc to assumed shape arguments was wrong:
* where not reverted to thin binding, now specified with CONTIGUOUS.
6. Added fgsl_integration_fixed_* interface to IQPACK
7. Added fgsl_sf_hermite_* interface
8. Fixed problems with interp2d, integration_qagp, linalq_qrpt, and sort
test cases.




Changes in 1.2.0 (by R Bader):
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This release introduces support for gsl 2.3. An overview:
Expand Down
22 changes: 13 additions & 9 deletions README
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@

This is release 1.2.0 of the Fortran interface
This is release 1.3.0 of the Fortran interface
to the GNU Scientific Library.
It is based on version 2.3 of GSL, and should not be used with earlier GSL releases.
It is based on version 2.4 of GSL, and should not be used with
earlier GSL releases.
Please use the release 1.0.0 in combination with GSL 1.x
Please use the release 1.1.0 in combination with GSL 2.1 or 2.2.1
Please use the release 1.2.0 in combination with GSL 2.3

Please consult the NEWS file for a change log.

Expand Down Expand Up @@ -41,7 +43,7 @@ this has changed due to introduction of an autoconf based system
export FC=<fortran compiler command>
export FCFLAGS=<additional Fortran flags>
export gsl_LIBS=<gsl library link line>
export PKG_CONFIG_PATH=<directory in which gsl.pc resides>
export PKG_CONFIG_PATH=<lib/pkgconfig directory in which gsl.pc resides>
./configure
If you have to explicitly select which Fortran compiler is
supposed to be used, add the following option to the configure script:
Expand All @@ -52,13 +54,15 @@ export PKG_CONFIG_PATH=<directory in which gsl.pc resides>
For a list of all available options run:
./configure --help

NOTE: for supporting different compilers with a single GSL
installation it is recommended to specify the following
NOTES:
* for supporting different compilers with a single GSL
installation it is recommended to specify the following

./configure --prefix=<path to gsl install> \
--libdir=<path to gsl install>/lib/$FC \
--includedir=<path to gsl install>/include/$FC

./configure --prefix=<path to gsl install> \
--libdir=<path to gsl install>/lib/$FC \
--includedir=<path to gsl install>/include/$FC

* path names containing blanks are not supported.


make
Expand Down
4 changes: 2 additions & 2 deletions api/dht.finc
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
end subroutine fgsl_dht_free
function fgsl_dht_apply(t, f_in, f_out)
type(fgsl_dht), intent(in) :: t
real(fgsl_double), intent(in), target :: f_in(:)
real(fgsl_double), intent(out), target :: f_out(:)
real(fgsl_double), intent(in), target, contiguous :: f_in(:)
real(fgsl_double), intent(out), target, contiguous :: f_out(:)
integer(fgsl_int) :: fgsl_dht_apply
fgsl_dht_apply = gsl_dht_apply(t%gsl_dht, c_loc(f_in), c_loc(f_out))
end function fgsl_dht_apply
Expand Down
8 changes: 4 additions & 4 deletions api/fit.finc
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

function fgsl_fit_linear(x, xstride, y, ystride, n, c0, c1, &
cov00, cov01, cov11, sumsq)
real(fgsl_double), intent(in), target :: x(:), y(:)
real(fgsl_double), intent(in), target, contiguous :: x(:), y(:)
integer(fgsl_size_t), intent(in) :: xstride, ystride, n
real(fgsl_double), intent(out) :: c0, c1, cov00, cov01, cov11, sumsq
integer(fgsl_int) :: fgsl_fit_linear
Expand All @@ -16,7 +16,7 @@
end function fgsl_fit_linear
function fgsl_fit_wlinear(x, xstride, w, wstride, y, ystride, n, c0, c1, &
cov00, cov01, cov11, chisq)
real(fgsl_double), intent(in), target :: x(:), y(:), w(:)
real(fgsl_double), intent(in), target, contiguous :: x(:), y(:), w(:)
integer(fgsl_size_t), intent(in) :: xstride, ystride, wstride, n
real(fgsl_double), intent(out) :: c0, c1, cov00, cov01, cov11, chisq
integer(fgsl_int) :: fgsl_fit_wlinear
Expand All @@ -31,7 +31,7 @@
end function fgsl_fit_linear_est
function fgsl_fit_mul(x, xstride, y, ystride, n, c1, &
cov11, sumsq)
real(fgsl_double), intent(in), target :: x(:), y(:)
real(fgsl_double), intent(in), target, contiguous :: x(:), y(:)
integer(fgsl_size_t), intent(in) :: xstride, ystride, n
real(fgsl_double), intent(out) :: c1, cov11, sumsq
integer(fgsl_int) :: fgsl_fit_mul
Expand All @@ -40,7 +40,7 @@
end function fgsl_fit_mul
function fgsl_fit_wmul(x, xstride, w, wstride, y, ystride, n, c1, &
cov11, chisq)
real(fgsl_double), intent(in), target :: x(:), y(:), w(:)
real(fgsl_double), intent(in), target, contiguous :: x(:), y(:), w(:)
integer(fgsl_size_t), intent(in) :: xstride, ystride, wstride, n
real(fgsl_double), intent(out) :: c1, cov11, chisq
integer(fgsl_int) :: fgsl_fit_wmul
Expand Down
4 changes: 2 additions & 2 deletions api/histogram.finc
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
end function fgsl_histogram_alloc
function fgsl_histogram_set_ranges(h, range)
type(fgsl_histogram), intent(inout) :: h
real(fgsl_double), intent(in), target :: range(:)
real(fgsl_double), intent(in), target, contiguous :: range(:)
integer(fgsl_int) :: fgsl_histogram_set_ranges
fgsl_histogram_set_ranges = gsl_histogram_set_ranges(h%gsl_histogram, c_loc(range), &
size(range, dim=1, kind=fgsl_size_t))
Expand Down Expand Up @@ -236,7 +236,7 @@
end function fgsl_histogram2d_alloc
function fgsl_histogram2d_set_ranges(h, xrange, yrange)
type(fgsl_histogram2d), intent(inout) :: h
real(fgsl_double), intent(in), target :: xrange(:), yrange(:)
real(fgsl_double), intent(in), target, contiguous :: xrange(:), yrange(:)
integer(fgsl_int) :: fgsl_histogram2d_set_ranges
fgsl_histogram2d_set_ranges = &
gsl_histogram2d_set_ranges(h%gsl_histogram2d, c_loc(xrange), &
Expand Down
54 changes: 53 additions & 1 deletion api/integration.finc
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
function fgsl_integration_qagp(f, pts, epsabs, epsrel, limit, &
workspace, result, abserr)
type(fgsl_function), intent(in) :: f
real(fgsl_double), intent(in), target :: pts(:)
real(fgsl_double), intent(in), target, contiguous :: pts(:)
real(fgsl_double), intent(in) :: epsabs, epsrel
integer(fgsl_size_t), intent(in) :: limit
type(fgsl_integration_workspace), intent(inout) :: workspace
Expand Down Expand Up @@ -305,3 +305,55 @@
fgsl_sizeof_integration_qawo_table = &
gsl_aux_sizeof_integration_qawo_table()
end function fgsl_sizeof_integration_qawo_table
function fgsl_integration_fixed_alloc(t, n, a, b, alpha, beta)
type(fgsl_integration_fixed_workspace) :: fgsl_integration_fixed_alloc
integer(fgsl_int), intent(in) :: t
integer(fgsl_size_t), intent(in) :: n
real(fgsl_double), intent(in) :: a, b, alpha, beta
fgsl_integration_fixed_alloc%gsl_integration_fixed_workspace = &
gsl_aux_integration_fixed_alloc(t, n, a, b, alpha, beta)
end function fgsl_integration_fixed_alloc
subroutine fgsl_integration_fixed_free(w)
type(fgsl_integration_fixed_workspace), intent(inout) :: w
call gsl_integration_fixed_free(w%gsl_integration_fixed_workspace)
end subroutine fgsl_integration_fixed_free
function fgsl_integration_fixed_n(w)
integer(fgsl_size_t) :: fgsl_integration_fixed_n
type(fgsl_integration_fixed_workspace), intent(in) :: w
fgsl_integration_fixed_n = gsl_integration_fixed_n(&
w%gsl_integration_fixed_workspace)
end function fgsl_integration_fixed_n
function fgsl_integration_fixed_nodes(w)
real(fgsl_double), pointer :: fgsl_integration_fixed_nodes(:)
type(fgsl_integration_fixed_workspace), intent(in) :: w
integer(fgsl_size_t) :: n
type(c_ptr) :: p
n = gsl_integration_fixed_n(w%gsl_integration_fixed_workspace)
p = gsl_integration_fixed_nodes(w%gsl_integration_fixed_workspace)
if (c_associated(p)) then
call c_f_pointer(p,fgsl_integration_fixed_nodes,[n])
else
nullify(fgsl_integration_fixed_nodes)
end if
end function fgsl_integration_fixed_nodes
function fgsl_integration_fixed_weights(w)
real(fgsl_double), pointer :: fgsl_integration_fixed_weights(:)
type(fgsl_integration_fixed_workspace), intent(in) :: w
integer(fgsl_size_t) :: n
type(c_ptr) :: p
n = gsl_integration_fixed_n(w%gsl_integration_fixed_workspace)
p = gsl_integration_fixed_weights(w%gsl_integration_fixed_workspace)
if (c_associated(p)) then
call c_f_pointer(p,fgsl_integration_fixed_weights,[n])
else
nullify(fgsl_integration_fixed_weights)
end if
end function fgsl_integration_fixed_weights
function fgsl_integration_fixed(func, result, w)
integer(fgsl_int) :: fgsl_integration_fixed
type(fgsl_function), intent(inout) :: func
real(fgsl_double), target :: result
type(fgsl_integration_fixed_workspace), intent(in) :: w
fgsl_integration_fixed = gsl_integration_fixed(func%gsl_function, &
c_loc(result), w%gsl_integration_fixed_workspace)
end function fgsl_integration_fixed
Loading

0 comments on commit 6019e01

Please sign in to comment.