MCPcopy Create free account
hub / github.com/bgrimstad/splinter / SparseBiCG

Class SparseBiCG

include/linearsolvers.h:96–114  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

94
95template<class rhs = DenseVector>
96class SparseBiCG : public LinearSolver<SparseMatrix, rhs>
97{
98private:
99 bool doSolve(const SparseMatrix &A, const rhs &b, rhs &x) const
100 {
101 // Init BiCGSTAB solver (requires square matrices)
102 Eigen::BiCGSTAB<SparseMatrix> sparseSolver(A);
103
104 if (sparseSolver.info() == Eigen::Success)
105 {
106 // Solve LSE
107 x = sparseSolver.solve(b);
108
109 return sparseSolver.info() == Eigen::Success;
110 }
111
112 return false;
113 }
114};
115
116template<class rhs = DenseVector>
117class SparseLU : public LinearSolver<SparseMatrix, rhs>

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected