The policy in libMesh has always been that NumericVector::close()
isn't done at the end of the system assembly function, it's done at
the beginning of the solver function.

Would anyone object to doing it the other way?

We'd call close() in System::assemble() and related functions, so that
user code wouldn't have to change at all to produce closed results.

The advantages I see are

More safety in new user codes: people calling an assemble function
wouldn't have to worry about whether they could immediately use the
outputs or not

Conciseness: now that we've got various sensitivity methods using
assembly results without calling solve(), there's a proliferation of
new close() calls that could be removed.

The disadvantages are

Less safety in rare old user codes: if someone is modifying their
matrix or rhs outside of the library assembly functions, they might be
relying on the solver close() rather than calling that themselves.

Potential new inefficiency in rare user codes: if the user wants to
call his normal assembly function, but then assemble in additional
terms before using the result, a close() in between would be
unnecessary extra communications.
---
Roy

------------------------------------------------------------------------------

_______________________________________________
Libmesh-devel mailing list
Libmesh-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libmesh-devel

Reply via email to