Hi All,
The following use of Krylov Solver gives me this error:
Solving linear system of size 41473 x 41473 (PETSc Krylov solver).
PETSc Krylov solver starting to solve 41473 x 41473 system.
Traceback (most recent call last):
File "wave_newmark.py", line 124, in
solver.solve(e.vector(), b)
RuntimeError:
Error: Unable to solve linear system using PETSc Krylov solver.
* Reason: Solution failed to converge in 0 iterations (PETSc reason DIVERGED_NANORINF, residual norm ||r|| = nan).
* Where: This error was encountered inside PETScKrylovSolver.cpp.
* Process: 0
Can anyone please help in getting rid of this? Is it being implemented wrong?
a = some expression ; L = some expression
S = SystemAssembler(a, L, bc)
A = PETScMatrix()
b = PETScVector()
S.assemble(A)
e = Function(V)
solver = PETScKrylovSolver("cg")
solver.set_operator(A)
while t < T:
S.assemble(b)
solver.solve(e.vector(), b)
e0.assign(e1)
e1.assign(e)
t += dt