Hello Timo,
thanks for the picture. That makes things clear for me. Now I can give
you my thoughts on your questions.
Regardless of the fact, that cylinder is only implemented in 3d as a
Cylinder, I see two problems:
1) The coarse meshes do have different levels of Cylinders. While
the coarse cylinder represents a rectangle, the cylindrical hole is
a octagon.
2) After merging, the information about the cylindrical boundary is
lost and is in fact an interior boundary (indicator = 255). So
there's no way to actually get an "real" cylinder on refinement, as
the cylinder emerging from the cylindrical hole will stay a octagon.
I tried solving the first problem by writing my own implementation
of a cylinder, which looks the same as the cylindrical hole. But
doing so there's a problem with the orientation of the boundary
lines. (An error occurred in line <1664> of file
<deal.II/source/grid/tria.cc> in function
...::create_triangulation(...))
Nontheless, there still would be the second problem. This one could
only be solved if it was possible to preserve boundary indicators on
merging, what should be possible by editing the merge_triangulations
function. But then I would have lines actually not being real
boundaries with an boundary indicator != 255. Is this a problem for
further calculation?
Anyone with some advise on how to do such a grid? Any other
approaches than the above on?
I can think of two possible solutions for your problems.
The first one is to put a boundary indicator != 255 on the edges of the
cylinder. This is somehow a two sided approach. The positive side is
that refinement goes well after you have assigned a boundary description
to the triangulation. The down side is that now the DoFHandler treats
this as a real boundary, i.e. on the boundary of the cylinder there are
put two degrees of freedom everywhere, where there should be one
actually. This could be fixed by coupling the dofs in the constraint
matrix. Then basic computations should be fine again, but you have to be
careful when using functions from the DoFTools and VectorTools namespaces.
The second solution is rather straight forward. Keep boundary indicator
= 255, do the refinement and move the vertices back on the boundary of
cylinder. However, at the moment I cannot image how difficult it is to
find the right vertices to move. Perhabs you could try this for one or
two refinements by hand on a sheet of paper to see how difficult it becomes.
If you are lucky there is someone else, who has already some experience
with this issue and can point you to a better solution.
Best Regards,
Markus
_______________________________________________
dealii mailing list http://poisson.dealii.org/mailman/listinfo/dealii