dmm: compute dmm-specific matrices
dmm: write matrices