-
Notifications
You must be signed in to change notification settings - Fork 311
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[SofaSparseSolver] ADD saveMatrixToFile to SparseLDLSolver #845
[SofaSparseSolver] ADD saveMatrixToFile to SparseLDLSolver #845
Conversation
|
||
// | ||
#include <string> | ||
using namespace std; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove the using :-)
[ci-build][with-scene-tests] |
void solve (Matrix& M, Vector& x, Vector& b) override ; | ||
void invert(Matrix& M) override; | ||
bool addJMInvJtLocal(TMatrix * M, ResMatrixType * result,const JMatrixType * J, double fact) override; | ||
virtual void solve (Matrix& M, Vector& x, Vector& b) override ; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need for the virtual specifier when override is used.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We discuss about that at Defrost and we agree with dropping the virtual specifier when override is there, because it is simply less typing.
@guparan I made the changes. can you switch the pull request to "to review" ? |
If savingMatrixToFile is set to true, the system matrix is saved during each time step with the name "MatrixInLDL_%04d", where %d is the value of the time.
I added two new input data:
savingFilename
The filename where the matrix is stored can be changed using the input data d_filename.
If it contains "%d", it will keep the previously described behavior, else it will always save in the same file overwriting it.
savingPrecision
The second new input is d_precision. It is the precision with which the matrix will be stored.
These options are useful to save the system matrix from SOFA and read it from another software.
This PR:
Reviewers will merge only if all these checks are true.