From 60be2889255a224f2a12c9eec18c582280537c61 Mon Sep 17 00:00:00 2001
From: Guillaume Demesy <guillaume.demesy@fresnel.fr>
Date: Thu, 21 Nov 2019 12:48:52 +0100
Subject: [PATCH] output H

---
 DiffractionGratings/grating3D.pro                 | 4 ++++
 DiffractionGratings/grating3D_data_2Dlamellar.geo | 3 ++-
 DiffractionGratings/grating3D_runall.sh           | 1 +
 3 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/DiffractionGratings/grating3D.pro b/DiffractionGratings/grating3D.pro
index 8ca04fb..19699c0 100644
--- a/DiffractionGratings/grating3D.pro
+++ b/DiffractionGratings/grating3D.pro
@@ -399,6 +399,10 @@ PostOperation {
         Print [ Etot , OnPlane { {-period_x/2,0,hh_L_6} {period_x/2,0,hh_L_6} {-period_x/2,0,hh_L_1+thick_L_1} } {npts_interpX,npts_interpZTot} , File StrCat[myDir,"Etot_cut_Y=0.pos"], Name "Etot_cut_Y=0"];
         Print [ Etot , OnPlane { {0,-period_y/2,hh_L_6} {0,period_y/2,hh_L_6} {0,-period_y/2,hh_L_1+thick_L_1} } {npts_interpY,npts_interpZTot} , File StrCat[myDir,"Etot_cut_X=0.pos"], Name "Etot_cut_X=0"];
       EndIf
+      If (FlagOutHtotCuts==1)
+        Print [ Htot , OnPlane { {-period_x/2,0,hh_L_6} {period_x/2,0,hh_L_6} {-period_x/2,0,hh_L_1+thick_L_1} } {npts_interpX,npts_interpZTot} , File StrCat[myDir,"Htot_cut_Y=0.pos"], Name "Htot_cut_Y=0"];
+        Print [ Htot , OnPlane { {0,-period_y/2,hh_L_6} {0,period_y/2,hh_L_6} {0,-period_y/2,hh_L_1+thick_L_1} } {npts_interpY,npts_interpZTot} , File StrCat[myDir,"Htot_cut_X=0.pos"], Name "Htot_cut_X=0"];
+      EndIf
       If (FlagOutPoyCut==1)
         Print [ Poy_tot , OnPlane { {-period_x/2,0,hh_L_6} {period_x/2,0,hh_L_6} {-period_x/2,0,hh_L_1+thick_L_1} } {npts_interpX,npts_interpZTot} , File StrCat[myDir,"Poy_tot_cut_Y=0.pos"], Name "Poy_tot_cut_Y=0"];
         Print [ Poy_tot , OnPlane { {0,-period_y/2,hh_L_6} {0,period_y/2,hh_L_6} {0,-period_y/2,hh_L_1+thick_L_1} } {npts_interpY,npts_interpZTot} , File StrCat[myDir,"Poy_tot_cut_X=0.pos"], Name "Poy_tot_cut_X=0"];
diff --git a/DiffractionGratings/grating3D_data_2Dlamellar.geo b/DiffractionGratings/grating3D_data_2Dlamellar.geo
index d43b245..bf7a3b8 100644
--- a/DiffractionGratings/grating3D_data_2Dlamellar.geo
+++ b/DiffractionGratings/grating3D_data_2Dlamellar.geo
@@ -61,10 +61,11 @@ DefineConstant[
     InterpSampling     = { 30   , Name StrCat[pp6,"/0Interpolation grid step [nm]"]},
     Flag_interp_cubic  = { 0    , Name StrCat[pp6,"/1Interpolate on cubic grid?"], Choices {0,1} },
     FlagOutEtotCuts    = { 0    , Name StrCat[pp6,"/2Output Total Electric Field cuts?"] , Choices {0,1} },
+    FlagOutHtotCuts    = { 1    , Name StrCat[pp6,"/2Output Total Magnetic Field cuts?"] , Choices {0,1} },
     FlagOutEscaCuts    = { 0    , Name StrCat[pp6,"/3Output Scattered Electric Field cuts?"] , Choices {0,1} },
     FlagOutPoyCut      = { 0    , Name StrCat[pp6,"/4Output Poynting cuts?"] , Choices {0,1} },
     FlagOutEtotFull    = { 0    , Name StrCat[pp6,"/5Total Electric Field Full Output?"] , Choices {0,1} },
-    FlagOutEscaFull    = { 1    , Name StrCat[pp6,"/6Scattered Electric Field Full Output?"] , Choices {0,1} },
+    FlagOutEscaFull    = { 0    , Name StrCat[pp6,"/6Scattered Electric Field Full Output?"] , Choices {0,1} },
     FlagOutPoyFull     = { 0    , Name StrCat[pp6,"/7Poynting Full Output?"] , Choices {0,1} }
 ];
 
diff --git a/DiffractionGratings/grating3D_runall.sh b/DiffractionGratings/grating3D_runall.sh
index e69de29..8b91278 100644
--- a/DiffractionGratings/grating3D_runall.sh
+++ b/DiffractionGratings/grating3D_runall.sh
@@ -0,0 +1 @@
+for test
\ No newline at end of file
-- 
GitLab