Convergence Error #1098
-
Hello everyone When I run the code for the stationary Stokes equation, it works fine; however, when I run the code for the time-dependent Stokes equation, the error remains constant and does not decrease with mesh refinement. I suspect that there might be a syntax error.
RESULT
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Please provide some suggestions |
Beta Was this translation helpful? Give feedback.
-
I am quite sure you have not found this in any tutorial: uh, ph = solve(solver, op, t0, tF, xh0)
uh_array = collect(uh)
uh_final = uh_array[end][2] Although fesltn = solve(odeslvr, tfeop, t0, tF, xhs0)
for (t_n, xhs_n) in fesltn
eh_u = u(t_n) - xhs_n[1]
e_u = sqrt(sum(∫(eh_n ⋅ eh_n) * dΩ))
eh_p = p(t_n) - xhs_n[2]
e_p = sqrt(sum(∫(eh_n ⋅ eh_n) * dΩ))
end |
Beta Was this translation helpful? Give feedback.
I am quite sure you have not found this in any tutorial:
Although
solve
returns an iterable, caches are reused throughout. This means there is aliasing between different iterations, otherwise the memory costs would be prohibitive. Also thesolve
method returns(t,x)
, not(u,p)
. Unless you go into the source code and develop an understanding of how things work, I would try to follow the tutorials/tests.