-
Notifications
You must be signed in to change notification settings - Fork 148
CoupledPathologies
In the course of using the new coupled equation scheme, I've come across a few situations that at least seem like they might cause problems. Namely, different orders of solution might give a zero diagonal in some orders but non-zero in others, e.g.
has finite diagonals, but swapping the 2nd and 3rd equations
has zero diagonals.
Also, different equations might have different diagonal signs, e.g., electron and hole drift-diffusion in steady state
The attached script mocks up these to scenari.
With PySparse:
With Trilinos:
So, it looks OK. `LinearPCGSolver` fails in all cases (except the last?!), but it should since the matrix is asymmetric. `LinearGMRESSolver` fails with PySparse for the zero diagonal, but PySparse' `LinearGMRESSolver` is generally broken anyway.
Note: PySparse' `LinearGMRESSolver` fails in `precon.jacobi`, which makes sense because it's trying to normalize by the (zero) diagonal. Switching to `LinearGMRESSolver(precon=None)` allows this case to pass, too.
* The number of PyTrilinos iterations is unaffected by the matrix ordering. It's 1 in all cases? * PySparse' `LinearGMRESSolver` takes one more iteration in the zero-diagonal case, but that's likely because we removed the preconditioner. * PySparse' `LinearCGSSolver` takes one more iteration in the mixed-sign-diagonal case.