579 |
vrot[i:i+2]=w1,w2 |
vrot[i:i+2]=w1,w2 |
580 |
return vrot |
return vrot |
581 |
|
|
582 |
def GMRES(b, Aprod, Msolve, bilinearform, stoppingcriterium, x=None, iter_max=100, iter_restart=10): |
def GMRES(b, Aprod, Msolve, bilinearform, stoppingcriterium, x=None, iter_max=100, iter_restart=20): |
583 |
m=iter_restart |
m=iter_restart |
584 |
iter=0 |
iter=0 |
585 |
while True: |
while True: |
589 |
if stopped: break |
if stopped: break |
590 |
return x |
return x |
591 |
|
|
592 |
def GMRESm(b, Aprod, Msolve, bilinearform, stoppingcriterium, x=None, iter_max=100, iter_restart=10): |
def GMRESm(b, Aprod, Msolve, bilinearform, stoppingcriterium, x=None, iter_max=100, iter_restart=20): |
593 |
iter=0 |
iter=0 |
594 |
r=Msolve(b) |
r=Msolve(b) |
595 |
r_dot_r = bilinearform(r, r) |
r_dot_r = bilinearform(r, r) |