iMSTK
Interactive Medical Simulation Toolkit
|
Solves a linear system using the projected gauss seidel method. Only good for diagonally dominant systems, must have elements on diagonals though. The initial guess (start) is always zero, convergence value may be specified with epsilon, relaxation decreases the step size (useful when may rows exist in A) More...
#include <imstkProjectedGaussSeidelSolver.h>
Public Member Functions | |
void | setA (Eigen::SparseMatrix< Scalar > *A) |
void | setMaxIterations (const unsigned int maxIterations) |
Set the maximum number of iterations. | |
void | setRelaxation (const Scalar relaxation) |
Similar to step size can be used to avoid overshooting the solution. | |
void | setEpsilon (const Scalar epsilon) |
Stops when energy=(x_i+1-x_i).norm() < epsilon, when the solution isn't changing anymore. | |
const double | getEnergy () const |
Energy is defined as energy=(x_i+1-x_i).norm() | |
Eigen::Matrix< Scalar, -1, 1 > & | solve (const Eigen::Matrix< Scalar, -1, 1 > &b, const Eigen::Matrix< Scalar, -1, 2 > &cu) |
Solves a linear system using the projected gauss seidel method. Only good for diagonally dominant systems, must have elements on diagonals though. The initial guess (start) is always zero, convergence value may be specified with epsilon, relaxation decreases the step size (useful when may rows exist in A)
Definition at line 18 of file imstkRigidBodyModel2.h.