Automatically disable BCs, add option to dump matrices (#4144)