MathLib::finalizeVectorAssembly() should be called as a genreral interface. y.finalizeAssembly() is PETSc specific function.