Unable to collect periodic faces

34 views
Skip to first unread message

vachanpo...@gmail.com

unread,
Apr 20, 2021, 3:37:50 AM4/20/21
to deal.II User Group
Dear all,

I have a simple cube gmsh file (annexed) which I want to read, and assign a periodic BC to it. I export the mesh to 'msh2' format and then read it using GridIn. I then call collect_periodic_faces() at which point, the code crashes with the error

The violated condition was:
    pairs1.size() > 0
Additional information:
    No new periodic face pairs have been found. Are you sure that you've selected the correct boundary id's and that the coarsest level mesh is colorized?

The above error was generated when the function was called with bid=2 and direction=2. I have checked using gmsh gui that the boundary ids have been correctly assigned. What is causing this error? Am I missing a step somewhere?

Thanking in anticipation,
Vachan

-----------------------------------------------------------------------------------------
// gmsh file
// Simple cube geometry
lc=0.1;
l=1;

// 2D geometry
p1=newp; Point(p1) = {0,0,0,lc};
p2=newp; Point(p2) = {l,0,0,lc};
p3=newp; Point(p3) = {l,l,0,lc};
p4=newp; Point(p4) = {0,l,0,lc};

l1=newl; Line(l1) = {1,2};
l2=newl; Line(l2) = {2,3};
l3=newl; Line(l3) = {3,4};
l4=newl; Line(l4) = {4,1};

Transfinite Curve{l1,l2,l3,l4} = 10;

ll1=newll; Curve Loop(ll1) = {l1,l2,l3,l4};
s1=news; Plane Surface(s1) = {ll1};
Transfinite Surface{s1} = {p1,p2,p3,p4};
Recombine Surface{s1};

// 3D extrusion
out[] = Extrude {0,0,l} {
    Surface{s1}; Layers{10}; Recombine;
};

// Physical entities
// periodic BCs must have same boundary id
Physical Volume(1) = {out[1]};
Physical Surface(2) = {s1,out[0]}; // z dir faces
Physical Surface(1) = {out[2],out[4]}; // y dir faces
Physical Surface(0) = {out[3],out[5]}; // x dir faces

Daniel Arndt

unread,
Apr 20, 2021, 10:57:13 AM4/20/21
to dea...@googlegroups.com
Vachan,

Maybe the boundary information is not transferred to the deal.II Triangulation when calling GridIn::read_msh. I would recommend checking the triangulation after reading it in and modify the boundary indicators manually if necessary.

Best,
Daniel

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/dealii/b8092236-d4cd-4684-b363-dc0165626196n%40googlegroups.com.

vachanpo...@gmail.com

unread,
Apr 21, 2021, 3:37:57 AM4/21/21
to deal.II User Group
Daniel,

Thanks for your reply. I had previously used GridIn::read_msh() in 2d in which case the boundary ids were also correctly read. Isn't it unexpected behaviour then, if the data is not getting transferred in 3d? Manually setting the ids will work for now, but eventually I wish the transfer of boundary id information also happens.

Reply all
Reply to author
Forward
0 new messages