I noticed that right hand side vector b is newly created in every time step as it is not returned at the end of newton iteration.
Here is the print of ID from first five time step
ID of b: 4335405648 at time step 0
ID of b: 6296605200 at time step 1
ID of b: 6309206976 at time step 2
ID of b: 6311653712 at time step 3
ID of b: 6305607536 at time step 4
ID of b: 6413148672 at time step 5
Since b is originally set to None inside solver_setup function, b becomes None again after completing one time step, and turtle assign new b in every time step as b is None at the beginning of every time step. Specifically, line 85 of newtonsolver.py gets called at the beginning of every time step instead of line 87
I noticed that right hand side vector
b
is newly created in every time step as it is not returned at the end of newton iteration. Here is the print of ID from first five time stepSince
b
is originally set toNone
inside solver_setup function,b
becomesNone
again after completing one time step, and turtle assign newb
in every time step asb
isNone
at the beginning of every time step. Specifically, line 85 ofnewtonsolver.py
gets called at the beginning of every time step instead of line 87https://github.com/KVSlab/turtleFSI/blob/34925bed03008e463ce6ddc82b875287fc866177/turtleFSI/modules/newtonsolver.py#L84-L87
I do not know how much impact it has, but I assume it is a waste of memory to create new
b
. Just addingb
as a part of return arguments at the end of newton iteration should fix the problem. https://github.com/KVSlab/turtleFSI/blob/34925bed03008e463ce6ddc82b875287fc866177/turtleFSI/modules/newtonsolver.py#L114