From d4765a952393782d9deaeb297620808c49dc8cd2 Mon Sep 17 00:00:00 2001
From: Guillaume Demesy <guillaume.demesy@fresnel.fr>
Date: Fri, 7 Oct 2022 15:14:17 +0200
Subject: [PATCH] run convergence test over interpolation order for now

---
 DiffractionGratings/grating3D.pro                  | 8 +++++---
 DiffractionGratings/grating3D_data_convergence.geo | 9 +++++----
 2 files changed, 10 insertions(+), 7 deletions(-)

diff --git a/DiffractionGratings/grating3D.pro b/DiffractionGratings/grating3D.pro
index 8bebf20..544bc35 100644
--- a/DiffractionGratings/grating3D.pro
+++ b/DiffractionGratings/grating3D.pro
@@ -314,9 +314,11 @@ FunctionSpace {
         { NameOfCoef un5; EntityType EdgesOf  ; NameOfConstraint BlochX; }
         { NameOfCoef un5; EntityType EdgesOf  ; NameOfConstraint BlochY; }
       EndIf
-      { NameOfCoef un3; EntityType FacetsOf ; NameOfConstraint Dirichlet; }
-      { NameOfCoef un4; EntityType FacetsOf ; NameOfConstraint Dirichlet; }
-      { NameOfCoef un5; EntityType EdgesOf  ; NameOfConstraint Dirichlet; }
+      If(oi==2)
+        { NameOfCoef un3; EntityType FacetsOf ; NameOfConstraint Dirichlet; }
+        { NameOfCoef un4; EntityType FacetsOf ; NameOfConstraint Dirichlet; }
+        { NameOfCoef un5; EntityType EdgesOf  ; NameOfConstraint Dirichlet; }
+      EndIf
     }
   }
   { Name L2_lambda; Type Form0;
diff --git a/DiffractionGratings/grating3D_data_convergence.geo b/DiffractionGratings/grating3D_data_convergence.geo
index ebe61a7..fff7de0 100644
--- a/DiffractionGratings/grating3D_data_convergence.geo
+++ b/DiffractionGratings/grating3D_data_convergence.geo
@@ -48,10 +48,11 @@ DefineConstant[
     eps_re_L_6    = {4    , Name StrCat[pp4,"/layer 6: real part of relative permittivity"]},
     eps_im_L_6    = {0    , Name StrCat[pp4,"/layer 6: imag part of relative permittivity"]},
     
-    og              = {0 , Min 0, Max 1 , Step 1, Name StrCat[pp5,"/0geometrical order [-]"] ,  Loop 1},
-    // 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 , Min 1, Max 12, Step 1, Name StrCat[pp5, "/1Number of mesh elements per wavelength [-]"], Loop 2, ServerAction "Reset lc_scat"},
+    // og              = {0 , Min 0, Max 1 , Step 1, Name StrCat[pp5,"/0geometrical order [-]"] ,  Loop 1},
+    og              = {0 , Name StrCat[pp5,"/0geometrical order [-]"]  , Choices {0="1",1="2"} },
+    // oi              = {1 , Name StrCat[pp5,"/0interpolation order [-]"], Choices {0="1",1="2"} },
+    oi              = {0 , Min 0, Max 1 , Step 1, Name StrCat[pp5,"/0interpolation order [-]"] ,  Loop 1},
+    paramaille      = {8 , Min 1, Max 15, Step 1, Name StrCat[pp5, "/1Number of mesh elements per wavelength [-]"], Loop 2, ServerAction "Reset lc_scat"},
     lc_scat         = {lambda0/(5*paramaille)   , Name StrCat[pp5,"/2metal mesh size [nm]"]},
     PML_top         = {lambda0 , Name StrCat[pp5,"/4PML top thickness [nm]"]},
     PML_bot         = {lambda0 , Name StrCat[pp5,"/5PML bot thickness [nm]"]},
-- 
GitLab