## Setting a periodic mesh for a periodic miscrostructure

Hi ! I'm trying to mesh a periodic composite microstructure with ellispoidal inclusions. I identify two phases (the matrix and the fibers) and 6 boundary surfaces in physical groups (xm_boundary, ..., zp_boundary, see the files attached). I would like to generate a periodic mesh, choosing xm_boudary, ym_boudary and zm_boundary as master surfaces and xp_boudary, yp_boudary and zp_boundary respectively slave surfaces.

My Python code, which is supposed to do what I described, is as follows :

```
xm = gmsh.model.getEntitiesForPhysicalGroup(2, physical_xm_boundary)
xp = gmsh.model.getEntitiesForPhysicalGroup(2, physical_xp_boundary)
ym = gmsh.model.getEntitiesForPhysicalGroup(2, physical_ym_boundary)
yp = gmsh.model.getEntitiesForPhysicalGroup(2, physical_yp_boundary)
zm = gmsh.model.getEntitiesForPhysicalGroup(2, physical_zm_boundary)
zp = gmsh.model.getEntitiesForPhysicalGroup(2, physical_zp_boundary)
gmsh.model.mesh.setPeriodic(2, xp, xm, [1,0,0,1, 0,1,0,0, 0,0,1,0, 0,0,0,1])
gmsh.model.mesh.setPeriodic(2, yp, ym, [1,0,0,0, 0,1,0,1, 0,0,1,0, 0,0,0,1])
gmsh.model.mesh.setPeriodic(2, zp, zm, [1,0,0,0, 0,1,0,0, 0,0,1,1, 0,0,0,1])
```

Is there someting wrong in the way I use the `setPeriodic`

function ?

When I execute my code, I've got the following logfile (concerning the periodicity) : periodicity_log. I'm having trouble understanding what the error messages mean, and I don't know if the periodicity is finally correctly applied. And the final log is the following (after I tried to generate a mesh) : mesh_log.

The processed mesh looks like this :

Do you have any idea what I'm doing wrong ? Thanks!