anisotropic refinement with regard to global coordinate direction

29 views
Skip to first unread message

Simon

unread,
Nov 8, 2023, 6:26:53 AM11/8/23
to deal.II User Group
Dear all,

attached is a minimal example in which I create two simple triangulations (tria1, tria2),
merge them, and finally anisotropically refine all cells (RefinementCase<3>::cut_xz).
I also write the merged triangulation to a file for visualizations sake.

My objective is to refine only in the global xy plane, that is, in global z-direction, I want to have one element everywhere (if hanging nodes allow that, of course).
For the given example,
RefinementCase<3>::cut_xz
is correct for tria1, but not for tria2.
I read the documenation which states that anisotropic refinement occurs w.r.t the local coordinate system of the cell, so I am not really surprised about the above result.

Anyway, is there a way to perform anisotropic with regard to the global system?
My ideas was to, based on the local orientation of the cell system, pass a different RefinementCase when marking the cells for refinement.
The TriaAccessor class offers the combined_face_orientation() function, but I am
not sure if it helps here.

Thank you for your input!

Best,
Simon


example.cc
Reply all
Reply to author
Forward
0 new messages