Skip to content
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

Merged

Conversation

mthieffry
Copy link
Contributor

@mthieffry mthieffry commented Nov 30, 2018

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:

  • builds with SUCCESS for all platforms on the CI.
  • does not generate new warnings.
  • does not generate new unit test failures.
  • does not generate new scene test failures.
  • does not break API compatibility.
  • is more than 1 week old (or has fast-merge label).

Reviewers will merge only if all these checks are true.

@damienmarchal damienmarchal added pr: status to review To notify reviewers to review this pull-request enhancement About a possible enhancement labels Nov 30, 2018

//
#include <string>
using namespace std;
Copy link
Contributor

@guparan guparan Dec 5, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove the using :-)

@guparan guparan changed the title Add new input datafields to SparseLDLSolver [SofaSparseSolver] ADD saveMatrixToFile to SparseLDLSolver Dec 5, 2018
@guparan guparan added pr: status wip Development in the pull-request is still in progress and removed pr: status to review To notify reviewers to review this pull-request labels Dec 5, 2018
@guparan
Copy link
Contributor

guparan commented Dec 5, 2018

[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 ;
Copy link
Contributor

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.

Copy link
Contributor

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.

@mthieffry
Copy link
Contributor Author

@guparan I made the changes. can you switch the pull request to "to review" ?

@guparan guparan added pr: status to review To notify reviewers to review this pull-request and removed pr: status wip Development in the pull-request is still in progress labels Dec 10, 2018
@guparan guparan added pr: status ready Approved a pull-request, ready to be squashed and removed pr: status to review To notify reviewers to review this pull-request labels Dec 12, 2018
@damienmarchal damienmarchal merged commit 0de9181 into sofa-framework:master Dec 12, 2018
@mthieffry mthieffry deleted the change_SparseLDLSolver branch December 13, 2018 13:37
@guparan guparan added this to the v18.12 milestone Dec 17, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement About a possible enhancement pr: status ready Approved a pull-request, ready to be squashed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants