Post by ghasem thank you very much for your attention.but this is 2D.I need a 3D example.
I'm able to simulate 2D grids...
in 3d,I have Divergence problem.and I don't know why this occurs...
my guess is due to Ax=b solving in 3D.
can you direct me?
ghasem...
Again, there is no difference between 2D and 3D as far as Ax=b
is concerned.
In 3D, your A matrix will have a different structure, this is
clear. It will also depend on the boundary conditions you have
what the structure is.
You must be not setting up the A matrix correctly in the 3D case.
If you getting wrong solution, then your setup is wrong.
How can one help you on this? You are the only one who can
look at the A matrix?
Why not do a small problem first, to make sure it is correct. Since
with small problem, (say 3 by 3 by 3) you can verified the A
matrix structure by hand.
It will also help you, if you get into the habit of writing a
design document before coding. Most people start coding first,
which is the wrong thing to do.
--Nasser