Open ghosghos opened 6 years ago
Did you take a look at the examples (e.g. BiCgStab)?
Math.NET does not support direct methods for large sparse matrices. Direct methods usually have a better performance, but require more memory. You might be interested in CSparse.NET and CSparse.Interop.
BTW: when using iterative methods, you should always apply a preconditioner. In Math.NET, the only preconditioner optimized for sparse matrices is MILU0:
var iterator = new Iterator<double>(
new IterationCountStopCriterion<double>(limit),
new ResidualStopCriterion<double>(tolerance),
new DivergenceStopCriterion<double>()
);
var solver = new BiCgStab();
var preconditioner = new MILU0Preconditioner();
preconditioner.Initialize(matrix);
solver.Solve(matrix, b, x, iterator, preconditioner);
1- any one can give an example of iterative solvers of linear system Ax = b. I am not able to completely understand the input of the function. lets say I have marrix A and vector b and i want to use the iterative solver to solve for x.
2- what other types of solvers does mathnet numerics support. please provide with complete example of implementation.
I need this with a FEM project I am working on. and performance is a huge issue. so I want to try different solvers to see how they compare.
Ghassan