In order to calculate the chargedensity, the expansion coefficients have to be evaluated and the following function has to be present in the module file *.so:
extern "C" void chargedensity_coeff(Vector & cd,double * T, Vector & Hxc, Vector & Hext, double * gJ, Vector & MODPAR, char ** sipffilename, ComplexMatrix & Icalc_parstorage);
it works exactly as mcalc with the only modification that the vector cd has 28 components, therefore we do not give more details here.
The module function must perform the following task: