From 696e56686f910b63b9e2a008ce58e047cd7772e9 Mon Sep 17 00:00:00 2001
From: Guillaume Demesy <guillaume.demesy@fresnel.fr>
Date: Sat, 31 Oct 2020 22:11:15 +0100
Subject: [PATCH] clean up

---
 DiffractionGratings/grating2D_conical.pro | 19 +------------------
 DiffractionGratings/grating2D_scalar.pro  |  2 +-
 2 files changed, 2 insertions(+), 19 deletions(-)

diff --git a/DiffractionGratings/grating2D_conical.pro b/DiffractionGratings/grating2D_conical.pro
index c964296..7e9014e 100644
--- a/DiffractionGratings/grating2D_conical.pro
+++ b/DiffractionGratings/grating2D_conical.pro
@@ -15,7 +15,7 @@
 // You should have received a copy of the GNU General Public License
 // along with This program. If not, see <https://www.gnu.org/licenses/>.
 
-myDir = "res2D/";
+myDir = "res2D_conical/";
 DefineConstant[
   lambda0   = {lambda_min , Min lambda_min, Max lambda_max, Step (lambda_max-lambda_min)/(nb_lambdas-1), Name StrCat[pp2, "1wavelength [nm]"] , Loop 1, Highlight Str[colorpp2],Graph "200000200020", ServerAction "Reset GetDP/T0, GetDP/R0, GetDP/Lambda_step, GetDP/Omegaal absorption"},
   phi_deg = {  45 , Name StrCat[pp2, "3incident plane wave angle (phi) [deg]"] , Highlight Str[colorpp2], Closed close_menu},
@@ -150,7 +150,6 @@ Function{
   beta1[] = -k0*n1[]*Cos[theta0];
   gamma[] = -k0*n1[]*Sin[theta0]*Cos[phi0];
   beta2[] = -Sqrt[k0^2*epsr2[]-alpha[]^2-gamma[]^2];
-  // test[] = gamma[] ##1;
   k1[]  = Vector[alpha[], beta1[], gamma[]];
   k2[]  = Vector[alpha[], beta2[], gamma[]];
   k1r[] = Vector[alpha[],-beta1[], gamma[]];
@@ -178,23 +177,8 @@ Function{
   Erp[]     = -1/(om0*ep0*epsr1[]) * k1r[] /\ Hrs[];
   Etp[]     = -1/(om0*ep0*epsr2[]) * k2[]  /\ Hts[];
 
-
   BlochX_phase_shift[] = Exp[I[]*alpha[]*d];
 
-  // For i In {0:Nb_ordre-1}
-  //   For j In {0:Nb_ordre-1}
-  //     alpha~{i}~{j}[] = -k1x[] + 2*Pi/period_x*(i-Nmax);
-  //     beta~{i}~{j}[]  = -k1y[] + 2*Pi/period_y*(j-Nmax)/Cos[xsi] - 2*Pi/period_x*(i-Nmax)*Tan[xsi];
-  //     expialphaxy~{i}~{j}[] = Exp[I[]*(alpha~{i}~{j}[]*X[]+beta~{i}~{j}[]*Y[])];
-  //   EndFor
-  // EndFor
-  // For i In {0:Nb_ordre-1}
-  //   For j In {0:Nb_ordre-1}
-  //     gammar~{i}~{j}[] = Sqrt[k0^2*epsr1[] - alpha~{i}~{j}[]^2 - beta~{i}~{j}[]^2];
-  //     gammat~{i}~{j}[] = Sqrt[k0^2*epsr2[] - alpha~{i}~{j}[]^2 - beta~{i}~{j}[]^2];
-  //   EndFor
-  // EndFor
-
   For i In {0:2*nb_orders}
     alpha~{i}[]      = -CompX[k1[]]  + 2*Pi/d*(i-nb_orders);
     expialphax~{i}[] = Exp[I[]*alpha~{i}[]*X[]];
@@ -540,7 +524,6 @@ PostOperation {
                   "View[l].ShowScale=0; View[l].LineWidth=1.5; View[l].LineType=1;Geometry.LineWidth=0;"],
                   File StrCat[myDir,"tmp3.geo" ]] ;
       EndIf
-
     }
   }
 }
diff --git a/DiffractionGratings/grating2D_scalar.pro b/DiffractionGratings/grating2D_scalar.pro
index 8a8e62b..d3227a0 100644
--- a/DiffractionGratings/grating2D_scalar.pro
+++ b/DiffractionGratings/grating2D_scalar.pro
@@ -15,7 +15,7 @@
 // You should have received a copy of the GNU General Public License
 // along with This program. If not, see <https://www.gnu.org/licenses/>.
 
-myDir = "res2D/";
+myDir = "res2D_scalar/";
 DefineConstant[
   lambda0 = {lambda_min , Min lambda_min, Max lambda_max, Step (lambda_max-lambda_min)/(nb_lambdas-1), Name StrCat[pp2, "1wavelength [nm]"] , Loop 1, Highlight Str[colorpp2],Graph "200000200020", ServerAction "Reset GetDP/T0, GetDP/R0, GetDP/Lambda_step, GetDP/total absorption"}
 ];
-- 
GitLab