Spherical coordinates output

39 views
Skip to first unread message

giuseppe orlando

unread,
Feb 3, 2025, 1:34:11 PM2/3/25
to deal.II User Group
Dear all,
I would have a question about the output when using concentric_hyper_shells
Is there any function that automatically can obtain and save in output the spherical coordinates as well as the cartesian ones? This would be very useful to lot some slices.
In Step-53, there is the pull_back function that can do this job, but here I do not need to defined a Manifold because a SphericalManifold is already attached. Do I need to define a routine analogous to "get_elelvation" or is there some automatic tool that can help to reach this goal?

Moreover, I take the opportunity for another question. Is there any advancement in the matrix-free infrastructure when space_dim = dim - 1, as in hyper_sphere?

Thanks in advance.

Best,
Giuseppe Orlando

Wolfgang Bangerth

unread,
Feb 3, 2025, 6:16:27 PM2/3/25
to dea...@googlegroups.com

Giuseppe:
> I would have a question about the output when using concentric_hyper_shells
> <https://nam10.safelinks.protection.outlook.com/?
> url=https%3A%2F%2Fwww.dealii.org%2Fcurrent%2Fdoxygen%2Fdeal.II%2FnamespaceGridGenerator.html%23abfcc142a9fc905a1abec9315693a57d4&data=05%7C02%7CWolfgang.Bangerth%40colostate.edu%7C43b61d1e63844cc265d608dd44815d28%7Cafb58802ff7a4bb1ab21367ff2ecfc8b%7C0%7C0%7C638742044588214483%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=J10wlQXEiI3DD5tP3evjf9bxQpJG6zAiG5Vy3E4G0L0%3D&reserved=0>
> Is there any function that automatically can obtain and save in output the
> spherical coordinates as well as the cartesian ones? This would be very useful
> to lot some slices.

There is no such function. DataOut and all other functions I know of simply
output data using the coordinates of the vertices (perhaps modified by a
mapping, but otherwise as is). There is no easy way to modify coordinates
during graphical output. You are probably better off doing the transformation
in Visit or Paraview.

Perhaps if you explain what it is you actually want to do we can suggest other
things too.


> Moreover, I take the opportunity for another question. Is there any
> advancement in the matrix-free infrastructure when space_dim = dim - 1, as in
> hyper_sphere <https://nam10.safelinks.protection.outlook.com/?
> url=https%3A%2F%2Fwww.dealii.org%2Fcurrent%2Fdoxygen%2Fdeal.II%2FnamespaceGridGenerator.html%23ab2dc2f16fc52cf1e51b9afdc4264ac70&data=05%7C02%7CWolfgang.Bangerth%40colostate.edu%7C43b61d1e63844cc265d608dd44815d28%7Cafb58802ff7a4bb1ab21367ff2ecfc8b%7C0%7C0%7C638742044588241438%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=qn2kDHNAb3K8TlUUoEGnYvEQYZQbajGnqRvrfosVC4U%3D&reserved=0>?

I'll leave this question to those more familiar with the matrix free framework.

Best
W.

giuseppe orlando

unread,
Feb 4, 2025, 12:45:31 AM2/4/25
to deal.II User Group
Dear Wolfgang,
thanks a lot for you answer. My goal would be able to reproduce images like these ones, which are a cross-section at a fixed latitude. Hence, I coulde use 'slice' type functions if I have spherical coordinates, but not with Cartesian ones.

Best,
Giuseppe
Details are in the caption following the image

Wolfgang Bangerth

unread,
Feb 4, 2025, 8:32:09 AM2/4/25
to dea...@googlegroups.com
On 2/3/25 22:45, giuseppe orlando wrote:
> thanks a lot for you answer. My goal would be able to reproduce images like
> these ones, which are a cross-section at a fixed latitude. Hence, I coulde use
> 'slice' type functions if I have spherical coordinates, but not with Cartesian
> ones.

Giuseppe:
I think this is best done in postprocessing in visit or paraview.
Best
W.
Reply all
Reply to author
Forward
0 new messages