In both screenshots, the function
f(x,y) over the respective triangulations is plotted.
No, it isn't. What you are plotting is the *interpolated* version of the
function. As a consequence...
As en example, see the point with the white cross -- f(x,y) at the rotated
triangulation is 2.81005 and f(x,y) at the original triangulation is 2.8047.
f(x,y) at the support points is correct and matches the value returned from
the function object (Function::value) passed to the interpolate call.
I am surprised about the differences since I expected that rotating the
triangulation has no effect on f(x,y), if evaluated at the same point.
...this should not be a surprise unless you can convince that the
*interpolated* function should be the same in both cases. This is a question
about the function f(x,y) you use: Is it in the function space you are using
or not?
My second question pertains to the gradient, which is a Tensor<1,2>.
I need to compute the derivatives of f(x,y) in x-and y-direction.
Say, I call get_function_gradients(res,f(x,y)) based on the rotated
triangulation,
stores 'res' the derivatives wrt x and y,
or do I have to make a transformation?
It returns the derivatives with regards to the global coordinate system within
which the triangulation lives, not the reference coordinate system of the
cells (or the coordinate system in which the triangulation lived before it was
rotated -- the triangulation does not retain a memory of its rotation).
df(x,y) / dy = 0 per design, which is correct in the original triangulation,
but not in the rotated triangulation.
Do I miss something here?
Like before, what you need to think about is whether the *interpolated*
version of f(x,y) should have a zero derivative.
Best
W.
--
------------------------------------------------------------------------
Wolfgang Bangerth email: bange...@colostate.edu
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 dealii+unsubscr...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/dealii/34518363-1cb9-2912-5a5e-1e6a5fcdb00c%40colostate.edu.