IntroductionΒΆ

Constants, variables, subroutines and functions available in the STATPACK library are organized and grouped in Fortran 90 modules. All the modules available in the STATPACK library are located in the $STATPACKDIR/sources subdirectory of the main STATPACK directory. To use these STATPACK modules in a Fortran program, you must have previously compiled the STATPACK library as described in the chapter Installation.

The content of each module is listed in this reference chapter with one or two description paragraphs of the purpose of the module and the list of constants, subroutines and functions publicly available in the module. For more information on the use of a specific routine, you must follow the links to the specific documentation of this routine or consult the STATPACK manual for the appropriate module.

In order to use one of the STATPACK routines or constants described below, you must include an appropriate use Statpack statement in your Fortran program, like:

use Statpack, only: svd_cmp

The module Statpack, used in the example above, exports all the constants, routines and functions publicly available in STATPACK. Alternatively, you can also refer directly to the Fortran module, which contains the routine you want to use in your use statement, like:

use SVD_Procedures, only: svd_cmp

See the Fortran program ex1_svd_cmp.F90 for a working example of subroutine svd_cmp() and the STATPACK library for performing a Singular Value Decomposition (SVD) of a real matrix.

In this reference section, for each routine publicly available in STATPACK, we give its calling sequence (or the different calling sequences if this routine is generic) and the list of dummy arguments to the routine. For example, the different calling sequences of the generic quick_sort() subroutine available in the module Sort_Procedures, which can be used to sort integer or real arrays, are as follow:

call quick_sort( list(:p) ,             ascending=ascending )   ! list is a real array of size p
call quick_sort( list(:p) , order(:p) , ascending=ascending )   ! list is a real array of size p
call quick_sort( list(:p) ,             ascending=ascending )   ! list is an integer array of size p
call quick_sort( list(:p) , order(:p) , ascending=ascending )   ! list is an integer array of size p

In the above calling sequences, all the possible dummy arguments (and forms of the generic routine) are listed. The dimensions of the dummy array arguments are also indicated, following the Fortran90 notation, and the dependencies between the dimensions of the different dummy array arguments are also indicated when this is possible. The mandatory dummy arguments are listed first by using an ordinary positional argument list and the optional dummy arguments are listed after by using a keyword argument list. For example, in the second form of the generic quick_sort() subroutine, the dummy array arguments LIST and ORDER are mandatory and their sizes must match. On the other hand, ASCENDING is an optional dummy argument.

For more information on the purpose of the routine and the possible arguments (including their types, sizes or shapes), you must follow the links to the specific documentation of this routine (e.g., click on the name of the subroutine, which is underlined in this reference chapter) or consult the STATPACK manual for the appropriate module.

Flag Counter