adding phi to xdmf_write