SHTns 3.7
|
SHTns provides two interfaces to Fortran language (compatible with gfortran).
First of all you need to initialize SHTns. There are two ways to do this :
shtns_init_*
subroutines, shtns_set_size
followed by shtns_precompute
or shtns_precompute_auto
. This way lets you choose normalization and optimization.Multi-threaded transforms can be enabled (if available, see Compiling and installing SHTns) by a call to shtns_use_threads before shtns_init or shtns_create.
Note that you can call initialization function(s) only once, which means that only one size and grid can be used with the Fortran interface (C and Python do not have this limitation). Then you must allocate some memory, and finaly you can perform some spherical harmonic transforms.
When your program is ready, compile it adding these options to the compiler (gfortran) :
An iso_c_binding is provided in file shtns.f03
for a direct call to the C interface.