Skip to content
Snippets Groups Projects
Commit 99a966f5 authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

use ValueOnly in OnPoint PostOperation when sending the value to the GUI with SendToServer

parent 7d4d9bb8
No related branches found
No related tags found
No related merge requests found
// Copyright (C) 2020 Guillaume Demésy // Copyright (C) 2020 Guillaume Demésy
// //
// This file is part of the model grating2D.pro. // This file is part of the model grating2D.pro.
// //
// This program is free software: you can redistribute it and/or modify // This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by // it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or // the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version. // (at your option) any later version.
// //
// This program is distributed in the hope that it will be useful, // This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of // but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details. // GNU General Public License for more details.
// //
// You should have received a copy of the GNU General Public License // You should have received a copy of the GNU General Public License
// along with This program. If not, see <https://www.gnu.org/licenses/>. // along with This program. If not, see <https://www.gnu.org/licenses/>.
...@@ -59,7 +59,7 @@ Group { ...@@ -59,7 +59,7 @@ Group {
Plot_bnd = Region[SURF_PLOT]; Plot_bnd = Region[SURF_PLOT];
Print_point = Region[PRINT_POINT]; Print_point = Region[PRINT_POINT];
Omega_DefTr = Region[{SUB,SUP}]; Omega_DefTr = Region[{SUB,SUP}];
Gama = Region[{SurfCutSubs1,SurfCutSuper1}]; Gama = Region[{SurfCutSubs1,SurfCutSuper1}];
Tr = ElementsOf[Omega_DefTr, ConnectedTo Gama]; Tr = ElementsOf[Omega_DefTr, ConnectedTo Gama];
} }
...@@ -130,7 +130,7 @@ Function{ ...@@ -130,7 +130,7 @@ Function{
epsr_layer_cov_im[] = epsr_im_dom_5[]; epsr_layer_cov_im[] = epsr_im_dom_5[];
epsr1_re[] = epsr_re_dom_6[]; epsr1_re[] = epsr_re_dom_6[];
epsr1_im[] = epsr_im_dom_6[]; epsr1_im[] = epsr_im_dom_6[];
om0 = 2.*Pi*cel/lambda0; om0 = 2.*Pi*cel/lambda0;
k0 = 2.*Pi/lambda0; k0 = 2.*Pi/lambda0;
epsr1[] = Complex[epsr1_re[],epsr1_im[]]; epsr1[] = Complex[epsr1_re[],epsr1_im[]];
...@@ -191,7 +191,7 @@ Function{ ...@@ -191,7 +191,7 @@ Function{
a_pml = 1.; a_pml = 1.;
b_pml = 1.; b_pml = 1.;
sx = 1.; sx = 1.;
sy[] = Complex[a_pml,b_pml]; sy[] = Complex[a_pml,b_pml];
sz = 1.; sz = 1.;
PML_Tensor[] = TensorDiag[sz*sy[]/sx,sx*sz/sy[],sx*sy[]/sz]; PML_Tensor[] = TensorDiag[sz*sy[]/sx,sx*sz/sy[],sx*sy[]/sz];
...@@ -215,8 +215,8 @@ Function{ ...@@ -215,8 +215,8 @@ Function{
EndIf EndIf
epsilonr[layer_cov] = Complex[epsr_layer_cov_re[],epsr_layer_cov_im[]] * TensorDiag[1,1,1]; epsilonr[layer_cov] = Complex[epsr_layer_cov_re[],epsr_layer_cov_im[]] * TensorDiag[1,1,1];
epsilonr[pmltop] = epsr1_re[]*PML_Tensor[]; epsilonr[pmltop] = epsr1_re[]*PML_Tensor[];
epsilonr[pmlbot] = epsr2_re[]*PML_Tensor[]; epsilonr[pmlbot] = epsr2_re[]*PML_Tensor[];
epsilonr_annex[sub] = epsr2[] * TensorDiag[1,1,1]; epsilonr_annex[sub] = epsr2[] * TensorDiag[1,1,1];
epsilonr_annex[sup] = epsr1[] * TensorDiag[1,1,1]; epsilonr_annex[sup] = epsr1[] * TensorDiag[1,1,1];
epsilonr_annex[layer_dep] = epsr1[] * TensorDiag[1,1,1]; epsilonr_annex[layer_dep] = epsr1[] * TensorDiag[1,1,1];
...@@ -242,11 +242,11 @@ Function{ ...@@ -242,11 +242,11 @@ Function{
Hr[] = 1/(om0*mu0*mur[]) * k1r[] /\ Er[]; Hr[] = 1/(om0*mu0*mur[]) * k1r[] /\ Er[];
Ht[] = 1/(om0*mu0*mur[]) * k2[] /\ Et[]; Ht[] = 1/(om0*mu0*mur[]) * k2[] /\ Et[];
E1[pmltop] = Ei[]+Er[]; E1[pmltop] = Ei[]+Er[];
E1[Omega_top] = Ei[]+Er[]; E1[Omega_top] = Ei[]+Er[];
E1[Omega_bot] = Et[]; E1[Omega_bot] = Et[];
E1[pmlbot] = Et[]; E1[pmlbot] = Et[];
E1d[pmltop] = Er[]; E1d[pmltop] = Er[];
E1d[Omega_top] = Er[]; E1d[Omega_top] = Er[];
E1d[Omega_bot] = Et[]; E1d[Omega_bot] = Et[];
...@@ -278,7 +278,7 @@ Constraint { ...@@ -278,7 +278,7 @@ Constraint {
Jacobian { Jacobian {
{ Name JVol ; { Name JVol ;
Case { Case {
{ Region All ; Jacobian Vol ; } { Region All ; Jacobian Vol ; }
} }
} }
...@@ -292,9 +292,9 @@ Jacobian { ...@@ -292,9 +292,9 @@ Jacobian {
Integration { Integration {
If (Flag_o2_geom==0) If (Flag_o2_geom==0)
{ Name Int_1 ; { Name Int_1 ;
Case { Case {
{ Type Gauss ; { Type Gauss ;
Case { Case {
{ GeoElement Point ; NumberOfPoints 1 ; } { GeoElement Point ; NumberOfPoints 1 ; }
{ GeoElement Line ; NumberOfPoints 4 ; } { GeoElement Line ; NumberOfPoints 4 ; }
{ GeoElement Triangle ; NumberOfPoints 12 ; } { GeoElement Triangle ; NumberOfPoints 12 ; }
...@@ -305,9 +305,9 @@ Integration { ...@@ -305,9 +305,9 @@ Integration {
EndIf EndIf
If (Flag_o2_geom==1) If (Flag_o2_geom==1)
{ Name Int_1 ; { Name Int_1 ;
Case { Case {
{ Type Gauss ; { Type Gauss ;
Case { Case {
{ GeoElement Point ; NumberOfPoints 1 ; } { GeoElement Point ; NumberOfPoints 1 ; }
{ GeoElement Line2 ; NumberOfPoints 4 ; } { GeoElement Line2 ; NumberOfPoints 4 ; }
{ GeoElement Triangle2 ; NumberOfPoints 12 ; } { GeoElement Triangle2 ; NumberOfPoints 12 ; }
...@@ -386,7 +386,7 @@ Formulation { ...@@ -386,7 +386,7 @@ Formulation {
Galerkin {[-Complex[0,gamma[]] /mur[] * Dof{d El} , EZ[]*^{Et} ] ; In Omega; Integration Int_1; Jacobian JVol; } Galerkin {[-Complex[0,gamma[]] /mur[] * Dof{d El} , EZ[]*^{Et} ] ; In Omega; Integration Int_1; Jacobian JVol; }
Galerkin {[ Complex[0,gamma[]] /mur[] * (EZ[]*^Dof{Et}) , {d El} ] ; In Omega; Integration Int_1; Jacobian JVol; } Galerkin {[ Complex[0,gamma[]] /mur[] * (EZ[]*^Dof{Et}) , {d El} ] ; In Omega; Integration Int_1; Jacobian JVol; }
Galerkin {[ gamma[]^2 /mur[] * (EZ[]*^Dof{Et}) , EZ[]*^{Et} ] ; In Omega; Integration Int_1; Jacobian JVol; } Galerkin {[ gamma[]^2 /mur[] * (EZ[]*^Dof{Et}) , EZ[]*^{Et} ] ; In Omega; Integration Int_1; Jacobian JVol; }
Galerkin {[ -k0^2 * epsilonr[] * Dof{Et} , {Et} ] ; In Omega; Integration Int_1; Jacobian JVol; } Galerkin {[ -k0^2 * epsilonr[] * Dof{Et} , {Et} ] ; In Omega; Integration Int_1; Jacobian JVol; }
Galerkin {[ -k0^2 * epsilonr[] * Dof{El} , {El} ] ; In Omega; Integration Int_1; Jacobian JVol; } Galerkin {[ -k0^2 * epsilonr[] * Dof{El} , {El} ] ; In Omega; Integration Int_1; Jacobian JVol; }
...@@ -459,7 +459,7 @@ PostProcessing { ...@@ -459,7 +459,7 @@ PostProcessing {
{ Name eff_r~{i} ; Value { Term{Type Global; [ { Name eff_r~{i} ; Value { Term{Type Global; [
beta_super~{i}[]/(Ae^2*-beta1[]) * ( SquNorm[$int_x_r~{i}]+ beta_super~{i}[]/(Ae^2*-beta1[]) * ( SquNorm[$int_x_r~{i}]+
SquNorm[$int_y_r~{i}]+ SquNorm[$int_y_r~{i}]+
SquNorm[$int_z_r~{i}] ) ] ; In SurfCutSuper1 ; } } } SquNorm[$int_z_r~{i}] ) ] ; In SurfCutSuper1 ; } } }
// // BUGGY // // BUGGY
// { Name eff_t~{i} ; Value{ Term{Type Global; [ // { Name eff_t~{i} ; Value{ Term{Type Global; [
// 1/(Ae^2*beta_subs~{i}[]*-beta1[]) * ((beta_subs~{i}[]^2+gamma[]^2 )*SquNorm[$int_z_t~{i}]+ // 1/(Ae^2*beta_subs~{i}[]*-beta1[]) * ((beta_subs~{i}[]^2+gamma[]^2 )*SquNorm[$int_z_t~{i}]+
...@@ -477,7 +477,7 @@ PostProcessing { ...@@ -477,7 +477,7 @@ PostProcessing {
PostOperation { PostOperation {
{ Name postop_energy; NameOfPostProcessing postpro_energy ; { Name postop_energy; NameOfPostProcessing postpro_energy ;
Operation { Operation {
Print[ lambda_step, OnPoint{0,0,0}, Format Table, File > StrCat[myDir, "temp_lambda_step.txt"], SendToServer "GetDP/Lambda_step" ] ; Print[ lambda_step, OnPoint{0,0,0}, Format ValueOnly, File > StrCat[myDir, "temp_lambda_step.txt"], SendToServer "GetDP/Lambda_step" ] ;
Print [ Etot , OnElementsOf Omega, File "Etot.pos" ]; Print [ Etot , OnElementsOf Omega, File "Etot.pos" ];
Print [ Etot , OnPlane { {-d/2,-h_sub,0} {d/2,-h_sub,0} {-d/2,h_layer_dep+dy*N_rods+h_layer_cov+h_sup,0} } {25,50} , File StrCat[myDir,"Etot_grid.pos"]]; Print [ Etot , OnPlane { {-d/2,-h_sub,0} {d/2,-h_sub,0} {-d/2,h_layer_dep+dy*N_rods+h_layer_cov+h_sup,0} } {25,50} , File StrCat[myDir,"Etot_grid.pos"]];
For i In {0:2*nb_orders} For i In {0:2*nb_orders}
......
// Copyright (C) 2020 Guillaume Demésy // Copyright (C) 2020 Guillaume Demésy
// //
// This file is part of the model grating2D.pro. // This file is part of the model grating2D.pro.
// //
// This program is free software: you can redistribute it and/or modify // This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by // it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or // the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version. // (at your option) any later version.
// //
// This program is distributed in the hope that it will be useful, // This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of // but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details. // GNU General Public License for more details.
// //
// You should have received a copy of the GNU General Public License // You should have received a copy of the GNU General Public License
// along with This program. If not, see <https://www.gnu.org/licenses/>. // along with This program. If not, see <https://www.gnu.org/licenses/>.
...@@ -122,7 +122,7 @@ Function{ ...@@ -122,7 +122,7 @@ Function{
epsr_layer_cov_im[] = epsr_im_dom_5[]; epsr_layer_cov_im[] = epsr_im_dom_5[];
epsr1_re[] = epsr_re_dom_6[]; epsr1_re[] = epsr_re_dom_6[];
epsr1_im[] = epsr_im_dom_6[]; epsr1_im[] = epsr_im_dom_6[];
om0 = 2.*Pi*cel/lambda0; om0 = 2.*Pi*cel/lambda0;
k0 = 2.*Pi/lambda0; k0 = 2.*Pi/lambda0;
epsr1[] = Complex[epsr1_re[],epsr1_im[]]; epsr1[] = Complex[epsr1_re[],epsr1_im[]];
...@@ -134,7 +134,7 @@ Function{ ...@@ -134,7 +134,7 @@ Function{
alpha[] = k0*n1[]*Sin[theta_deg*deg2rad]; alpha[] = k0*n1[]*Sin[theta_deg*deg2rad];
beta1[] = -k0*n1[]*Cos[theta_deg*deg2rad]; beta1[] = -k0*n1[]*Cos[theta_deg*deg2rad];
beta2[] = -Sqrt[k0^2*epsr2[]-alpha[]^2]; beta2[] = -Sqrt[k0^2*epsr2[]-alpha[]^2];
k1[] = Vector[alpha[], beta1[],0]; k1[] = Vector[alpha[], beta1[],0];
k1r[]= Vector[alpha[],-beta1[],0]; k1r[]= Vector[alpha[],-beta1[],0];
k2[] = Vector[alpha[], beta2[],0]; k2[] = Vector[alpha[], beta2[],0];
...@@ -147,7 +147,7 @@ Function{ ...@@ -147,7 +147,7 @@ Function{
If (flag_polar==0) If (flag_polar==0)
r[] = (CompY[k1[]]-CompY[k2[]])/(CompY[k1[]]+CompY[k2[]]); r[] = (CompY[k1[]]-CompY[k2[]])/(CompY[k1[]]+CompY[k2[]]);
t[] = 2.*CompY[k1[]] /(CompY[k1[]]+CompY[k2[]]); t[] = 2.*CompY[k1[]] /(CompY[k1[]]+CompY[k2[]]);
Pinc[] = 0.5*A^2*Sqrt[ep0*epsr1_re[]/mu0] * Cos[theta_deg*deg2rad]; Pinc[] = 0.5*A^2*Sqrt[ep0*epsr1_re[]/mu0] * Cos[theta_deg*deg2rad];
EndIf EndIf
BlochX_phase_shift[] = Exp[I[]*alpha[]*d]; BlochX_phase_shift[] = Exp[I[]*alpha[]*d];
...@@ -158,11 +158,11 @@ Function{ ...@@ -158,11 +158,11 @@ Function{
beta_super~{i}[] = -Sqrt[k0^2*epsr1[]-alpha~{i}[]^2]; beta_super~{i}[] = -Sqrt[k0^2*epsr1[]-alpha~{i}[]^2];
beta_subs~{i}[] = -Sqrt[k0^2*epsr2[]-alpha~{i}[]^2]; beta_subs~{i}[] = -Sqrt[k0^2*epsr2[]-alpha~{i}[]^2];
EndFor EndFor
a_pml = 1.; a_pml = 1.;
b_pml = 1.; b_pml = 1.;
sx = 1.; sx = 1.;
sy[] = Complex[a_pml,b_pml]; sy[] = Complex[a_pml,b_pml];
sz = 1.; sz = 1.;
PML_Tensor[] = TensorDiag[sz*sy[]/sx,sx*sz/sy[],sx*sy[]/sz]; PML_Tensor[] = TensorDiag[sz*sy[]/sx,sx*sz/sy[],sx*sy[]/sz];
...@@ -186,8 +186,8 @@ Function{ ...@@ -186,8 +186,8 @@ Function{
EndIf EndIf
epsilonr[layer_cov] = Complex[epsr_layer_cov_re[],epsr_layer_cov_im[]] * TensorDiag[1,1,1]; epsilonr[layer_cov] = Complex[epsr_layer_cov_re[],epsr_layer_cov_im[]] * TensorDiag[1,1,1];
epsilonr[pmltop] = epsr1_re[]*PML_Tensor[]; epsilonr[pmltop] = epsr1_re[]*PML_Tensor[];
epsilonr[pmlbot] = epsr2_re[]*PML_Tensor[]; epsilonr[pmlbot] = epsr2_re[]*PML_Tensor[];
epsilonr_annex[sub] = epsr2[] * TensorDiag[1,1,1]; epsilonr_annex[sub] = epsr2[] * TensorDiag[1,1,1];
epsilonr_annex[sup] = epsr1[] * TensorDiag[1,1,1]; epsilonr_annex[sup] = epsr1[] * TensorDiag[1,1,1];
epsilonr_annex[layer_dep] = epsr1[] * TensorDiag[1,1,1]; epsilonr_annex[layer_dep] = epsr1[] * TensorDiag[1,1,1];
...@@ -214,7 +214,7 @@ Function{ ...@@ -214,7 +214,7 @@ Function{
ui[rods] = A*Exp[I[]*k1[]*XYZ[]]; ui[rods] = A*Exp[I[]*k1[]*XYZ[]];
ui[layer_dep] = A*Exp[I[]*k1[]*XYZ[]]; ui[layer_dep] = A*Exp[I[]*k1[]*XYZ[]];
ui[sub] = 0.; ui[sub] = 0.;
ur[pmltop] = 0.; ur[pmltop] = 0.;
ur[pmlbot] = 0.; ur[pmlbot] = 0.;
ur[sup] = r[]*Exp[I[]*k1r[]*XYZ[]]; ur[sup] = r[]*Exp[I[]*k1r[]*XYZ[]];
...@@ -232,10 +232,10 @@ Function{ ...@@ -232,10 +232,10 @@ Function{
ut[rods] = 0.; ut[rods] = 0.;
ut[layer_cov] = 0.; ut[layer_cov] = 0.;
ut[sub] = t[]*Exp[I[]*k2[]*XYZ[]]; ut[sub] = t[]*Exp[I[]*k2[]*XYZ[]];
u1[] = ui[]+ur[]+ut[]; u1[] = ui[]+ur[]+ut[];
u1d[] = ur[]+ut[]; u1d[] = ur[]+ut[];
If (flag_polar==1) If (flag_polar==1)
E1i[] = -1/(om0*ep0*epsilonr_annex[]) * k1[] /\ Vector[0,0,ui[]]; E1i[] = -1/(om0*ep0*epsilonr_annex[]) * k1[] /\ Vector[0,0,ui[]];
E1r[] = -1/(om0*ep0*epsilonr_annex[]) * k1r[] /\ Vector[0,0,ur[]]; E1r[] = -1/(om0*ep0*epsilonr_annex[]) * k1r[] /\ Vector[0,0,ur[]];
...@@ -278,7 +278,7 @@ Constraint { ...@@ -278,7 +278,7 @@ Constraint {
Jacobian { Jacobian {
{ Name JVol ; { Name JVol ;
Case { Case {
{ Region All ; Jacobian Vol ; } { Region All ; Jacobian Vol ; }
} }
} }
...@@ -292,9 +292,9 @@ Jacobian { ...@@ -292,9 +292,9 @@ Jacobian {
Integration { Integration {
If (Flag_o2_geom==0) If (Flag_o2_geom==0)
{ Name Int_1 ; { Name Int_1 ;
Case { Case {
{ Type Gauss ; { Type Gauss ;
Case { Case {
{ GeoElement Point ; NumberOfPoints 1 ; } { GeoElement Point ; NumberOfPoints 1 ; }
{ GeoElement Line ; NumberOfPoints 4 ; } { GeoElement Line ; NumberOfPoints 4 ; }
{ GeoElement Triangle ; NumberOfPoints 12 ; } { GeoElement Triangle ; NumberOfPoints 12 ; }
...@@ -305,9 +305,9 @@ Integration { ...@@ -305,9 +305,9 @@ Integration {
EndIf EndIf
If (Flag_o2_geom==1) If (Flag_o2_geom==1)
{ Name Int_1 ; { Name Int_1 ;
Case { Case {
{ Type Gauss ; { Type Gauss ;
Case { Case {
{ GeoElement Point ; NumberOfPoints 1 ; } { GeoElement Point ; NumberOfPoints 1 ; }
{ GeoElement Line2 ; NumberOfPoints 4 ; } { GeoElement Line2 ; NumberOfPoints 4 ; }
{ GeoElement Triangle2 ; NumberOfPoints 12 ; } { GeoElement Triangle2 ; NumberOfPoints 12 ; }
...@@ -328,7 +328,7 @@ FunctionSpace { ...@@ -328,7 +328,7 @@ FunctionSpace {
{ Name un4; NameOfCoef un4; Function BF_Node_3E; Support Region[Omega]; Entity EdgesOf[Omega]; } { Name un4; NameOfCoef un4; Function BF_Node_3E; Support Region[Omega]; Entity EdgesOf[Omega]; }
{ Name un5; NameOfCoef un5; Function BF_Node_3F; Support Region[Omega]; Entity FacetsOf[Omega]; } { Name un5; NameOfCoef un5; Function BF_Node_3F; Support Region[Omega]; Entity FacetsOf[Omega]; }
EndIf EndIf
} }
Constraint { Constraint {
{ NameOfCoef un; EntityType NodesOf ; NameOfConstraint Bloch; } { NameOfCoef un; EntityType NodesOf ; NameOfConstraint Bloch; }
...@@ -348,7 +348,7 @@ Formulation { ...@@ -348,7 +348,7 @@ Formulation {
Galerkin { [-xsi[]*Dof{Grad u2d} , {Grad u2d}]; In Omega; Jacobian JVol; Integration Int_1; } Galerkin { [-xsi[]*Dof{Grad u2d} , {Grad u2d}]; In Omega; Jacobian JVol; Integration Int_1; }
Galerkin { [k0^2*chi[]*Dof{u2d} , {u2d}]; In Omega; Jacobian JVol; Integration Int_1; } Galerkin { [k0^2*chi[]*Dof{u2d} , {u2d}]; In Omega; Jacobian JVol; Integration Int_1; }
Galerkin { [source_xsi_i[] , {Grad u2d}]; In Omega; Jacobian JVol; Integration Int_1; } Galerkin { [source_xsi_i[] , {Grad u2d}]; In Omega; Jacobian JVol; Integration Int_1; }
Galerkin { [source_xsi_r[] , {Grad u2d}]; In Omega; Jacobian JVol; Integration Int_1; } Galerkin { [source_xsi_r[] , {Grad u2d}]; In Omega; Jacobian JVol; Integration Int_1; }
Galerkin { [source_chi_r[] , {u2d}]; In Omega; Jacobian JVol; Integration Int_1; } Galerkin { [source_chi_r[] , {u2d}]; In Omega; Jacobian JVol; Integration Int_1; }
Galerkin { [source_chi_i[] , {u2d}]; In Omega; Jacobian JVol; Integration Int_1; } Galerkin { [source_chi_i[] , {u2d}]; In Omega; Jacobian JVol; Integration Int_1; }
} }
...@@ -402,7 +402,7 @@ PostProcessing { ...@@ -402,7 +402,7 @@ PostProcessing {
{ Name Q_layer_cov ; Value { Integral { [ 0.5 * ep0*om0*Fabs[epsr_layer_cov_im[]] * ( SquNorm[CompY[{Grad u2d}]*I[]/(om0*ep0*CompXX[epsilonr[]])+Ex1[]/CompXX[epsilonr[]]*CompXX[epsilonr_annex[]]] + SquNorm[-CompX[{Grad u2d}]*I[]/(om0*ep0*CompYY[epsilonr[]])+Ey1[]/CompYY[epsilonr[]]*CompYY[epsilonr_annex[]] ] ) / (Pinc[]*d) ] ; In layer_cov ; Integration Int_1 ; Jacobian JVol ; } } } { Name Q_layer_cov ; Value { Integral { [ 0.5 * ep0*om0*Fabs[epsr_layer_cov_im[]] * ( SquNorm[CompY[{Grad u2d}]*I[]/(om0*ep0*CompXX[epsilonr[]])+Ex1[]/CompXX[epsilonr[]]*CompXX[epsilonr_annex[]]] + SquNorm[-CompX[{Grad u2d}]*I[]/(om0*ep0*CompYY[epsilonr[]])+Ey1[]/CompYY[epsilonr[]]*CompYY[epsilonr_annex[]] ] ) / (Pinc[]*d) ] ; In layer_cov ; Integration Int_1 ; Jacobian JVol ; } } }
{ Name Q_tot ; Value { Integral { [ 0.5 * ep0*om0*Fabs[Im[CompZZ[epsilonr[]]]] * ( SquNorm[CompY[{Grad u2d}]*I[]/(om0*ep0*CompXX[epsilonr[]])+Ex1[]/CompXX[epsilonr[]]*CompXX[epsilonr_annex[]]] + SquNorm[-CompX[{Grad u2d}]*I[]/(om0*ep0*CompYY[epsilonr[]])+Ey1[]/CompYY[epsilonr[]]*CompYY[epsilonr_annex[]] ] ) / (Pinc[]*d) ] ; In Plot_domain ; Integration Int_1 ; Jacobian JVol ; } } } { Name Q_tot ; Value { Integral { [ 0.5 * ep0*om0*Fabs[Im[CompZZ[epsilonr[]]]] * ( SquNorm[CompY[{Grad u2d}]*I[]/(om0*ep0*CompXX[epsilonr[]])+Ex1[]/CompXX[epsilonr[]]*CompXX[epsilonr_annex[]]] + SquNorm[-CompX[{Grad u2d}]*I[]/(om0*ep0*CompYY[epsilonr[]])+Ey1[]/CompYY[epsilonr[]]*CompYY[epsilonr_annex[]] ] ) / (Pinc[]*d) ] ; In Plot_domain ; Integration Int_1 ; Jacobian JVol ; } } }
EndIf EndIf
If (flag_polar==0) If (flag_polar==0)
For i In {0:2*nb_orders} For i In {0:2*nb_orders}
{ Name eff_r~{i} ; Value { Term{ Type Global; [ SquNorm[$sr~{i}]*beta_super~{i}[]/beta1[] ] ; In SurfCutSuper1 ; } } } { Name eff_r~{i} ; Value { Term{ Type Global; [ SquNorm[$sr~{i}]*beta_super~{i}[]/beta1[] ] ; In SurfCutSuper1 ; } } }
{ Name eff_t~{i} ; Value { Term{ Type Global; [ SquNorm[$st~{i}]*(beta_subs~{i}[]/beta1[])] ; In SurfCutSubs1 ; } } } { Name eff_t~{i} ; Value { Term{ Type Global; [ SquNorm[$st~{i}]*(beta_subs~{i}[]/beta1[])] ; In SurfCutSubs1 ; } } }
...@@ -423,8 +423,8 @@ PostProcessing { ...@@ -423,8 +423,8 @@ PostProcessing {
PostOperation { PostOperation {
{ Name postop_energy; NameOfPostProcessing postpro_energy ; { Name postop_energy; NameOfPostProcessing postpro_energy ;
Operation { Operation {
Print[ SSize, OnPoint{0,0,0}, Format Table, File > StrCat[myDir, "SSize.txt"]] ; Print[ SSize, OnPoint{0,0,0}, Format ValueOnly, File > StrCat[myDir, "SSize.txt"]] ;
Print[ lambda_step, OnPoint{0,0,0}, Format Table, File > StrCat[myDir, "temp_lambda_step.txt"], SendToServer "GetDP/Lambda_step" ] ; Print[ lambda_step, OnPoint{0,0,0}, Format ValueOnly, File > StrCat[myDir, "temp_lambda_step.txt"], SendToServer "GetDP/Lambda_step" ] ;
For i In {0:2*nb_orders} For i In {0:2*nb_orders}
Print[ s_r~{i}[SurfCutSuper1], OnGlobal, StoreInVariable $sr~{i}, Format Table , File > StrCat[myDir, Sprintf("temp_s_r_%g.txt", i-nb_orders)]]; Print[ s_r~{i}[SurfCutSuper1], OnGlobal, StoreInVariable $sr~{i}, Format Table , File > StrCat[myDir, Sprintf("temp_s_r_%g.txt", i-nb_orders)]];
Print[ s_t~{i}[SurfCutSubs1] , OnGlobal, StoreInVariable $st~{i}, Format Table , File > StrCat[myDir, Sprintf("temp_s_t_%g.txt", i-nb_orders)]]; Print[ s_t~{i}[SurfCutSubs1] , OnGlobal, StoreInVariable $st~{i}, Format Table , File > StrCat[myDir, Sprintf("temp_s_t_%g.txt", i-nb_orders)]];
...@@ -432,15 +432,15 @@ PostOperation { ...@@ -432,15 +432,15 @@ PostOperation {
For i In {0:2*nb_orders} For i In {0:2*nb_orders}
Print[ eff_r~{i}[SurfCutSuper1], OnRegion SurfCutSuper1,Store (4*nb_orders+1+i), Format FrequencyTable, File > StrCat[myDir, Sprintf("efficiency_r_%g.txt", i-nb_orders)]]; Print[ eff_r~{i}[SurfCutSuper1], OnRegion SurfCutSuper1,Store (4*nb_orders+1+i), Format FrequencyTable, File > StrCat[myDir, Sprintf("efficiency_r_%g.txt", i-nb_orders)]];
Print[ eff_t~{i}[SurfCutSubs1] , OnRegion SurfCutSubs1 ,Store (6*nb_orders+1+i), Format FrequencyTable, File > StrCat[myDir, Sprintf("efficiency_t_%g.txt", i-nb_orders)]]; Print[ eff_t~{i}[SurfCutSubs1] , OnRegion SurfCutSubs1 ,Store (6*nb_orders+1+i), Format FrequencyTable, File > StrCat[myDir, Sprintf("efficiency_t_%g.txt", i-nb_orders)]];
Print[ order_r_angle~{i} , OnPoint{0,0,0}, Format Table , File > StrCat[myDir, Sprintf("order_r_angle_%g.txt", i-nb_orders)]]; Print[ order_r_angle~{i} , OnPoint{0,0,0}, Format ValueOnly , File > StrCat[myDir, Sprintf("order_r_angle_%g.txt", i-nb_orders)]];
Print[ order_t_angle~{i} , OnPoint{0,0,0}, Format Table , File > StrCat[myDir, Sprintf("order_t_angle_%g.txt", i-nb_orders)]]; Print[ order_t_angle~{i} , OnPoint{0,0,0}, Format ValueOnly , File > StrCat[myDir, Sprintf("order_t_angle_%g.txt", i-nb_orders)]];
EndFor EndFor
Print[ eff_r~{nb_orders}[SurfCutSuper1], OnRegion SurfCutSuper1, Format Table, SendToServer "GetDP/R0", File StrCat[myDir, "temp_R0.txt"]]; Print[ eff_r~{nb_orders}[SurfCutSuper1], OnRegion SurfCutSuper1, Format Table, SendToServer "GetDP/R0", File StrCat[myDir, "temp_R0.txt"]];
Print[ eff_t~{nb_orders}[SurfCutSubs1] , OnRegion SurfCutSubs1 , Format Table, SendToServer "GetDP/T0", File StrCat[myDir, "temp_T0.txt"]]; Print[ eff_t~{nb_orders}[SurfCutSubs1] , OnRegion SurfCutSubs1 , Format Table, SendToServer "GetDP/T0", File StrCat[myDir, "temp_T0.txt"]];
Print[ Q_tot[Plot_domain] , OnGlobal , Format FrequencyTable ,SendToServer "GetDP/total absorption", File > StrCat[myDir, "absorption-Q_tot.txt"]]; Print[ Q_tot[Plot_domain] , OnGlobal , Format FrequencyTable ,SendToServer "GetDP/total absorption", File > StrCat[myDir, "absorption-Q_tot.txt"]];
For i In {0:N_rods-1:1} For i In {0:N_rods-1:1}
Print[ Q_rod~{i}[rod~{i}] , OnGlobal, Format FrequencyTable, File > StrCat[myDir, Sprintf("absorption-Q_rod_%g.txt", i+1) ]]; Print[ Q_rod~{i}[rod~{i}] , OnGlobal, Format FrequencyTable, File > StrCat[myDir, Sprintf("absorption-Q_rod_%g.txt", i+1) ]];
EndFor EndFor
Print[ Q_tot[Plot_domain] , OnGlobal, Format FrequencyTable, File > StrCat[myDir, "absorption-Q_tot.txt"]]; Print[ Q_tot[Plot_domain] , OnGlobal, Format FrequencyTable, File > StrCat[myDir, "absorption-Q_tot.txt"]];
Print[ Q_subs[sub] , OnGlobal, Format FrequencyTable, File > StrCat[myDir, "absorption-Q_subs.txt"]]; Print[ Q_subs[sub] , OnGlobal, Format FrequencyTable, File > StrCat[myDir, "absorption-Q_subs.txt"]];
Print[ Q_rod_out[rod_out] , OnGlobal, Format FrequencyTable, File > StrCat[myDir, "absorption-Q_rod_out.txt"]]; Print[ Q_rod_out[rod_out] , OnGlobal, Format FrequencyTable, File > StrCat[myDir, "absorption-Q_rod_out.txt"]];
......
...@@ -17,9 +17,9 @@ ...@@ -17,9 +17,9 @@
Include "grating3D_data.geo"; Include "grating3D_data.geo";
Include "grating3D_materials.pro"; Include "grating3D_materials.pro";
myDir = "res3D/"; myDir = "res3D/";
Group { Group {
// SubDomains // SubDomains
PMLbot = Region[1]; PMLbot = Region[1];
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
L_1 = Region[7]; L_1 = Region[7];
PMLtop = Region[8]; PMLtop = Region[8];
Scat = Region[9]; Scat = Region[9];
// Boundaries // Boundaries
SurfBlochXm = Region[101]; SurfBlochXm = Region[101];
SurfBlochXp = Region[102]; SurfBlochXp = Region[102];
...@@ -39,41 +39,41 @@ ...@@ -39,41 +39,41 @@
SurfBlochYp = Region[202]; SurfBlochYp = Region[202];
SurfIntTop = Region[301]; SurfIntTop = Region[301];
SurfIntBot = Region[302]; SurfIntBot = Region[302];
SurfDirichlet = Region[{401,402}]; SurfDirichlet = Region[{401,402}];
SurfBloch = Region[{SurfBlochXm,SurfBlochXp,SurfBlochYm,SurfBlochYp}]; SurfBloch = Region[{SurfBlochXm,SurfBlochXp,SurfBlochYm,SurfBlochYp}];
If (FlagLinkFacets==1) If (FlagLinkFacets==1)
SurfExcludeFacets = Region[{}]; SurfExcludeFacets = Region[{}];
Else Else
SurfExcludeFacets = Region[{SurfBloch}]; SurfExcludeFacets = Region[{SurfBloch}];
EndIf EndIf
// L_1 = Region[{L_1_temp,SurfIntTop}]; // L_1 = Region[{L_1_temp,SurfIntTop}];
// L_6 = Region[{L_6_temp,SurfIntBot}]; // L_6 = Region[{L_6_temp,SurfIntBot}];
Omega = Region[{PMLbot,L_6,L_5,L_4,L_3,L_2,L_1,PMLtop,Scat}]; Omega = Region[{PMLbot,L_6,L_5,L_4,L_3,L_2,L_1,PMLtop,Scat}];
Omega_nosource = Region[{PMLbot,L_6,L_1,PMLtop}]; Omega_nosource = Region[{PMLbot,L_6,L_1,PMLtop}];
Omega_source = Region[{Scat,L_2,L_3,L_4,L_5}]; Omega_source = Region[{Scat,L_2,L_3,L_4,L_5}];
Omega_super = Region[{Scat,L_1,L_2,L_3,L_4,L_5,PMLtop}]; Omega_super = Region[{Scat,L_1,L_2,L_3,L_4,L_5,PMLtop}];
Omega_subs = Region[{L_6,PMLbot}]; Omega_subs = Region[{L_6,PMLbot}];
Omega_plot = Region[{L_6,L_5,L_4,L_3,L_2,L_1,Scat}]; Omega_plot = Region[{L_6,L_5,L_4,L_3,L_2,L_1,Scat}];
// get normal comp of E field on integ surfaces // get normal comp of E field on integ surfaces
Gama = Region[{SurfIntBot,SurfIntTop}]; Gama = Region[{SurfIntBot,SurfIntTop}];
Tr = ElementsOf[Omega_plot, ConnectedTo Gama]; Tr = ElementsOf[Omega_plot, ConnectedTo Gama];
} }
Function{ Function{
I[] = Complex[0,1]; I[] = Complex[0,1];
zhat[] = Vector[0,0,1]; zhat[] = Vector[0,0,1];
ispecular = Nmax; ispecular = Nmax;
jspecular = Nmax; jspecular = Nmax;
small_delta = 0.0*nm; small_delta = 0.0*nm;
mu0 = 4*Pi*1.e2*nm; mu0 = 4*Pi*1.e2*nm;
ep0 = 8.854187817e-3*nm; ep0 = 8.854187817e-3*nm;
...@@ -82,7 +82,7 @@ ...@@ -82,7 +82,7 @@
k0 = 2.*Pi/lambda0; k0 = 2.*Pi/lambda0;
Ae = 1; Ae = 1;
Pinc = 0.5*Ae^2*Sqrt[eps_re_L_1*ep0/mu0] * Cos[theta0]; Pinc = 0.5*Ae^2*Sqrt[eps_re_L_1*ep0/mu0] * Cos[theta0];
// permittivities // permittivities
For i In {1:6} For i In {1:6}
If (flag_mat~{i}==0) If (flag_mat~{i}==0)
...@@ -107,7 +107,7 @@ ...@@ -107,7 +107,7 @@
EndFor EndFor
EndIf EndIf
EndFor EndFor
If (flag_mat_scat==0) If (flag_mat_scat==0)
epsr[Scat] = Complex[eps_re_Scat , eps_im_Scat] * TensorDiag[1,1,1]; epsr[Scat] = Complex[eps_re_Scat , eps_im_Scat] * TensorDiag[1,1,1];
Else Else
...@@ -115,13 +115,13 @@ ...@@ -115,13 +115,13 @@
epsr[Scat] = Complex[epsr_re_interp_mat~{j}[lambda0/nm*1e-9] , epsr_im_interp_mat~{j}[lambda0/nm*1e-9]] * TensorDiag[1,1,1]; epsr[Scat] = Complex[epsr_re_interp_mat~{j}[lambda0/nm*1e-9] , epsr_im_interp_mat~{j}[lambda0/nm*1e-9]] * TensorDiag[1,1,1];
EndFor EndFor
EndIf EndIf
For i In {1:6} For i In {1:6}
mur[L~{i}] = TensorDiag[1,1,1]; mur[L~{i}] = TensorDiag[1,1,1];
EndFor EndFor
mur[Scat] = TensorDiag[1,1,1]; mur[Scat] = TensorDiag[1,1,1];
mur[SurfIntTop] = TensorDiag[1,1,1]; mur[SurfIntTop] = TensorDiag[1,1,1];
////// PMLS ////// PMLS
a_pml = 1.; a_pml = 1.;
b_pml = 1.; b_pml = 1.;
...@@ -130,14 +130,14 @@ ...@@ -130,14 +130,14 @@
n2[] = Sqrt[epsr2[]]; n2[] = Sqrt[epsr2[]];
k1norm[] = k0*n1[]; k1norm[] = k0*n1[];
k2norm[] = k0*n2[]; k2norm[] = k0*n2[];
Zmax = PML_top_hh; Zmax = PML_top_hh;
Zmin = hh_L_6; Zmin = hh_L_6;
Damp_pml_top[] = 1/(Zmax + PML_top - Fabs[Z[]]) - 1/(PML_top); Damp_pml_top[] = 1/(Zmax + PML_top - Fabs[Z[]]) - 1/(PML_top);
Damp_pml_bot[] = 1/(Zmin + PML_top - Fabs[Z[]]) - 1/(PML_bot); Damp_pml_bot[] = 1/(Zmin + PML_top - Fabs[Z[]]) - 1/(PML_bot);
Sigma_top[] = 0.5*(Damp_pml_top[] + Fabs[Damp_pml_top[]]); Sigma_top[] = 0.5*(Damp_pml_top[] + Fabs[Damp_pml_top[]]);
Sigma_bot[] = 0.5*(Damp_pml_bot[] + Fabs[Damp_pml_bot[]]); Sigma_bot[] = 0.5*(Damp_pml_bot[] + Fabs[Damp_pml_bot[]]);
If (PML_TYPE==0) If (PML_TYPE==0)
sz[] = Complex[a_pml,b_pml]; sz[] = Complex[a_pml,b_pml];
Else Else
...@@ -146,26 +146,26 @@ ...@@ -146,26 +146,26 @@
EndIf EndIf
sx = 1.; sx = 1.;
sy = 1.; sy = 1.;
epsr[PMLtop] = Re[epsr1[]]*TensorDiag[sz[]*sy/sx,sx*sz[]/sy,sx*sy/sz[]]; epsr[PMLtop] = Re[epsr1[]]*TensorDiag[sz[]*sy/sx,sx*sz[]/sy,sx*sy/sz[]];
mur[PMLtop] = TensorDiag[sz[]*sy/sx,sx*sz[]/sy,sx*sy/sz[]]; mur[PMLtop] = TensorDiag[sz[]*sy/sx,sx*sz[]/sy,sx*sy/sz[]];
epsr[PMLbot] = Re[epsr2[]]*TensorDiag[sz[]*sy/sx,sx*sz[]/sy,sx*sy/sz[]]; epsr[PMLbot] = Re[epsr2[]]*TensorDiag[sz[]*sy/sx,sx*sz[]/sy,sx*sy/sz[]];
mur[PMLbot] = TensorDiag[sz[]*sy/sx,sx*sz[]/sy,sx*sy/sz[]]; mur[PMLbot] = TensorDiag[sz[]*sy/sx,sx*sz[]/sy,sx*sy/sz[]];
// epsr[PMLtop] = Re[epsr1[]]*TensorDiag[sz_bermutop[]*sy/sx,sx*sz_bermutop[]/sy,sx*sy/sz_bermutop[]]; // epsr[PMLtop] = Re[epsr1[]]*TensorDiag[sz_bermutop[]*sy/sx,sx*sz_bermutop[]/sy,sx*sy/sz_bermutop[]];
// mur[PMLtop] = TensorDiag[sz_bermutop[]*sy/sx,sx*sz_bermutop[]/sy,sx*sy/sz_bermutop[]]; // mur[PMLtop] = TensorDiag[sz_bermutop[]*sy/sx,sx*sz_bermutop[]/sy,sx*sy/sz_bermutop[]];
// epsr[PMLbot] = Re[epsr2[]]*TensorDiag[sz_bermubot[]*sy/sx,sx*sz_bermubot[]/sy,sx*sy/sz_bermubot[]]; // epsr[PMLbot] = Re[epsr2[]]*TensorDiag[sz_bermubot[]*sy/sx,sx*sz_bermubot[]/sy,sx*sy/sz_bermubot[]];
// mur[PMLbot] = TensorDiag[sz_bermubot[]*sy/sx,sx*sz_bermubot[]/sy,sx*sy/sz_bermubot[]]; // mur[PMLbot] = TensorDiag[sz_bermubot[]*sy/sx,sx*sz_bermubot[]/sy,sx*sy/sz_bermubot[]];
// epsr[PMLbot] = epsr2[]; // epsr[PMLbot] = epsr2[];
// mur[PMLbot] = TensorDiag[1,1,1]; // mur[PMLbot] = TensorDiag[1,1,1];
epsr_annex[PMLbot] = epsr[]; epsr_annex[PMLbot] = epsr[];
epsr_annex[PMLtop] = epsr[]; epsr_annex[PMLtop] = epsr[];
epsr_annex[Omega_source] = epsr1[] * TensorDiag[1,1,1]; epsr_annex[Omega_source] = epsr1[] * TensorDiag[1,1,1];
epsr_annex[L_1] = epsr[]; epsr_annex[L_1] = epsr[];
epsr_annex[L_6] = epsr[]; epsr_annex[L_6] = epsr[];
//// Reference Field solution of annex problem (simple diopter) //// Reference Field solution of annex problem (simple diopter)
k1x[] = -k0*n1[]*Sin[theta0]*Cos[phi0]; k1x[] = -k0*n1[]*Sin[theta0]*Cos[phi0];
k1y[] = -k0*n1[]*Sin[theta0]*Sin[phi0]; k1y[] = -k0*n1[]*Sin[theta0]*Sin[phi0];
...@@ -176,23 +176,23 @@ ...@@ -176,23 +176,23 @@
k1[] = Vector[k1x[],k1y[], k1z[]]; k1[] = Vector[k1x[],k1y[], k1z[]];
k2[] = Vector[k2x[],k2y[], k2z[]]; k2[] = Vector[k2x[],k2y[], k2z[]];
k1r[] = Vector[k1x[],k1y[],-k1z[]]; k1r[] = Vector[k1x[],k1y[],-k1z[]];
rs[] = (k1z[]-k2z[])/(k1z[]+k2z[]); rs[] = (k1z[]-k2z[])/(k1z[]+k2z[]);
ts[] = 2.*k1z[] /(k1z[]+k2z[]); ts[] = 2.*k1z[] /(k1z[]+k2z[]);
rp[] = (k1z[]*epsr2[]-k2z[]*epsr1[])/(k1z[]*epsr2[]+k2z[]*epsr1[]); rp[] = (k1z[]*epsr2[]-k2z[]*epsr1[])/(k1z[]*epsr2[]+k2z[]*epsr1[]);
tp[] = (2.*k1z[]*epsr2[])/(k1z[]*epsr2[]+k2z[]*epsr1[]); tp[] = (2.*k1z[]*epsr2[])/(k1z[]*epsr2[]+k2z[]*epsr1[]);
spol[] = Vector[Sin[phi0],-Cos[phi0],0]; spol[] = Vector[Sin[phi0],-Cos[phi0],0];
ppol_r[] = (k1r[]/Norm[k1r[]]) /\ spol[]; ppol_r[] = (k1r[]/Norm[k1r[]]) /\ spol[];
ppol_t[] = (k2[] /Norm[k2[]] ) /\ spol[]; ppol_t[] = (k2[] /Norm[k2[]] ) /\ spol[];
AmplEis[] = spol[]; AmplEis[] = spol[];
AmplErs[] = rs[]*spol[]; AmplErs[] = rs[]*spol[];
AmplEts[] = ts[]*spol[]; AmplEts[] = ts[]*spol[];
AmplHis[] = Sqrt[ep0*epsr1[]/mu0] *spol[]; AmplHis[] = Sqrt[ep0*epsr1[]/mu0] *spol[];
AmplHrs[] = Sqrt[ep0*epsr1[]/mu0]*rp[]*spol[]; AmplHrs[] = Sqrt[ep0*epsr1[]/mu0]*rp[]*spol[];
AmplHts[] = Sqrt[ep0*epsr1[]/mu0]*tp[]*spol[]; AmplHts[] = Sqrt[ep0*epsr1[]/mu0]*tp[]*spol[];
Eis[] = AmplEis[] * Exp[I[]*k1[] *XYZ[]]; Eis[] = AmplEis[] * Exp[I[]*k1[] *XYZ[]];
Ers[] = AmplErs[] * Exp[I[]*k1r[]*XYZ[]]; Ers[] = AmplErs[] * Exp[I[]*k1r[]*XYZ[]];
Ets[] = AmplEts[] * Exp[I[]*k2[] *XYZ[]]; Ets[] = AmplEts[] * Exp[I[]*k2[] *XYZ[]];
...@@ -202,14 +202,14 @@ ...@@ -202,14 +202,14 @@
Eip[] = -1/(om0*ep0*epsr1[]) * k1[] /\ His[]; Eip[] = -1/(om0*ep0*epsr1[]) * k1[] /\ His[];
Erp[] = -1/(om0*ep0*epsr1[]) * k1r[] /\ Hrs[]; Erp[] = -1/(om0*ep0*epsr1[]) * k1r[] /\ Hrs[];
Etp[] = -1/(om0*ep0*epsr2[]) * k2[] /\ Hts[]; Etp[] = -1/(om0*ep0*epsr2[]) * k2[] /\ Hts[];
Ei[] = Ae*(Cos[psi0]*Eip[]-Sin[psi0]*Eis[]); Ei[] = Ae*(Cos[psi0]*Eip[]-Sin[psi0]*Eis[]);
Er[] = Ae*(Cos[psi0]*Erp[]-Sin[psi0]*Ers[]); Er[] = Ae*(Cos[psi0]*Erp[]-Sin[psi0]*Ers[]);
Et[] = Ae*(Cos[psi0]*Etp[]-Sin[psi0]*Ets[]); Et[] = Ae*(Cos[psi0]*Etp[]-Sin[psi0]*Ets[]);
Hi[] = 1/(om0*mu0*mur[]) * k1[] /\ Ei[]; Hi[] = 1/(om0*mu0*mur[]) * k1[] /\ Ei[];
Hr[] = 1/(om0*mu0*mur[]) * k1r[] /\ Er[]; Hr[] = 1/(om0*mu0*mur[]) * k1r[] /\ Er[];
Ht[] = 1/(om0*mu0*mur[]) * k2[] /\ Et[]; Ht[] = 1/(om0*mu0*mur[]) * k2[] /\ Et[];
E1[SurfIntTop] = Ei[]+Er[]; E1[SurfIntTop] = Ei[]+Er[];
E1[Omega_super] = Ei[]+Er[]; E1[Omega_super] = Ei[]+Er[];
E1[Omega_subs] = Et[]; E1[Omega_subs] = Et[];
...@@ -218,22 +218,22 @@ ...@@ -218,22 +218,22 @@
E1d[Omega_super] = Er[]; E1d[Omega_super] = Er[];
E1d[Omega_subs] = Et[]; E1d[Omega_subs] = Et[];
E1d[SurfIntBot] = Et[]; E1d[SurfIntBot] = Et[];
H1[Omega_super] = Hi[]+Hr[]; H1[Omega_super] = Hi[]+Hr[];
H1[Omega_subs] = Ht[]; H1[Omega_subs] = Ht[];
H1d[Omega_super] = Hr[]; H1d[Omega_super] = Hr[];
H1d[Omega_subs] = Ht[]; H1d[Omega_subs] = Ht[];
source_vol_scat[] = (om0/cel)^2*(epsr[]-epsr_annex[])*E1[]; source_vol_scat[] = (om0/cel)^2*(epsr[]-epsr_annex[])*E1[];
source_surf_tot[] = -2*I[]*om0*mu0*Vector[0,0,1] /\ Hi[]; source_surf_tot[] = -2*I[]*om0*mu0*Vector[0,0,1] /\ Hi[];
// Bloch phase shifts // Bloch phase shifts
skx1[] = k1x[]; skx1[] = k1x[];
// sky1[] = -k0*n1[]*Sin[theta0]*Sin[phi0+xsi]; // sky1[] = -k0*n1[]*Sin[theta0]*Sin[phi0+xsi];
sky1[] = -k0*n1[]*Sin[theta0]*Sin[phi0+xsi]; sky1[] = -k0*n1[]*Sin[theta0]*Sin[phi0+xsi];
dephX[] = Exp[I[]*skx1[]*period_x]; dephX[] = Exp[I[]*skx1[]*period_x];
dephY[] = Exp[I[]*sky1[]*period_y]; dephY[] = Exp[I[]*sky1[]*period_y];
// Fourier coefficients variables // Fourier coefficients variables
Nb_ordre = 2*Nmax+1; Nb_ordre = 2*Nmax+1;
For i In {0:Nb_ordre-1} For i In {0:Nb_ordre-1}
...@@ -249,9 +249,9 @@ ...@@ -249,9 +249,9 @@
gammat~{i}~{j}[] = Sqrt[k0^2*epsr2[] - 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
EndFor EndFor
} }
Constraint { Constraint {
{ Name Dirichlet; Type Assign; { Name Dirichlet; Type Assign;
Case { Case {
...@@ -271,13 +271,13 @@ ...@@ -271,13 +271,13 @@
} }
} }
} }
Jacobian { Jacobian {
{ Name JVol ; Case {{ Region All ; Jacobian Vol ; }}} { Name JVol ; Case {{ Region All ; Jacobian Vol ; }}}
{ Name JSur ; Case {{ Region All ; Jacobian Sur ; }}} { Name JSur ; Case {{ Region All ; Jacobian Sur ; }}}
{ Name JLin ; Case {{ Region All ; Jacobian Lin ; }}} { Name JLin ; Case {{ Region All ; Jacobian Lin ; }}}
} }
Integration { Integration {
{ Name I1 ; { Name I1 ;
Case { Case {
...@@ -294,7 +294,7 @@ ...@@ -294,7 +294,7 @@
} }
} }
} }
FunctionSpace { FunctionSpace {
{ Name Hcurl; Type Form1; { Name Hcurl; Type Form1;
BasisFunction { BasisFunction {
...@@ -335,7 +335,7 @@ ...@@ -335,7 +335,7 @@
} }
} }
} }
Formulation { Formulation {
{ Name helmholtz_vector; Type FemEquation; { Name helmholtz_vector; Type FemEquation;
Quantity { Quantity {
...@@ -355,7 +355,7 @@ ...@@ -355,7 +355,7 @@
} }
} }
} }
Resolution { Resolution {
{ Name helmholtz_vector; { Name helmholtz_vector;
System { System {
...@@ -368,7 +368,7 @@ ...@@ -368,7 +368,7 @@
} }
} }
} }
PostProcessing { PostProcessing {
{ Name postpro_helmholtz_vector; NameOfFormulation helmholtz_vector; NameOfSystem M; { Name postpro_helmholtz_vector; NameOfFormulation helmholtz_vector; NameOfSystem M;
Quantity { Quantity {
...@@ -380,7 +380,7 @@ ...@@ -380,7 +380,7 @@
{ Name Poy_inc; Value { Local { [ 0.5*Re[Cross[ Ei[] , Conj[Hi[]]]] ]; In Omega; Jacobian JVol; } } } { Name Poy_inc; Value { Local { [ 0.5*Re[Cross[ Ei[] , Conj[Hi[]]]] ]; In Omega; Jacobian JVol; } } }
{ Name E1 ; Value { Local { [ E1[] ]; In Omega; Jacobian JVol; } } } { Name E1 ; Value { Local { [ E1[] ]; In Omega; Jacobian JVol; } } }
{ Name lambda_step ; Value { Local { [ lambda0/nm ]; In Omega ; Jacobian JVol; } } } { Name lambda_step ; Value { Local { [ lambda0/nm ]; In Omega ; Jacobian JVol; } } }
If (FLAG_TOTAL==0) If (FLAG_TOTAL==0)
{ Name Etot ; Value { Local { [ {u}+E1[] ]; In Omega; Jacobian JVol; } } } { Name Etot ; Value { Local { [ {u}+E1[] ]; In Omega; Jacobian JVol; } } }
{ Name Htot ; Value { Local { [ H1[]-I[]/(mur[]*mu0*om0)*{Curl u}]; In Omega; Jacobian JVol; } } } { Name Htot ; Value { Local { [ H1[]-I[]/(mur[]*mu0*om0)*{Curl u}]; In Omega; Jacobian JVol; } } }
...@@ -400,7 +400,7 @@ ...@@ -400,7 +400,7 @@
EndFor EndFor
{ Name Abs_scat ; Value { Integral { [ ep0*om0 * 0.5*Im[CompXX[epsr[]]]*(SquNorm[{u}]) / (Pinc*period_x*dyc) ] ; In Scat ; Integration I1 ; Jacobian JVol ; } } } { Name Abs_scat ; Value { Integral { [ ep0*om0 * 0.5*Im[CompXX[epsr[]]]*(SquNorm[{u}]) / (Pinc*period_x*dyc) ] ; In Scat ; Integration I1 ; Jacobian JVol ; } } }
EndIf EndIf
For i In {0:Nb_ordre-1} For i In {0:Nb_ordre-1}
For j In {0:Nb_ordre-1} For j In {0:Nb_ordre-1}
If (FLAG_TOTAL==0) If (FLAG_TOTAL==0)
...@@ -442,26 +442,26 @@ ...@@ -442,26 +442,26 @@
// Is it better to compute it at the surface on which the scatterer is relying? (so that if there is no scatterer, // 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. // 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. // For the Mmatrix, we do not care about the phase.
{ Name er_specular ; Value { Term{ Type Global; [ { Name er_specular ; Value { Term{ Type Global; [
// Exp[I[]*k1z[]*(thick_L_1+thick_L_2+thick_L_3)] * // Exp[I[]*k1z[]*(thick_L_1+thick_L_2+thick_L_3)] *
Vector[$int_x_r~{ispecular}~{jspecular}, Vector[$int_x_r~{ispecular}~{jspecular},
$int_y_r~{ispecular}~{jspecular}, $int_y_r~{ispecular}~{jspecular},
$int_z_r~{ispecular}~{jspecular}] ] ; In SurfIntTop ; } } } $int_z_r~{ispecular}~{jspecular}] ] ; In SurfIntTop ; } } }
{ Name et_specular ; Value { Term{Type Global; [ { Name et_specular ; Value { Term{Type Global; [
Vector[$int_x_t~{ispecular}~{jspecular}, Vector[$int_x_t~{ispecular}~{jspecular},
$int_y_t~{ispecular}~{jspecular}, $int_y_t~{ispecular}~{jspecular},
$int_z_t~{ispecular}~{jspecular}] ] ; In SurfIntBot ; } } } $int_z_t~{ispecular}~{jspecular}] ] ; In SurfIntBot ; } } }
// Project er_specular on the (s,p) basis // Project er_specular on the (s,p) basis
{ Name rp ; Value { Term{ Type Global; [ ppol_r[] * $er_specular] ; In SurfIntTop ; } } } { Name rp ; Value { Term{ Type Global; [ ppol_r[] * $er_specular] ; In SurfIntTop ; } } }
{ Name rs ; Value { Term{ Type Global; [ spol[] * $er_specular] ; In SurfIntTop ; } } } { Name rs ; Value { Term{ Type Global; [ spol[] * $er_specular] ; In SurfIntTop ; } } }
{ Name tp ; Value { Term{ Type Global; [ ppol_t[] * $et_specular] ; In SurfIntBot ; } } } { Name tp ; Value { Term{ Type Global; [ ppol_t[] * $et_specular] ; In SurfIntBot ; } } }
{ Name ts ; Value { Term{ Type Global; [ spol[] * $et_specular] ; In SurfIntBot ; } } } { Name ts ; Value { Term{ Type Global; [ spol[] * $et_specular] ; In SurfIntBot ; } } }
} }
} }
} }
PostOperation { PostOperation {
{ Name postop_helmholtz_vector; NameOfPostProcessing postpro_helmholtz_vector ; { Name postop_helmholtz_vector; NameOfPostProcessing postpro_helmholtz_vector ;
Operation { Operation {
...@@ -470,13 +470,13 @@ ...@@ -470,13 +470,13 @@
// Print [ uz , OnElementsOf SurfIntBot, File StrCat[myDir,"uz_ZM.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_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"]]; // 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 // // Debug : print opto-geometric parameters
// Print [ epsr_xx , OnElementsOf Omega, File StrCat[myDir,"epsr_xx.pos"]]; // Print [ epsr_xx , OnElementsOf Omega, File StrCat[myDir,"epsr_xx.pos"]];
// // Debug : print raw u and Etot // // Debug : print raw u and Etot
// Print [ u , OnElementsOf Omega, File StrCat[myDir,"Edif.pos"]]; // Print [ u , OnElementsOf Omega, File StrCat[myDir,"Edif.pos"]];
// Print [ Etot , OnElementsOf Omega, File StrCat[myDir,"Etot.pos"]]; // Print [ Etot , OnElementsOf Omega, File StrCat[myDir,"Etot.pos"]];
If (FlagOutEscaFull==1) If (FlagOutEscaFull==1)
If (Flag_interp_cubic==1) If (Flag_interp_cubic==1)
Print [ u , OnBox { {-period_x/2,-period_y/2,hh_L_6-PML_bot} {period_x/2,-period_y/2,hh_L_6-PML_bot} {-period_x/2,period_y/2,hh_L_6-PML_bot} {-period_x/2,-period_y/2,hh_L_1+thick_L_1+PML_top} } {npts_interpX,npts_interpY,npts_interpZSca} , File StrCat[myDir,"u_grid.pos"], Name "u_grid"]; Print [ u , OnBox { {-period_x/2,-period_y/2,hh_L_6-PML_bot} {period_x/2,-period_y/2,hh_L_6-PML_bot} {-period_x/2,period_y/2,hh_L_6-PML_bot} {-period_x/2,-period_y/2,hh_L_1+thick_L_1+PML_top} } {npts_interpX,npts_interpY,npts_interpZSca} , File StrCat[myDir,"u_grid.pos"], Name "u_grid"];
...@@ -516,7 +516,7 @@ ...@@ -516,7 +516,7 @@
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 { {-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"]; 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"];
EndIf EndIf
Print [ Poy_tot , OnPlane { {0.5*(-period_x-dys), -dyc/2,(hh_L_6+hh_L_5)/2} Print [ Poy_tot , OnPlane { {0.5*(-period_x-dys), -dyc/2,(hh_L_6+hh_L_5)/2}
{0.5*( period_x-dys), -dyc/2,(hh_L_6+hh_L_5)/2} {0.5*( period_x-dys), -dyc/2,(hh_L_6+hh_L_5)/2}
{0.5*(-period_x+dys), dyc/2,(hh_L_6+hh_L_5)/2} } {0.5*(-period_x+dys), dyc/2,(hh_L_6+hh_L_5)/2} }
...@@ -529,23 +529,23 @@ ...@@ -529,23 +529,23 @@
{0.5*( period_x-dys), -dyc/2, hh_L_1+thick_L_1/2} {0.5*( period_x-dys), -dyc/2, hh_L_1+thick_L_1/2}
{0.5*(-period_x+dys), dyc/2, hh_L_1+thick_L_1/2} } {0.5*(-period_x+dys), dyc/2, hh_L_1+thick_L_1/2} }
{npts_checkpoyX-1,npts_checkpoyY-1} , File StrCat[myDir,"Poy_inc_gd.pos"], Format Table]; {npts_checkpoyX-1,npts_checkpoyY-1} , File StrCat[myDir,"Poy_inc_gd.pos"], Format Table];
For k In {2:6} For k In {2:6}
Print[ Abs_L~{k}[L~{k}], OnGlobal, File > StrCat[myDir,Sprintf["temp-Q_L_%g.txt",k]], Format Table ]; Print[ Abs_L~{k}[L~{k}], OnGlobal, File > StrCat[myDir,Sprintf["temp-Q_L_%g.txt",k]], Format Table ];
EndFor EndFor
Print[ Abs_scat[Scat] , OnGlobal, File > StrCat[myDir,"temp-Q_scat.txt"], Format Table ]; Print[ Abs_scat[Scat] , OnGlobal, File > StrCat[myDir,"temp-Q_scat.txt"], Format Table ];
For i In {0:Nb_ordre-1} For i In {0:Nb_ordre-1}
For j In {0:Nb_ordre-1} For j In {0:Nb_ordre-1}
Print[ int_x_t~{i}~{j}[SurfIntBot], OnGlobal, StoreInVariable $int_x_t~{i}~{j}, Format Table]; Print[ int_x_t~{i}~{j}[SurfIntBot], OnGlobal, StoreInVariable $int_x_t~{i}~{j}, Format Table];
Print[ int_y_t~{i}~{j}[SurfIntBot], OnGlobal, StoreInVariable $int_y_t~{i}~{j}, Format Table]; Print[ int_y_t~{i}~{j}[SurfIntBot], OnGlobal, StoreInVariable $int_y_t~{i}~{j}, Format Table];
Print[ int_z_t~{i}~{j}[SurfIntBot], OnGlobal, StoreInVariable $int_z_t~{i}~{j}, Format Table]; Print[ int_z_t~{i}~{j}[SurfIntBot], OnGlobal, StoreInVariable $int_z_t~{i}~{j}, Format Table];
Print[ int_x_r~{i}~{j}[SurfIntTop], OnGlobal, StoreInVariable $int_x_r~{i}~{j}, Format Table]; Print[ int_x_r~{i}~{j}[SurfIntTop], OnGlobal, StoreInVariable $int_x_r~{i}~{j}, Format Table];
Print[ int_y_r~{i}~{j}[SurfIntTop], OnGlobal, StoreInVariable $int_y_r~{i}~{j}, Format Table]; Print[ int_y_r~{i}~{j}[SurfIntTop], OnGlobal, StoreInVariable $int_y_r~{i}~{j}, Format Table];
Print[ int_z_r~{i}~{j}[SurfIntTop], OnGlobal, StoreInVariable $int_z_r~{i}~{j}, Format Table]; Print[ int_z_r~{i}~{j}[SurfIntTop], OnGlobal, StoreInVariable $int_z_r~{i}~{j}, Format Table];
EndFor EndFor
EndFor EndFor
For i In {0:Nb_ordre-1} For i In {0:Nb_ordre-1}
For j In {0:Nb_ordre-1} For j In {0:Nb_ordre-1}
Print[ eff_t1~{i}~{j}[SurfIntBot], OnRegion SurfIntBot, File > StrCat[myDir, "eff_t1.txt"], Format Table ]; Print[ eff_t1~{i}~{j}[SurfIntBot], OnRegion SurfIntBot, File > StrCat[myDir, "eff_t1.txt"], Format Table ];
...@@ -565,14 +565,13 @@ ...@@ -565,14 +565,13 @@
Print[ numbering_ij~{i}~{j}[SurfIntBot], OnRegion SurfIntBot, File > StrCat[myDir,"numbering_ij.txt"], Format Table ]; Print[ numbering_ij~{i}~{j}[SurfIntBot], OnRegion SurfIntBot, File > StrCat[myDir,"numbering_ij.txt"], Format Table ];
EndFor EndFor
EndFor EndFor
Print[ lambda_step, OnPoint{0,0,0}, Format Table, File > StrCat[myDir, "temp_lambda_step.txt"], SendToServer "GetDP/Lambda_step" ] ; Print[ lambda_step, OnPoint{0,0,0}, Format ValueOnly, File > StrCat[myDir, "temp_lambda_step.txt"], SendToServer "GetDP/Lambda_step" ] ;
} }
} }
} }
DefineConstant[ DefineConstant[
R_ = {"helmholtz_vector", Name "GetDP/1ResolutionChoices", Visible 1}, R_ = {"helmholtz_vector", Name "GetDP/1ResolutionChoices", Visible 1},
C_ = {"-solve -pos -petsc_prealloc 500 -ksp_type preonly -pc_type lu -pc_factor_mat_solver_type mumps -ksp_error_if_not_converged", Name "GetDP/9ComputeCommand", Visible 1}, C_ = {"-solve -pos -petsc_prealloc 500 -ksp_type preonly -pc_type lu -pc_factor_mat_solver_type mumps -ksp_error_if_not_converged", Name "GetDP/9ComputeCommand", Visible 1},
P_ = {"postop_helmholtz_vector", Name "GetDP/2PostOperationChoices", Visible 1} P_ = {"postop_helmholtz_vector", Name "GetDP/2PostOperationChoices", Visible 1}
]; ];
\ No newline at end of file
...@@ -231,7 +231,7 @@ PostOperation { ...@@ -231,7 +231,7 @@ PostOperation {
Print[ um, OnPoint {l/2,a/2,b/2}, Format ValueOnly, File "res/um_middle.txt", Print[ um, OnPoint {l/2,a/2,b/2}, Format ValueOnly, File "res/um_middle.txt",
SendToServer "Output/Middle diplacement [m]", Color "LightYellow" ]; SendToServer "Output/Middle diplacement [m]", Color "LightYellow" ];
Echo[ Str["l=PostProcessing.NbViews-1; View[l].VectorType=5; ", Echo[ Str["l=PostProcessing.NbViews-1; View[l].VectorType=5; ",
"View[l].DisplacementFactor = 1e10;"], "View[l].DisplacementFactor = 1e07;"],
File "res/tmp.geo", LastTimeStepOnly] ; File "res/tmp.geo", LastTimeStepOnly] ;
EndIf EndIf
} }
......
...@@ -184,15 +184,15 @@ PostOperation { ...@@ -184,15 +184,15 @@ PostOperation {
// Print [ eps_N, OnElementsOf Domain_Disp, File StrCat [Res_dir,"eps_N.pos" ]] ; // Print [ eps_N, OnElementsOf Domain_Disp, File StrCat [Res_dir,"eps_N.pos" ]] ;
// Print [ Fmaxwell, OnElementsOf Domain_Disp, File StrCat [Res_dir,"Fmaxwell.pos" ]] ; // Print [ Fmaxwell, OnElementsOf Domain_Disp, File StrCat [Res_dir,"Fmaxwell.pos" ]] ;
Print[ bn, OnElementsOf Domain_Mag, File StrCat [Res_dir,"bn.pos" ]] ; Print[ bn, OnElementsOf Domain_Mag, File StrCat [Res_dir,"bn.pos" ]] ;
Print [ u_N, OnPoint {x_measurement,y_measurement-1e-3,0}, Print [ u_N, OnPoint {x_measurement,y_measurement-1e-3,0}, Format ValueOnly,
LastTimeStepOnly, LastTimeStepOnly,
File StrCat [Res_dir,"u_measurement_N.dat"], File StrCat [Res_dir,"u_measurement_N.dat"],
SendToServer "Output/displacement |u| [m]", Color "Ivory"]; SendToServer "Output/displacement |u| [m]", Color "Ivory"];
Print [ u_x, OnPoint {x_measurement,y_measurement-1e-3,0}, Print [ u_x, OnPoint {x_measurement,y_measurement-1e-3,0}, Format ValueOnly,
LastTimeStepOnly, LastTimeStepOnly,
File StrCat [Res_dir,"u_measurement_x.dat" ], File StrCat [Res_dir,"u_measurement_x.dat" ],
SendToServer "Output/Displacement X |u_x| [m]", Color "Ivory"]; SendToServer "Output/Displacement X |u_x| [m]", Color "Ivory"];
Print [ u_y, OnPoint {x_measurement,y_measurement-1e-3,0}, Print [ u_y, OnPoint {x_measurement,y_measurement-1e-3,0}, Format ValueOnly,
LastTimeStepOnly, LastTimeStepOnly,
File StrCat [Res_dir,"u_measurement_y.dat" ], File StrCat [Res_dir,"u_measurement_y.dat" ],
SendToServer "Output/displacement Y |u_y| [m]", Color "Ivory"]; SendToServer "Output/displacement Y |u_y| [m]", Color "Ivory"];
......
...@@ -168,7 +168,7 @@ PostOperation { ...@@ -168,7 +168,7 @@ PostOperation {
} }
{ Name Get_ShieldingEffectiveness ; NameOfPostProcessing Microwave_e ; { Name Get_ShieldingEffectiveness ; NameOfPostProcessing Microwave_e ;
Operation { Operation {
Print[ SE, OnPoint {0,0,0}, Format Table, File StrCat[myDir,"temp",ExtGnuplot], Print[ SE, OnPoint {0,0,0}, Format ValueOnly, File StrCat[myDir,"temp",ExtGnuplot],
SendToServer StrCat(po,"0Shielding effectiveness [dB]")]; SendToServer StrCat(po,"0Shielding effectiveness [dB]")];
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment