SHTnsSpheres

Documentation for SHTnsSpheres.

SHTnsSpheres.SHTnsSphereType

sph = SHTnsSphere(nlat, nthreadsThreads.nthreads())

Returns a SHTnsSphere corresponding to a lat-lon mesh of size nlat×2nlat and spectral truncation 2nlat/3 (i.e. T21 and 32×64 for nlat=32)

source
SHTnsSpheres.eraseMethod
y = erase(x)

Some functions need to make copies of input arguments to avoid modifying their contents and remain pure. Passing erase(x) as input argument is equivalent to passing x, except that it explicitly allows to modify the contents of x, thus avoiding copying and allocating.

source
SHTnsSpheres.shtns_use_threadsFunction
num_threads = shtns_use_threads(num_threads)

Call before any initialization of shtns to use mutliple threads. Returns the actual number of threads. If numthreads > 0, specifies the maximum number of threads that should be used. If numthreads <= 0, maximum number of threads is automatically set to the number of processors. If num_threads == 1, openmp will be disabled.

source