revision + bug in sdipind corrected (not all diagonal blocks in MAT1 were zero)