Exec error : periodic: Sorry one vertex of face is losted

Hello i am trying to define the periodicity on a side composed of the side of a cube plus a side of a quarter sphere.
I firstly mesh the geometry with Gmsh and read it with FreeFem++ and I get this error:

read mesh ok 0Mesh3, num Tetra:= 1895, num Vertice:= 528 num boundary Triangles:= 970
Mesh3::meshS, num Triangles:= 970, num Vertice:= 461 num boundary Edges:= 161
— Warning manifold obj nb:72 adj 72 of dim =2
– Mesh3 : cubesphere0063.mesh, space dimension 3, num Tetrahedron elts 1895, num Vertice 528 num Bordary elts 970
– Mesh3:MeshS : cubesphere0063.mesh, space dimension 3, num Triangle elts 970, num Vertice 461 num Bordary elts 161
vertex : 409 -0.741661 -0.323528 -1 44 Abscisses: s = -0.741661 -0.323528 11 29
current line = 42
Exec error : periodic: Sorry one vertex of face is losted
– number :1
Exec error : periodic: Sorry one vertex of face is losted
– number :1

there is the code Gmsh:
‘’’
r=0.5;
h=0.1;
SetFactory(‘OpenCASCADE’);
Box(1) = {-1.0,-1.0,-1.0, 2, 2, 2};
Sphere(2) = {1,1,1, 0.5};
BooleanIntersection{ Volume{1}; }{Volume{2}; Delete;}

BooleanFragments{ Volume{1,2}; Delete; }{}

boundS45[] = Boundary{Surface 45;};
boundS40[] = Boundary{Surface 40;};
boundS19[] = Boundary{Surface 19;};
boundS29[] = Boundary{Surface 29;};
boundS23[] = Boundary{Surface 23;};
boundS9[] = Boundary{Surface 9;};
boundS11[] = Boundary{Surface 11;};
boundS37[] = Boundary{Surface 37;};
boundS15[] = Boundary{Surface 15;};
boundS32[] = Boundary{Surface 32;};

Periodic Surface 45 {boundS45[]} = 40 {boundS40[]};
Periodic Surface 19 {boundS19[]} = 29 {boundS29[]};
Periodic Surface 23 {boundS23[]} = 9 {boundS9[]};

Periodic Surface 11 {boundS11[]} = 37 {boundS37[]};

Periodic Surface 15 {boundS15[]} = 32 {boundS32[]};

Characteristic Length{ PointsOf{ Volume{11}; } } = h;
Characteristic Length{ PointsOf{ Volume{2}; } } = h;
Characteristic Length{ PointsOf{ Volume{3}; } } = h;
‘’’

and on the code FreeFem++ i add:

mesh3 Th = readmesh3(“cubesphere0063.mesh”);
fespace Vh(Th, P2,periodic=[[19,y,z],[29,y,z],[23,y,z],[9,y,z],[11,y,z],[37,y,z],[15,y,z],[32,y,z] ]);

thank you in advance for you response.

Please surround your mesh file between three single quotes ``` so that it can be easily copied and pasted. It’s not possible to reproduce the issue otherwise.

1 Like

is this easily copied and pasted now?

No, just try it yourself. I get, when meshing:

Info    : Running '/Volumes/gmsh-4.5.4-MacOSX/Gmsh.app/Contents/MacOS/gmsh -3 test.geo -format mesh' [Gmsh 4.5.4, 1 node, max. 1 thread]
Info    : Started on Fri Jun  5 21:38:59 2020
Info    : Reading 'test.geo'...
Error   : 'test.geo', line 3 : syntax error (�)
Error   : 'test.geo', line 3 : syntax error (�)
Error   : 'test.geo', line 3 : syntax error ())
[...]

Try this i think it will work. you’ll normaly get that mesh below


‘’’
r=0.5;
h=0.05;

SetFactory(‘OpenCASCADE’);
Box(1) = {-1.0,-1.0,-1.0, 2, 2, 2};
Sphere(2) = {1,1,1, 0.5};
BooleanIntersection{ Volume{1}; }{Volume{2}; Delete;}
Sphere(3) = {-1,-1,-1, r};
BooleanIntersection{ Volume{1}; }{Volume{3}; Delete;}
Sphere(4) = {-1,-1,1, r};
BooleanIntersection{ Volume{1}; }{Volume{4}; Delete;}
Sphere(5) = {-1,1,-1, r};
BooleanIntersection{ Volume{1}; }{Volume{5}; Delete;}
Sphere(6) = {-1,1,1, r};
BooleanIntersection{ Volume{1}; }{Volume{6}; Delete;}
Sphere(7) = {1,1,-1, r};
BooleanIntersection{ Volume{1}; }{Volume{7}; Delete;}
Sphere(8) = {1,-1,1, r};
BooleanIntersection{ Volume{1}; }{Volume{8}; Delete;}
Sphere(9) = {1,-1,-1, r};
BooleanIntersection{ Volume{1}; }{Volume{9}; Delete;}
Sphere(10) = {0,0,0, r};

BooleanFragments{ Volume{1,2,3,4,5,6,7,8,9,10}; Delete; }{}

boundS45[] = Boundary{Surface {45};};
boundS40[] = Boundary{Surface {40};};
boundS44[] = Boundary{Surface {44};};
boundS42[] = Boundary{Surface {42};};
boundS43[] = Boundary{Surface {43};};
boundS41[] = Boundary{Surface {41};};

boundS35[] = Boundary{Surface {35};};
boundS27[] = Boundary{Surface {27};};
boundS25[] = Boundary{Surface {25};};
boundS16[] = Boundary{Surface {16};};
boundS8[] = Boundary{Surface {8};};
boundS17[] = Boundary{Surface {17};};
boundS14[] = Boundary{Surface {14};};
boundS24[] = Boundary{Surface {24};};
boundS22[] = Boundary{Surface {22};};
boundS33[] = Boundary{Surface {33};};
boundS36[] = Boundary{Surface {36};};
boundS7[] = Boundary{Surface {7};};
boundS28[] = Boundary{Surface {28};};
boundS19[] = Boundary{Surface {19};};
boundS29[] = Boundary{Surface {29};};
boundS23[] = Boundary{Surface {23};};
boundS9[] = Boundary{Surface {9};};
boundS11[] = Boundary{Surface {11};};
boundS37[] = Boundary{Surface {37};};
boundS15[] = Boundary{Surface {15};};
boundS32[] = Boundary{Surface {32};};

Periodic Surface 45 {boundS45[]} = 40 {boundS40[]};

Periodic Surface 44 {boundS44[]} = 42 {boundS42[]};

Periodic Surface 43 {boundS43[]} = 41 {boundS41[]};

Periodic Surface 21 {boundS21[]} = 12 {boundS12[]};

Periodic Surface 27 {boundS27[]} = 35 {boundS35[]};

Periodic Surface 25 {boundS25[]} = 16 {boundS16[]};

Periodic Surface 8 {boundS8[]} = 31 {boundS31[]};

Periodic Surface 17 {boundS17[]} = 14 {boundS14[]};

Periodic Surface 24 {boundS24[]} = 22 {boundS22[]};
Periodic Surface 33 {boundS33[]} = 36 {boundS36[]};

Periodic Surface 7 {boundS7[]} = 28 {boundS28[]};

Periodic Surface 19 {boundS19[]} = 29 {boundS29[]};
Periodic Surface 23 {boundS23[]} = 9 {boundS9[]};

Periodic Surface 11 {boundS11[]} = 37 {boundS37[]};

Periodic Surface 15 {boundS15[]} = 32 {boundS32[]};

Characteristic Length{ PointsOf{ Volume{11}; } } = h;
Characteristic Length{ PointsOf{ Volume{2}; } } = h;
Characteristic Length{ PointsOf{ Volume{3}; } } = h;
Characteristic Length{ PointsOf{ Volume{4}; } } = h;
Characteristic Length{ PointsOf{ Volume{5}; } } = h;
Characteristic Length{ PointsOf{ Volume{6}; } } = h;
Characteristic Length{ PointsOf{ Volume{7}; } } = h;
Characteristic Length{ PointsOf{ Volume{8}; } } = h;
Characteristic Length{ PointsOf{ Volume{9}; } } = h;
Characteristic Length{ PointsOf{ Volume{10}; } } = h;

‘’’

Still not working… Notice how my code is typeset in my previous message, and how is yours. It’s not ‘’’, it’s ```. Also, what is boundS21 and boundS12?

r=0.5;
h=0.05;

SetFactory(‘OpenCASCADE’);
Box(1) = {-1.0,-1.0,-1.0, 2, 2, 2};
Sphere(2) = {1,1,1, 0.5};
BooleanIntersection{ Volume{1}; }{Volume{2}; Delete;}
Sphere(3) = {-1,-1,-1, r};
BooleanIntersection{ Volume{1}; }{Volume{3}; Delete;}
Sphere(4) = {-1,-1,1, r};
BooleanIntersection{ Volume{1}; }{Volume{4}; Delete;}
Sphere(5) = {-1,1,-1, r};
BooleanIntersection{ Volume{1}; }{Volume{5}; Delete;}
Sphere(6) = {-1,1,1, r};
BooleanIntersection{ Volume{1}; }{Volume{6}; Delete;}
Sphere(7) = {1,1,-1, r};
BooleanIntersection{ Volume{1}; }{Volume{7}; Delete;}
Sphere(8) = {1,-1,1, r};
BooleanIntersection{ Volume{1}; }{Volume{8}; Delete;}
Sphere(9) = {1,-1,-1, r};
BooleanIntersection{ Volume{1}; }{Volume{9}; Delete;}
Sphere(10) = {0,0,0, r};

BooleanFragments{ Volume{1,2,3,4,5,6,7,8,9,10}; Delete; }{}

boundS45[] = Boundary{Surface {45};};
boundS40[] = Boundary{Surface {40};};
boundS44[] = Boundary{Surface {44};};
boundS42[] = Boundary{Surface {42};};
boundS43[] = Boundary{Surface {43};};
boundS41[] = Boundary{Surface {41};};

boundS35[] = Boundary{Surface {35};};
boundS27[] = Boundary{Surface {27};};
boundS25[] = Boundary{Surface {25};};
boundS16[] = Boundary{Surface {16};};
boundS8[] = Boundary{Surface {8};};
boundS17[] = Boundary{Surface {17};};
boundS14[] = Boundary{Surface {14};};
boundS24[] = Boundary{Surface {24};};
boundS22[] = Boundary{Surface {22};};
boundS33[] = Boundary{Surface {33};};
boundS36[] = Boundary{Surface {36};};
boundS7[] = Boundary{Surface {7};};
boundS28[] = Boundary{Surface {28};};
boundS19[] = Boundary{Surface {19};};
boundS29[] = Boundary{Surface {29};};
boundS23[] = Boundary{Surface {23};};
boundS9[] = Boundary{Surface {9};};
boundS11[] = Boundary{Surface {11};};
boundS37[] = Boundary{Surface {37};};
boundS15[] = Boundary{Surface {15};};
boundS32[] = Boundary{Surface {32};};

Periodic Surface 45 {boundS45[]} = 40 {boundS40[]};

Periodic Surface 44 {boundS44[]} = 42 {boundS42[]};

Periodic Surface 43 {boundS43[]} = 41 {boundS41[]};

Periodic Surface 21 {boundS21[]} = 12 {boundS12[]};

Periodic Surface 27 {boundS27[]} = 35 {boundS35[]};

Periodic Surface 25 {boundS25[]} = 16 {boundS16[]};

Periodic Surface 8 {boundS8[]} = 31 {boundS31[]};

Periodic Surface 17 {boundS17[]} = 14 {boundS14[]};

Periodic Surface 24 {boundS24[]} = 22 {boundS22[]};
Periodic Surface 33 {boundS33[]} = 36 {boundS36[]};

Periodic Surface 7 {boundS7[]} = 28 {boundS28[]};

Periodic Surface 19 {boundS19[]} = 29 {boundS29[]};
Periodic Surface 23 {boundS23[]} = 9 {boundS9[]};

Periodic Surface 11 {boundS11[]} = 37 {boundS37[]};

Periodic Surface 15 {boundS15[]} = 32 {boundS32[]};

Characteristic Length{ PointsOf{ Volume{11}; } } = h;
Characteristic Length{ PointsOf{ Volume{2}; } } = h;
Characteristic Length{ PointsOf{ Volume{3}; } } = h;
Characteristic Length{ PointsOf{ Volume{4}; } } = h;
Characteristic Length{ PointsOf{ Volume{5}; } } = h;
Characteristic Length{ PointsOf{ Volume{6}; } } = h;
Characteristic Length{ PointsOf{ Volume{7}; } } = h;
Characteristic Length{ PointsOf{ Volume{8}; } } = h;
Characteristic Length{ PointsOf{ Volume{9}; } } = h;
Characteristic Length{ PointsOf{ Volume{10}; } } = h;

Bound S12 and Bound S21 are the conditions at the edges. i.e. on the sides of the cube and the quarter sphere. The number 21, for example, corresponds to the number of the surface under consideration.
Captures

You need to fix your .geo. There is no boundS21. Check how it goes from boundS19 to boundS22, and the Gmsh warning message of course.
Then, I think FreeFEM won’t complain.