On 3/23/23 22:36, RUIJIAN LU wrote:
>
> I understand it. So when computing the equation and I need it times
> "2*pi*r", I should call pull_back() to transform the coordinates of the
> cylinder's vertices to "(r, phi, z)" to get "r". Is it right?
First, if you work in cylindrical coordinates, you probably have a 2d
domain in (r,z) space. It is probably rectangular.
deal.II only knows that you have a domain in x1,x2 space. If you ask a
cell for a vertex, for example, it will give you the coordinates in
x1,x2 space. For yourself, you will then say "the x1 coordinate
corresponds to my r coordinate" and "the x2 coordinate corresponds to
the z coordinate".
So where you need 2*pi*r in an integration formula, you will do
something like
2*pi*fe_values.quadrature_point(q)[0] // [0] == x1 coordinate == r