Hi Wolfgang, a brief update -- before, I was using
ConstraintMatrix::distribute_local_to_global in the assembly of both the
derivative vector and the Hessian matrix. I can see how that would make
the computed vector no longer represent the derivative of a functional,
since you're changing entries more to make the hanging node constraints
come out correctly. To see if this was the issue, I instead changed the
code to add up contributions to the global vector/matrix directly, and
only reconcile the constraints in the nonlinear solver routine. All the
other unit tests still pass, so this change didn't break the nonlinear
solver for the unrefined case. Still, the errors in the local linear
approximation to P aren't decreasing for the refined mesh.
I'll try your approach about assembling (f(u), v) directly and report
back. If you have other suggestions, I'm all ears; this is a pretty
serious roadblock for what I want to do next.
I imagine -- but you're doing the right thing trying to figure things out.
I don't have any other suggestions, except possibly to try to work out a
little example that you can compute by hand on a piece of paper. E.g.,
start with two cells, refine one, and prescribe a "current solution" u
that is convenient (e.g., constant, or linear). Then work out on a piece
of paper how everything ought to look, and compare what you get out of
your code. I've often used this as a last resort, because I know that
I'm going to spend an afternoon writing stuff on a piece of paper and
comparing with what I get, but it's also often helped me debug things
with which I've banged my head against the wall for too long already.
Best
W.
--
------------------------------------------------------------------------
Wolfgang Bangerth email: [email protected]
www: http://www.math.colostate.edu/~bangerth/
--
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see
https://groups.google.com/d/forum/dealii?hl=en
---
You received this message because you are subscribed to the Google Groups "deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.