Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -148,9 +148,9 @@ class BTDLinearSolver : public sofa::component::linearsolver::MatrixLinearSolver
private:


Index _indMaxNonNullForce; // point with non null force which index is the greatest and for which globalAccumulate was not proceed
Index _indMaxNonNullForce{0}; // point with non null force which index is the greatest and for which globalAccumulate was not proceed

Index _indMaxFwdLHComputed; // indice of node from which bwdLH is accurate
Index _indMaxFwdLHComputed{0}; // indice of node from which bwdLH is accurate

/// private functions for partial solve
/// step1=> accumulate RH locally for the InBloc (only if a new force is detected on RH)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -412,6 +412,11 @@ void BTDLinearSolver<Matrix,Vector>::init_partial_solve()
// Block that is currently being proceed => start from the end (so that we use step2 bwdAccumulateLHGlobal and accumulate potential initial forces)
current_bloc = nb-1;

// no force accumulated yet, and no LH computed during forward:
// both must be reset along with current_bloc, otherwise a value from the previous
// time step (or an out of range one if nb has decreased) is used in partial_solve
_indMaxNonNullForce = 0;
_indMaxFwdLHComputed = 0;

// DF represents the variation of the right hand side of the equation (Force in mechanics)
Vec_dRH.resize(nb);
Expand Down
Loading