diff --git a/DiffractionGratings/grating3D.pro b/DiffractionGratings/grating3D.pro
index 7908e3c0ce49031e2e2ffa649999f1fe070a7253..96dbaf266bdd373ccd67673abeb9406d8df01e64 100644
--- a/DiffractionGratings/grating3D.pro
+++ b/DiffractionGratings/grating3D.pro
@@ -447,6 +447,6 @@ PostOperation {
 
 DefineConstant[
   R_ = {"helmholtz_vector", Name "GetDP/1ResolutionChoices", Visible 1},
-  C_ = {"-solve -pos -petsc_prealloc 200 -ksp_type preonly -pc_type lu -pc_factor_mat_solver_type mumps", Name "GetDP/9ComputeCommand", Visible 1},
+  C_ = {"-solve -pos -petsc_prealloc 500 -ksp_type preonly -pc_type lu -pc_factor_mat_solver_type mumps", Name "GetDP/9ComputeCommand", Visible 1},
   P_ = {"postop_helmholtz_vector", Name "GetDP/2PostOperationChoices", Visible 1}
 ];
diff --git a/DiffractionGratings/grating3D_data_2Dlamellar.geo b/DiffractionGratings/grating3D_data_2Dlamellar.geo
index e62f0049d7bf302f62606e7b7badeac9ed2b9dba..ebdb8a8b15b253fb9fe544fd9b71cf5a766add5d 100644
--- a/DiffractionGratings/grating3D_data_2Dlamellar.geo
+++ b/DiffractionGratings/grating3D_data_2Dlamellar.geo
@@ -16,7 +16,7 @@ DefineConstant[
     thick_L_2     = {200    , Name StrCat[pp2,"/4thickness layer 2 [nm]"]},
     thick_L_3     = {1050   , Name StrCat[pp2,"/5thickness layer 3 [nm]"]},
     thick_L_4     = {20     , Name StrCat[pp2,"/6thickness layer 4 [nm]"]},
-    thick_L_5     = {20     , Name StrCat[pp2,"/7thickness layer 5 [nm]"]},
+    thick_L_5     = {300     , Name StrCat[pp2,"/7thickness layer 5 [nm]"]},
     thick_L_6     = {50    , Name StrCat[pp2,"/8thickness layer 6 [nm] (substrate)"]},
 
     tag_geom      = {  7      , Name StrCat[pp3,"/0Shape"], Choices {1="Pyramid",2="Cylindrical Hole",3="Torus",4="HalfEllipspoid",5="Checkerboard",6="bi-sinusoidal",7="2D lamellar"}},
@@ -49,16 +49,16 @@ DefineConstant[
     og            = {0          , Name StrCat[pp5,"/0geometrical order [-]"]  , Choices {0="1",1="2"} },
     oi            = {1          , Name StrCat[pp5,"/0interpolation order [-]"], Choices {0="1",1="2"} },
     paramaille    = {20         , Name StrCat[pp5,"/1Number of mesh elements per wavelength [-]"]},
-    lc_scat       = {15         , Name StrCat[pp5,"/2Scatterer absolute mesh size [nm]"]},
+    lc_scat       = {20         , Name StrCat[pp5,"/2Scatterer absolute mesh size [nm]"]},
     PML_top       = {lambda0*1  , Name StrCat[pp5,"/4PML top thickness [nm]"]},
     PML_bot       = {lambda0/5  , Name StrCat[pp5,"/5PML bot thickness [nm]"]},
     Nmax          = {1          , Name StrCat[pp5,"/6Number of non specular order to output [-]"]},
     refine_mesh_L_1= {1         , Name StrCat[pp5,"/7refine layers/1refine mesh layer 1 [-]"]},
     refine_mesh_L_2= {1         , Name StrCat[pp5,"/7refine layers/2refine mesh layer 2 [-]"]},
     refine_mesh_L_3= {1         , Name StrCat[pp5,"/7refine layers/3refine mesh layer 3 [-]"]},
-    refine_mesh_L_4= {0.3       , Name StrCat[pp5,"/7refine layers/4refine mesh layer 4 [-]"]},
-    refine_mesh_L_5= {0.3       , Name StrCat[pp5,"/7refine layers/5refine mesh layer 5 [-]"]},
-    refine_mesh_L_6= {0.3       , Name StrCat[pp5,"/7refine layers/6refine mesh layer 6 [-]"]},
+    refine_mesh_L_4= {0.2       , Name StrCat[pp5,"/7refine layers/4refine mesh layer 4 [-]"]},
+    refine_mesh_L_5= {0.1       , Name StrCat[pp5,"/7refine layers/5refine mesh layer 5 [-]"]},
+    refine_mesh_L_6= {0.1       , Name StrCat[pp5,"/7refine layers/6refine mesh layer 6 [-]"]},
     
     InterpSampling     = { 30   , Name StrCat[pp6,"/0Interpolation grid step [nm]"]},
     Flag_interp_cubic  = { 0    , Name StrCat[pp6,"/1Interpolate on cubic grid?"], Choices {0,1} },
diff --git a/DiffractionGratings/grating3D_data_bisin.geo b/DiffractionGratings/grating3D_data_bisin.geo
index 7e966a475faab36944228b7a42932cffb5919791..d3566731a2ac6115349ed8d989e9c9e601fd4762 100644
--- a/DiffractionGratings/grating3D_data_bisin.geo
+++ b/DiffractionGratings/grating3D_data_bisin.geo
@@ -14,7 +14,7 @@ DefineConstant[
     period_y      = {1000  , Name StrCat[pp2,"/2Y period [nm]"]},
     thick_L_1     = {100   , Name StrCat[pp2,"/3thickness layer 1 [nm] (superstrate)"]},
     thick_L_2     = {100   , Name StrCat[pp2,"/4thickness layer 2 [nm]"]},
-    thick_L_3     = {500, Name StrCat[pp2,"/5thickness layer 3 [nm]"]},
+    thick_L_3     = {400, Name StrCat[pp2,"/5thickness layer 3 [nm]"]},
     thick_L_4     = {100   , Name StrCat[pp2,"/6thickness layer 4 [nm]"]},
     thick_L_5     = {100   , Name StrCat[pp2,"/7thickness layer 5 [nm]"]},
     thick_L_6     = {200   , Name StrCat[pp2,"/8thickness layer 6 [nm] (substrate)"]},
@@ -48,10 +48,10 @@ DefineConstant[
     
     og            = {0          , Name StrCat[pp5,"/0geometrical order [-]"]  , Choices {0="1",1="2"} },
     oi            = {1          , Name StrCat[pp5,"/0interpolation order [-]"], Choices {0="1",1="2"} },
-    paramaille    = {8     , Name StrCat[pp5,"/1Number of mesh elements per wavelength [-]"]},
+    paramaille    = {9     , Name StrCat[pp5,"/1Number of mesh elements per wavelength [-]"]},
     lc_scat       = {lambda0/(2*paramaille)    , Name StrCat[pp5,"/2Scatterer absolute mesh size [nm]"]},
-    PML_top       = {lambda0*1.2, Name StrCat[pp5,"/4PML top thickness [nm]"]},
-    PML_bot       = {lambda0*1.2, Name StrCat[pp5,"/5PML bot thickness [nm]"]},
+    PML_top       = {lambda0, Name StrCat[pp5,"/4PML top thickness [nm]"]},
+    PML_bot       = {lambda0, Name StrCat[pp5,"/5PML bot thickness [nm]"]},
     Nmax          = {2      , Name StrCat[pp5,"/6Number of non specular order to output [-]"]},
     refine_mesh_L_1= {1      , Name StrCat[pp5,"/7refine layers/1refine mesh layer 1 [-]"]},
     refine_mesh_L_2= {1      , Name StrCat[pp5,"/7refine layers/2refine mesh layer 2 [-]"]},
diff --git a/DiffractionGratings/grating3D_data_hole.geo b/DiffractionGratings/grating3D_data_hole.geo
index c51348bf73b7e806f12538b74242addeedab9f1a..9285664f7546d55988d46c5e84f8b79e8b0604ac 100644
--- a/DiffractionGratings/grating3D_data_hole.geo
+++ b/DiffractionGratings/grating3D_data_hole.geo
@@ -10,8 +10,8 @@ DefineConstant[
     thetadeg      = {0     , Name StrCat[pp1,"/2theta0 [deg]"]},
     phideg        = {0     , Name StrCat[pp1,"/3phi0 [deg]"]},
     psideg        = {45    , Name StrCat[pp1,"/4psi0 [deg]"]},
-    period_x      = {1000.001 , Name StrCat[pp2,"/1X period [nm]"]},
-    period_y      = {1000.001 , Name StrCat[pp2,"/2Y period [nm]"]},
+    period_x      = {999 , Name StrCat[pp2,"/1X period [nm]"]},
+    period_y      = {999 , Name StrCat[pp2,"/2Y period [nm]"]},
     thick_L_1     = {100   , Name StrCat[pp2,"/3thickness layer 1 [nm] (superstrate)"]},
     thick_L_2     = {50   , Name StrCat[pp2,"/4thickness layer 2 [nm]"]},
     thick_L_3     = {50    , Name StrCat[pp2,"/5thickness layer 3 [nm]"]},
@@ -49,13 +49,13 @@ DefineConstant[
     og            = {0          , Name StrCat[pp5,"/0geometrical order [-]"]  , Choices {0="1",1="2"} },
     oi            = {1          , Name StrCat[pp5,"/0interpolation order [-]"], Choices {0="1",1="2"} },
     paramaille    = {4.5     , Name StrCat[pp5,"/1Number of mesh elements per wavelength [-]"]},
-    lc_scat       = {lambda0/(5*paramaille)    , Name StrCat[pp5,"/2Scatterer absolute mesh size [nm]"]},
+    lc_scat       = {lambda0/(6*paramaille)    , Name StrCat[pp5,"/2Scatterer absolute mesh size [nm]"]},
     PML_top       = {lambda0, Name StrCat[pp5,"/4PML top thickness [nm]"]},
     PML_bot       = {lambda0, Name StrCat[pp5,"/5PML bot thickness [nm]"]},
     Nmax          = {2      , Name StrCat[pp5,"/6Number of non specular order to output [-]"]},
     refine_mesh_L_1= {1      , Name StrCat[pp5,"/7refine layers/1refine mesh layer 1 [-]"]},
     refine_mesh_L_2= {1      , Name StrCat[pp5,"/7refine layers/2refine mesh layer 2 [-]"]},
-    refine_mesh_L_3= {5      , Name StrCat[pp5,"/7refine layers/3refine mesh layer 3 [-]"]},
+    refine_mesh_L_3= {7      , Name StrCat[pp5,"/7refine layers/3refine mesh layer 3 [-]"]},
     refine_mesh_L_4= {1      , Name StrCat[pp5,"/7refine layers/4refine mesh layer 4 [-]"]},
     refine_mesh_L_5= {1      , Name StrCat[pp5,"/7refine layers/5refine mesh layer 5 [-]"]},
     refine_mesh_L_6= {1      , Name StrCat[pp5,"/7refine layers/6refine mesh layer 6 [-]"]},