PolarManifold vs SphericalManifold

43 views
Skip to first unread message

Praveen C

unread,
Aug 10, 2016, 12:06:07 AM8/10/16
to Deal.II Googlegroup
Dear all

I want to use MappingManifold for solving PDE on sphere. So I am trying to use PolarManifold together with MappingManifold. I use a rotated PolarManifold for the top and bottom faces of the sphere.

However, the cells have rather bad shapes with PolarManifold compared to SphericalManifold. Is there anyway to make this better ?

Thanks
praveenInline image 2Inline image 1

Praveen C

unread,
Sep 22, 2016, 6:52:23 AM9/22/16
to Deal.II Googlegroup
Hello

This is a bit old question, and I would like to pose it again. The first post is here


I am using PolarManifold and a 90 deg rotated PolarManifold to cover the surface of sphere.

As I posted in this thread, some cells at the corner have bad shape. I think this is related to the fact that the cell has one manifold but its edge has a different manifold.

I could get better cell shapes by attaching the rotated PolarManifold to top/bottom faces and its edges and PolarManifold for all other entities. The code looks like this

      Point<spacedim> center(0.0, 0.0, 0.0);

      GridGenerator::hyper_sphere(triangulation, center, Radius);


      static const PolarManifold<2,3> sphere;

      static const FunctionManifold<3,3,3> rotate("x;-z;y","x;z;-y");

      static const CompositionManifold<2,3,3,3,2,3> rotated_sphere(sphere, rotate);

      triangulation.set_manifold (0, sphere);

      triangulation.set_manifold (1, rotated_sphere);

      triangulation.set_all_manifold_ids(0);

      

      for (typename Triangulation<dim,spacedim>::active_cell_iterator

           cell=triangulation.begin_active();

           cell!=triangulation.end(); ++cell)

      {

         const Point<spacedim> p = cell->center();

         if(std::fabs(p[2]) > 0.5 * Radius) // north and south faces

         {

            cell->set_all_manifold_ids(1); // cell and edges

            std::cout << "Setting RotatedPolarManifold\n";

         }

         else

         {

            cell->set_manifold_id(0); // set cell only

            std::cout << "Setting PolarManifold\n";

         }

      }

      triangulation.refine_global(3);


I get better cell shapes but the grid lines dont seem to be smooth on the side faces. See attached figure. Note that the cells on these side faces have different manifold compared to some of their edges. Whereas on top/bottom faces, the cells and edges have the same manifold.

Is this an inherent limitation of trying to use two different manifolds ?

Best
praveen



luca.heltai

unread,
Sep 22, 2016, 7:46:00 AM9/22/16
to Deal.II Users
Yes. This is a problem inherent with the fact that it is not possible to approximate a sphere with a single chart without singularities.

On the other hand, the manifold you use to describe the top and bottom part of the sphere are not continuous, so the triangulation gets confused when you add new points. For spheres, the best option is to use SphericalManifold.

I’m implementing your changes for the sphere, and running all tests, in order to fix the bug you encounter in the computation of the area. I think the real problem is somewhere else, but I don’t have any more ideas…

L.
> <visit0006.png>
>
>
> --
> 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+un...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Praveen C

unread,
Sep 22, 2016, 8:26:25 AM9/22/16
to Deal.II Googlegroup
Dear Luca

I wanted to use MappingManifold for sphere, but it looks like this is not possible either with PolarManifold or SphericalManifold.

I am doing this for a shallow water model on sphere, where I want to do long time integration, and look at conservation of mass, energy, etc. Having an exact mapping is important for conservation.

If I use SphericalManifold + MappingQ, I seem to have loss of mass conservation over long time integration. In this case, can you tell me about these questions ?

(1) If phi_i are the basis functions, does grad(phi_i) lie exactly on the sphere ? (I guess not)

(2) If (x_q,y_q,z_q) is some quadrature point, is 

sum_i grad(phi_i(x_q,y_q,z_q)) = 0

upto machine precision ?

The last property is necessary for mass conservation in DG schemes for conservation laws.

Best
praveen


Reply all
Reply to author
Forward
0 new messages