simplify preconditioning the system matrix, bugfix

This commit is contained in:
Irlan
2018-05-16 16:18:00 -03:00
parent 7e7935c28a
commit 69ee19ffac
2 changed files with 42 additions and 117 deletions

View File

@ -63,16 +63,10 @@ private:
// Compute the constraint projection matrix S.
void Compute_S(b3Mat33* S);
// Solve Ax = b using the Modified Conjugate Gradient (MCG).
// Output x and the residual error f.
void Solve_MCG(b3DenseVec3& x0, b3DenseVec3& f, u32& iterations, const b3SparseMat33& A, const b3DenseVec3& b, const b3Mat33* S) const;
// Solve Ax = b using MCG with Jacobi preconditioning.
// Output x and the residual error f.
// This method is slower than MCG because we have to compute the preconditioning
// matrix P, but it can improve convergence.
void Solve_MPCG(b3DenseVec3& x0, b3DenseVec3& f, u32& iterations, const b3SparseMat33& A, const b3DenseVec3& b, const b3Mat33* S) const;
// Solve Ax = b.
// Output x and the residual error f = Ax - b ~ 0.
void Solve(b3DenseVec3& x0, b3DenseVec3& f, u32& iterations, const b3SparseMat33& A, const b3DenseVec3& b, const b3Mat33* S) const;
b3SpringCloth * m_cloth;
float32 m_h;