In order to calculate spindensities the following function has to be present in the module file *.so:
extern "C" void spindensity_coeff(Vector &aSlm, int & xyz, double *T,Vector &Hxc, Vector & Hext,double *gJ,Vector &MODPAR,char **sipffilename,ComplexMatrix & Icalc_parstorage);
Note for windows users with MINGW the declaration should be extern "C" __declspec(dllexport) void spindensity_coeff(...).
The meaning of the symbols is as follows:
on input xyz direction index 1,2,3 = x,y,z (component for the spindensity vector to be calculated) T temperature[K] Hxc vector of exchange field [meV] (can be n-dimensional, for a set of n operators) Hext external magnetic field [T] gJ Lande factor MODPAR Vector with Parameters read in single ion property file sipffilename file name of the single ion parameter file Icalc_parstorage parameter matrix (initialized by Icalc_parameter_storage_matrix_init) it should/may contain any information, e.g. population numbers of the states (imaginary part of row 0) and eigenvalues (real part of row 0) with values set by the most recent call for this ion (making use of this matrix is optional) on output aSlm Output single ion moments =expectation values of coefficients of Zlm R^2(r) at a given temperature T and effective field H
The module function must perform the following tasks: