diff --git a/DiffractionGratings/grating3D.pro b/DiffractionGratings/grating3D.pro index 1a40f0dc9ec5e13378530dd21ba9dfe4fe2119ad..4bd19e1d18adac76588566a938a58f621a496a42 100644 --- a/DiffractionGratings/grating3D.pro +++ b/DiffractionGratings/grating3D.pro @@ -438,9 +438,10 @@ EndFor EndFor // Mmatrix computation : Retrieve the complex vector amplitude of the plane wave corresponding to the reflected specular order - // it is phase shifted by Exp[I[]*k1z[]*(thick_L_1+thick_L_2+thick_L_3)] because we measure it on SurfIntTop - // but it is better to have it at the surface on which the scatterer is relying (so that if there is no scatterer, - // it just corresponds to the usual definition of rs/rp for a simple diopter). + // it is phase shifted by Exp[I[]*k1z[]*(thick_L_1+thick_L_2+thick_L_3)] because we measure it on SurfIntTop... + // Is it better to compute it at the surface on which the scatterer is relying? (so that if there is no scatterer, + // it just corresponds to the usual definition of rs/rp for a simple diopter). Maybe... uncomment phasor if necessary. + // For the Mmatrix, we do not care about the phase. { Name er_specular ; Value { Term{ Type Global; [ // Exp[I[]*k1z[]*(thick_L_1+thick_L_2+thick_L_3)] * Vector[$int_x_r~{ispecular}~{jspecular}, @@ -464,15 +465,16 @@ PostOperation { { Name postop_helmholtz_vector; NameOfPostProcessing postpro_helmholtz_vector ; Operation { - - Print [ uz , OnElementsOf SurfIntTop, File StrCat[myDir,"uz_ZP.pos"]]; - Print [ uz , OnElementsOf SurfIntBot, File StrCat[myDir,"uz_ZM.pos"]]; - - Print [ epsr_xx , OnElementsOf Omega, File StrCat[myDir,"epsr_xx.pos"]]; - Print [ u , OnElementsOf Omega, File StrCat[myDir,"Edif.pos"]]; - Print [ Etot , OnElementsOf Omega, File StrCat[myDir,"Etot.pos"]]; - Print [ CompZu , OnPlane { {-period_x/2,-period_y/2,hh_L_6+0.5*nm} { period_x/2,-period_y/2,hh_L_6+0.5*nm} {-period_x/2, period_y/2,hh_L_6+0.5*nm} } {npts_interpX,npts_interpY} , File StrCat[myDir,"u_cut_ZM.pos"]]; - Print [ CompZu , OnPlane { {-period_x/2,-period_y/2,hh_L_1+thick_L_1-0.5*nm} { period_x/2,-period_y/2,hh_L_1+thick_L_1-0.5*nm} {-period_x/2, period_y/2,hh_L_1+thick_L_1-0.5*nm} } {npts_interpX,npts_interpY} , File StrCat[myDir,"u_cut_ZP.pos"]]; + // // Normal component of the unknown via Trace projection on L2 / extracted via OnPlane + // Print [ uz , OnElementsOf SurfIntTop, File StrCat[myDir,"uz_ZP.pos"]]; + // Print [ uz , OnElementsOf SurfIntBot, File StrCat[myDir,"uz_ZM.pos"]]; + // Print [ CompZu , OnPlane { {-period_x/2,-period_y/2,hh_L_6+0.5*nm} { period_x/2,-period_y/2,hh_L_6+0.5*nm} {-period_x/2, period_y/2,hh_L_6+0.5*nm} } {npts_interpX,npts_interpY} , File StrCat[myDir,"u_cut_ZM.pos"]]; + // Print [ CompZu , OnPlane { {-period_x/2,-period_y/2,hh_L_1+thick_L_1-0.5*nm} { period_x/2,-period_y/2,hh_L_1+thick_L_1-0.5*nm} {-period_x/2, period_y/2,hh_L_1+thick_L_1-0.5*nm} } {npts_interpX,npts_interpY} , File StrCat[myDir,"u_cut_ZP.pos"]]; + // // Debug : print opto-geometric parameters + // Print [ epsr_xx , OnElementsOf Omega, File StrCat[myDir,"epsr_xx.pos"]]; + // // Debug : print raw u and Etot + // Print [ u , OnElementsOf Omega, File StrCat[myDir,"Edif.pos"]]; + // Print [ Etot , OnElementsOf Omega, File StrCat[myDir,"Etot.pos"]]; If (FlagOutEscaFull==1)