Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

weird manifold id settings when converting to simplices #13040

Closed
drwells opened this issue Dec 7, 2021 · 1 comment · Fixed by #13192
Closed

weird manifold id settings when converting to simplices #13040

drwells opened this issue Dec 7, 2021 · 1 comment · Fixed by #13192

Comments

@drwells
Copy link
Member

drwells commented Dec 7, 2021

I saw this when looking closely at #13035:

bad

This should be a cylinder, but it isn't (the top left and bottom right are wrong). It looks like we are not setting two line manifold ids correctly. Here is the code:

#include <deal.II/grid/grid_generator.h>
#include <deal.II/grid/grid_out.h>
#include <deal.II/grid/tria.h>

#include <fstream>

template <int dim> void check()
{
  using namespace dealii;
  Triangulation<dim> triangulation;

  {
    Triangulation<dim> x;
    GridGenerator::subdivided_cylinder(x, 4, 1, 2);

    GridGenerator::convert_hypercube_to_simplex_mesh(x, triangulation);
    for (const auto i : x.get_manifold_ids())
      if (i != numbers::flat_manifold_id)
        triangulation.set_manifold(i, x.get_manifold(i));
    triangulation.refine_global(3);
  }

  {
    GridOut go;
    std::ofstream out("out.vtk");
    go.write_vtk(triangulation, out);
  }
}

int main() { check<3>(); }
@bangerth
Copy link
Member

bangerth commented Dec 7, 2021

Ah yes, good eyes!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants