I am tryin to solve PDE and need to use PETSc and need yo know if using it with problem statement or should I use varf statement.
the problem is when I use varf statement the results differs than using problem statement and I am sure that results obtained from problem statement is correct
hereunder is the code for defining the PDE in two different statements and the remain code is the same
1-
problem HydrodynamicNn(Nn, v3) = int2d(Th)(Nnv3
+(Dndt*(grad(Nn)'grad(v3)))
+((-Wnx * dx(Nn) + -Wny * dy(Nn))dtv3))
-int2d(Th)(Nnoldv3)
-int2d(Th)(Snv3dt)
+on (needle, Nn = 0)
//solve
HydrodynamicNn;
Thank you very much for you attention and reply
but I thing the sings are correct in problem statement it is negative ( -int2d(Th)(Snv3 dt)
and in varf statement it is positive ( +int2d(Th)(Snv3 dt))
Thank you for your attention and reply
another question and forgive me if it so basic
the default solver used when write problem statement is the same as writing varf statement (wit out mentioning and solver like below)
problem HydrodynamicNn(Nn, v3)
varf HydrodynamicNn(Nn, v3)
what I am trying to say that the above two statements uses the same solver ?
Yes, but the way the serial FreeFEM solvers work is different from the way they work in PETSc. Please spend some time working through the examples and then follow up if you have additional questions.
Hello Chris
Thank you again for your time
attached the code the problem now when I change problem to varf (and keep in mind the sign also of the right hand side change) I do not get a correct results