A simple hack I have used is a filter inside paraview (see attached transform.py use "programmable filter"). I have used it for volume data, but I would expect it to work for your problem too.
Alternatively, if you compute lat/long as a solution variable (either in the deal.II code or using the paraview "calculator"), you can use "warp by vector" inside paraview to move your vertices to the desired location. Both options won't handle poles well, though. On Thu, Mar 2, 2017 at 4:09 AM, Praveen C <[email protected]> wrote: > Dear all > > I solve a PDE on sphere and use > > parallel::distributed::Triangulation<2,3> triangulation; > > > I would like to save the solution in latitude/longitude coordinates for > visualization, so that I can make a 2-d plot, rather than view it on the > sphere > https://urldefense.proofpoint.com/v2/url?u=https-3A__twitter.com_cfdlab_status_793799466545360896_photo_1&d=DwIBaQ&c=Ngd-ta5yRYsqeUsEDgxhcqsYYY1Xs5ogLxWPA_2Wlc4&r=4k7iKXbjGC8LfYxVJJXiaYVu6FRWmEjX38S7JmlS9Vw&m=6_qybEERFtXDfVizh7WGEN902feGJiTZu4SvfjzYsYA&s=vj9qXBGnwBxKaawxeCkII2lqLZI6nEk8F6Zt0-lV9AI&e= > > > Do you have any ideas how I can do this in deal.II ? > > Thanks > praveen > > -- > The deal.II project is located at > https://urldefense.proofpoint.com/v2/url?u=http-3A__www.dealii.org_&d=DwIBaQ&c=Ngd-ta5yRYsqeUsEDgxhcqsYYY1Xs5ogLxWPA_2Wlc4&r=4k7iKXbjGC8LfYxVJJXiaYVu6FRWmEjX38S7JmlS9Vw&m=6_qybEERFtXDfVizh7WGEN902feGJiTZu4SvfjzYsYA&s=BqiJbS6vaxNm9-2k9TAAEAmDaW-xniIKWAeVR3gyiUI&e= > > For mailing list/forum options, see > https://urldefense.proofpoint.com/v2/url?u=https-3A__groups.google.com_d_forum_dealii-3Fhl-3Den&d=DwIBaQ&c=Ngd-ta5yRYsqeUsEDgxhcqsYYY1Xs5ogLxWPA_2Wlc4&r=4k7iKXbjGC8LfYxVJJXiaYVu6FRWmEjX38S7JmlS9Vw&m=6_qybEERFtXDfVizh7WGEN902feGJiTZu4SvfjzYsYA&s=YNsVrYaXP6SYIlBQuduCh8K1mUrZzs1NcGaaXKfOjxE&e= > > --- > 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://urldefense.proofpoint.com/v2/url?u=https-3A__groups.google.com_d_optout&d=DwIBaQ&c=Ngd-ta5yRYsqeUsEDgxhcqsYYY1Xs5ogLxWPA_2Wlc4&r=4k7iKXbjGC8LfYxVJJXiaYVu6FRWmEjX38S7JmlS9Vw&m=6_qybEERFtXDfVizh7WGEN902feGJiTZu4SvfjzYsYA&s=o-8WNwifzEQQbEzpKIEjcq7St9EKC3bhWDK37vsCiJ0&e= > . -- Timo Heister http://www.math.clemson.edu/~heister/ -- 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.
# filter->programmable filter, then paste the following code into it import math pdi = self.GetInput() pdo = self.GetOutput() newPoints = vtk.vtkPoints() numPoints = pdi.GetNumberOfPoints() for i in range(0, numPoints): coord = pdi.GetPoint(i) x, y, z = coord[:3] r = sqrt(x*x+y*y+z*z) t = math.atan2(y,x) b = math.acos(z/r) newPoints.InsertPoint(i, r/1e6, t, b) pdo.SetPoints(newPoints) pdo.GetPointData().AddArray(pdi.GetPointData().GetArray(0)) pdo.GetPointData().AddArray(pdi.GetPointData().GetArray(1)) pdo.GetPointData().AddArray(pdi.GetPointData().GetArray(2))
