Fix performance issue when the problem matrix is a MatNest
The problem was that MatCreateVecsEmpty
and VecDuplicateEmpty
were not covering all possible cases.
A better solution would be to completely avoid VecDuplicateEmpty
by modifying PETSc so that vectors allocate internal storage only when needed.
Edited by Jose E. Roman