System solver constructor from PETSc matrix dump file
Absolutely yes. The way of doing it is exactly the same. We could:
- check for the matrix path to exist and throw if not
- check for the solution and rhs path to exist and call vectorsCreate if not or loading them if yes. Do you agree?
If the user specifies the path of a file (both matrix and vector) we should throw an exception is the file is not accessible. For vectors only, we can accept empty paths, in that case vectors will be created from scratch and their dimensions will be compatible with the matrix read from file.
I've added the dump and restore of the system transpose flag. I removed the block size from restore method because it is useless and misleading. The commit before the last one shows why, you can checkout there and run integration_test_LA_parallel_00003. Once approved, last two commits can be merged together, keeping the message of the last one.
I reworked dump and restore methods to allow system component dump and restore separately. The matrix dump can be very expensive and time wasting if only solution is needed.
Please put back the blockSize in the restore function. If you want a restore function with a block size equal to one add an overload without that argument. Without that argument it will not be possible to properly restore a system with a block size different than one.
Please put back the blockSize in the restore function. If you want a restore function with a block size equal to one add an overload without that argument. Without that argument it will not be possible to properly restore a system with a block size different than one.
I'm assuming the function MatLoad can load dump files with a block size different that one. If that's not the case the change is fine, but I think the documentation should be updated.
Having the transposed flag restored from the dump will create problems: the system is created with a transpose flag and that can be changed without notice when the system is restored. There is not even a function that can use to check if the transpose flag is on.
I squashed requested changes in 2 commits overall and rebased on master.
I have a main using system restore on arbitrary previously dumped systems. I would not make a test from it but an example that can be used to solve dumped systems. If you agree I can work on the example to make it usable.
I have a main using system restore on arbitrary previously dumped systems. I would not make a test from it but an example that can be used to solve dumped systems. If you agree I can work on the example to make it usable.
Sure, let's make it a new example.
The new commit should fix the serial tests.
Is there any more work that needs to be done, or is this pull request ready to be merged?