Minor refactoring of BoutInitialise, BoutFinalise#1651
Conversation
Allows gtest death test to check usage message is printed
Also clang-format
Consistent handling of errors -- but do we want to rethrow or just return 1?
Also make savePIDtoFile throw if file could not be opened
Some small tidying with minor functions
|
After way too long debugging, I finally worked out that the boutcore tests were failing because they were not calling I've done the quick fix which is to explicitly call I did notice that there is a commented-out call to For future debugging reference: Python 3.6 introduced the environment variable AddressSanitizer turned out to not be so useful, because it doesn't take a blacklist (they claim no false positives!) |
|
The python library has checks in various places to sure that the bout library is currently initialised. Thus after finalise, several calls are invalid. I think the issue arose as Python doesn't have RAII, so the destruction of several object caused issues. I'll have a look again ... |
|
The latest reason the tests failed was due to a call to I've worked around it by getting the global mesh and explicitly @dschwoerer Uncommenting the |
BoutInitialiseinto smaller functions, and then call all of thembout::experimentalnamespace, as there's some potential for a lot of flux on the signatures/location, and they need to be "always visible"BoutFinaliseto write out settings fileSplitting up
BoutInitialisemakes it easier to read and test, as well as potentially be advantageous for the Python API and the integrated tests (when we don't need to do all the setup)There's also a bug fix in here, that we might want to pull out and get into master:
std::stringstream(filename)is a temporary, so the filename is always""and the file never gets created.