Problem with periodic bc

hi,
when i run this script :
load “msh3”
load “medit”
load “UMFPACK64”
load “iovtk”
load"gmsh"
lockOrientation = false;
// Global parameters
//verbosity = 0;
real cpu=clock();
int N=1;
mesh3 Th=gmshload3(“CC_simple_geo.msh”);
mesh3 Th2=gmshload3(“CC_simple_geo_2.msh”);
mesh3 Th3 = Th + Th2;
mesh3 Th4 = gmshload3(“Thassembly.msh”);
lockOrientation = true;
fespace Ph(Th, P2);
fespace Ph2(Th2, P2);
Ph condair = 0.024;
Ph2 condpu = 0.29;
fespace Ph3(Th3, P2);
Ph3 cond= condair+condpu;

mesh3 renumbered = Th4;
fespace Vh(renumbered, P2,periodic=[[36,y,x],[35,y,x],[49,y,x],[61,y,x],[46,y,x],[64,y,x],[43,y,x],[58,y,x],[55,y,x],[52,y,x],[44,y,z],[39,y,z],[42,y,z],[38,y,z],[48,y,z],[51,y,z],[63,y,z],[56,y,z],[60,y,z],[54,y,z]]);
Vh u = x + y + z, wh1,wh2,wh3,vh,coeffh;

i receive this error :


is there any solution please ?

Please, send the mesh file to see where is the problème.

CC_simple_geo_2.mesh (146.0 KB) test6.edp (1.1 KB) test6.log (2.4 KB) Th.mesh (184.5 KB)

the problem is specially in surfaces 4 and 6 and also with surfaces 5 and 3.
thank you.

I sorry put your code is wrong
I do the following check:

  1. the normal direction in you periodic B.C are wrong

the face with label 3?5 are // to plane 0,x,z so the periodic condition is [3,x,z],[5,x,z]

the mesh of surface 3 et 5 are not just a translation same for 4,6 surface,

So it is impossible to periodic B.C on this mesh.
Please before to ask something do verification…

my freefem script to do verification:
test6-FH.edp (2.2 KB)

An idea is to build all you surface mesh with you cad tool and do the assembly with freefem++.
I know is a little tricky but it works.