Hello. I have quite a weird problem.
Check my notebook - implementation of solving
Poisson equation in a square by finite differences
using Conjugate Gradient Method.
Do not seek a misbehaviour of the function -
it works fine. But this was achieved with painful
experimentation. Check the code for
PoissonSolveCGMComp compiled function,
and notice the apparently redundant Evaluate
wrappers around tensor updating statements.
I can think of no real reason WHY Evaluate has to be
called here - however, if removed the function
If you try some debugging prints,
you will be surprised that the assignment
x = x + t p
affects p too?
Can anyone help me with this? I'm getting slowly mad about it...
thanks in advance
Attachment: lap_dir_sq_nonstatic_comp.nb, URL: ,