diff options
Diffstat (limited to 'extern/softbody/src/admmpd_linsolve.h')
-rw-r--r-- | extern/softbody/src/admmpd_linsolve.h | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/extern/softbody/src/admmpd_linsolve.h b/extern/softbody/src/admmpd_linsolve.h index b1dd9ae8f4e..3dc3764c6e9 100644 --- a/extern/softbody/src/admmpd_linsolve.h +++ b/extern/softbody/src/admmpd_linsolve.h @@ -8,25 +8,36 @@ namespace admmpd { +// Preconditioned Conjugate Gradients +class ConjugateGradients { +public: + void solve( + const Options *options, + SolverData *data); + +protected: + // Apply preconditioner + void solve_Ax_b( + SolverData *data, + Eigen::VectorXd *x, + Eigen::VectorXd *b); +}; + +// Multi-Colored Gauss-Seidel class GaussSeidel { public: - // Solves (A + KtK) x = (b + Ktl) - // x and b passed as separate variables - // for debugging/testing purposes. void solve( const Options *options, SolverData *data); protected: - // Allocates data, computes colors void init_solve( const Options *options, SolverData *data); - // Computes colors of A + KtK void compute_colors( const RowSparseMatrix<double> *A, - const RowSparseMatrix<double> *KtK, // if null, just A + int stride, std::vector<std::vector<int> > &colors); }; |