Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
models
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
documentation
models
Commits
11dc03be
Commit
11dc03be
authored
5 years ago
by
Guillaume Demesy
Browse files
Options
Downloads
Patches
Plain Diff
more tabs
parent
3af60703
No related branches found
No related tags found
No related merge requests found
Pipeline
#4901
passed
5 years ago
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
DiffractionGratings/grating2D.pro
+58
-57
58 additions, 57 deletions
DiffractionGratings/grating2D.pro
with
58 additions
and
57 deletions
DiffractionGratings/grating2D.pro
+
58
−
57
View file @
11dc03be
...
@@ -427,55 +427,55 @@ PostProcessing {
...
@@ -427,55 +427,55 @@ PostProcessing {
{
Name
Q_tot
;
Value
{
Integral
{
[
0.5
*
epsilon0
*
omega0
*
Fabs
[
Im
[
CompZZ
[
epsilonr
[]]]]
*
(
SquNorm
[
-
CompY
[{
Grad
u2d
}]
*
I
[]
/
(
omega0
*
epsilon0
*
CompXX
[
epsilonr
[]])
+
Ex1
[]
/
CompXX
[
epsilonr
[]]
*
CompXX
[
epsilonr_annex
[]]
]
+
SquNorm
[
CompX
[{
Grad
u2d
}]
*
I
[]
/
(
omega0
*
epsilon0
*
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
*
epsilon0
*
omega0
*
Fabs
[
Im
[
CompZZ
[
epsilonr
[]]]]
*
(
SquNorm
[
-
CompY
[{
Grad
u2d
}]
*
I
[]
/
(
omega0
*
epsilon0
*
CompXX
[
epsilonr
[]])
+
Ex1
[]
/
CompXX
[
epsilonr
[]]
*
CompXX
[
epsilonr_annex
[]]
]
+
SquNorm
[
CompX
[{
Grad
u2d
}]
*
I
[]
/
(
omega0
*
epsilon0
*
CompYY
[
epsilonr
[]])
+
Ey1
[]
/
CompYY
[
epsilonr
[]]
*
CompYY
[
epsilonr_annex
[]]
]
)
/
(
Pinc
[]
*
d
)
]
;
In
Plot_domain
;
Integration
Int_1
;
Jacobian
JVol
;
}
}
}
{
Name
lambda_step
;
Value
{
Local
{
[
lambda0
/
nm
];
In
Omega
;
Jacobian
JVol
;
}
}
}
{
Name
lambda_step
;
Value
{
Local
{
[
lambda0
/
nm
];
In
Omega
;
Jacobian
JVol
;
}
}
}
EndIf
EndIf
If
(
flag_Hparallel
==
0
)
If
(
flag_Hparallel
==
0
)
{
Name
testte
;
Value
{
Local
{
[
{
u2d
}
];
In
Omega
;
Jacobian
JVol
;
}
}
}
{
Name
testte
;
Value
{
Local
{
[
{
u2d
}
];
In
Omega
;
Jacobian
JVol
;
}
}
}
{
Name
epsr
;
Value
{
Local
{
[
CompZZ
[
epsilonr
[]]
];
In
Omega
;
Jacobian
JVol
;
}
}
}
{
Name
epsr
;
Value
{
Local
{
[
CompZZ
[
epsilonr
[]]
];
In
Omega
;
Jacobian
JVol
;
}
}
}
{
Name
Ez_diff
;
Value
{
Local
{
[
{
u2d
}
+
u1d
[]
];
In
Omega
;
Jacobian
JVol
;
}
}
}
{
Name
Ez_diff
;
Value
{
Local
{
[
{
u2d
}
+
u1d
[]
];
In
Omega
;
Jacobian
JVol
;
}
}
}
{
Name
Ez_tot
;
Value
{
Local
{
[
{
u2d
}
+
u1
[]
];
In
Omega
;
Jacobian
JVol
;
}
}
}
{
Name
Ez_tot
;
Value
{
Local
{
[
{
u2d
}
+
u1
[]
];
In
Omega
;
Jacobian
JVol
;
}
}
}
{
Name
Ez_totp1
;
Value
{
Local
{
[
({
u2d
}
+
u1
[])
*
Complex
[
Cos
[
1
*-
alpha
[]
*
d
],
Sin
[
1
*-
alpha
[]
*
d
]]
];
In
Omega
;
Jacobian
JVol
;
}
}
}
{
Name
Ez_totp1
;
Value
{
Local
{
[
({
u2d
}
+
u1
[])
*
Complex
[
Cos
[
1
*-
alpha
[]
*
d
],
Sin
[
1
*-
alpha
[]
*
d
]]
];
In
Omega
;
Jacobian
JVol
;
}
}
}
{
Name
Ez_totp2
;
Value
{
Local
{
[
({
u2d
}
+
u1
[])
*
Complex
[
Cos
[
2
*-
alpha
[]
*
d
],
Sin
[
2
*-
alpha
[]
*
d
]]
];
In
Omega
;
Jacobian
JVol
;
}
}
}
{
Name
Ez_totp2
;
Value
{
Local
{
[
({
u2d
}
+
u1
[])
*
Complex
[
Cos
[
2
*-
alpha
[]
*
d
],
Sin
[
2
*-
alpha
[]
*
d
]]
];
In
Omega
;
Jacobian
JVol
;
}
}
}
{
Name
Ez_totp3
;
Value
{
Local
{
[
({
u2d
}
+
u1
[])
*
Complex
[
Cos
[
3
*-
alpha
[]
*
d
],
Sin
[
3
*-
alpha
[]
*
d
]]
];
In
Omega
;
Jacobian
JVol
;
}
}
}
{
Name
Ez_totp3
;
Value
{
Local
{
[
({
u2d
}
+
u1
[])
*
Complex
[
Cos
[
3
*-
alpha
[]
*
d
],
Sin
[
3
*-
alpha
[]
*
d
]]
];
In
Omega
;
Jacobian
JVol
;
}
}
}
{
Name
Ez_totp4
;
Value
{
Local
{
[
({
u2d
}
+
u1
[])
*
Complex
[
Cos
[
4
*-
alpha
[]
*
d
],
Sin
[
4
*-
alpha
[]
*
d
]]
];
In
Omega
;
Jacobian
JVol
;
}
}
}
{
Name
Ez_totp4
;
Value
{
Local
{
[
({
u2d
}
+
u1
[])
*
Complex
[
Cos
[
4
*-
alpha
[]
*
d
],
Sin
[
4
*-
alpha
[]
*
d
]]
];
In
Omega
;
Jacobian
JVol
;
}
}
}
{
Name
Ez_totm1
;
Value
{
Local
{
[
({
u2d
}
+
u1
[])
*
Complex
[
Cos
[
-
1
*-
alpha
[]
*
d
],
Sin
[
-
1
*-
alpha
[]
*
d
]]
];
In
Omega
;
Jacobian
JVol
;
}
}
}
{
Name
Ez_totm1
;
Value
{
Local
{
[
({
u2d
}
+
u1
[])
*
Complex
[
Cos
[
-
1
*-
alpha
[]
*
d
],
Sin
[
-
1
*-
alpha
[]
*
d
]]
];
In
Omega
;
Jacobian
JVol
;
}
}
}
{
Name
Ez_totm2
;
Value
{
Local
{
[
({
u2d
}
+
u1
[])
*
Complex
[
Cos
[
-
2
*-
alpha
[]
*
d
],
Sin
[
-
2
*-
alpha
[]
*
d
]]
];
In
Omega
;
Jacobian
JVol
;
}
}
}
{
Name
Ez_totm2
;
Value
{
Local
{
[
({
u2d
}
+
u1
[])
*
Complex
[
Cos
[
-
2
*-
alpha
[]
*
d
],
Sin
[
-
2
*-
alpha
[]
*
d
]]
];
In
Omega
;
Jacobian
JVol
;
}
}
}
{
Name
Ez_totm3
;
Value
{
Local
{
[
({
u2d
}
+
u1
[])
*
Complex
[
Cos
[
-
3
*-
alpha
[]
*
d
],
Sin
[
-
3
*-
alpha
[]
*
d
]]
];
In
Omega
;
Jacobian
JVol
;
}
}
}
{
Name
Ez_totm3
;
Value
{
Local
{
[
({
u2d
}
+
u1
[])
*
Complex
[
Cos
[
-
3
*-
alpha
[]
*
d
],
Sin
[
-
3
*-
alpha
[]
*
d
]]
];
In
Omega
;
Jacobian
JVol
;
}
}
}
{
Name
Ez_totm4
;
Value
{
Local
{
[
({
u2d
}
+
u1
[])
*
Complex
[
Cos
[
-
4
*-
alpha
[]
*
d
],
Sin
[
-
4
*-
alpha
[]
*
d
]]
];
In
Omega
;
Jacobian
JVol
;
}
}
}
{
Name
Ez_totm4
;
Value
{
Local
{
[
({
u2d
}
+
u1
[])
*
Complex
[
Cos
[
-
4
*-
alpha
[]
*
d
],
Sin
[
-
4
*-
alpha
[]
*
d
]]
];
In
Omega
;
Jacobian
JVol
;
}
}
}
{
Name
boundary
;
Value
{
Local
{
[
bndCol
[]
]
;
In
Plot_bnd
;
Jacobian
JVol
;
}
}
}
{
Name
boundary
;
Value
{
Local
{
[
bndCol
[]
]
;
In
Plot_bnd
;
Jacobian
JVol
;
}
}
}
{
Name
u
;
Value
{
Local
{
[
{
u2d
}
];
In
Omega
;
Jacobian
JVol
;
}
}
}
{
Name
u
;
Value
{
Local
{
[
{
u2d
}
];
In
Omega
;
Jacobian
JVol
;
}
}
}
// modif effic
// modif effic
For
i
In
{
0
:
2
*
nb_orders
}
For
i
In
{
0
:
2
*
nb_orders
}
{
Name
s_r
~
{
i
}
;
Value
{
{
Name
s_r
~
{
i
}
;
Value
{
Integral
{
[
expialpha_orders
~
{
i
}[]
*
({
u2d
}
+
u1d
[])
/
d
]
;
Integral
{
[
expialpha_orders
~
{
i
}[]
*
({
u2d
}
+
u1d
[])
/
d
]
;
In
SurfCutSuper1
;
Jacobian
JSur
;
Integration
Int_1
;
}
}
}
In
SurfCutSuper1
;
Jacobian
JSur
;
Integration
Int_1
;
}
}
}
{
Name
s_t
~
{
i
}
;
Value
{
{
Name
s_t
~
{
i
}
;
Value
{
Integral
{
[
expialpha_orders
~
{
i
}[]
*
({
u2d
}
+
u1d
[])
/
d
]
;
Integral
{
[
expialpha_orders
~
{
i
}[]
*
({
u2d
}
+
u1d
[])
/
d
]
;
In
SurfCutSubs1
;
Jacobian
JSur
;
Integration
Int_1
;
}
}
}
In
SurfCutSubs1
;
Jacobian
JSur
;
Integration
Int_1
;
}
}
}
{
Name
order_t_angle
~
{
i
}
;
Value
{
{
Name
order_t_angle
~
{
i
}
;
Value
{
Local
{
[
-
Atan2
[
Re
[
alpha_orders
~
{
i
}[]],
Re
[
betat_sub
~
{
i
}[]]]
/
deg2rad
]
;
Local
{
[
-
Atan2
[
Re
[
alpha_orders
~
{
i
}[]],
Re
[
betat_sub
~
{
i
}[]]]
/
deg2rad
]
;
In
Omega
;
Jacobian
JVol
;
}
}
}
In
Omega
;
Jacobian
JVol
;
}
}
}
{
Name
order_r_angle
~
{
i
}
;
Value
{
{
Name
order_r_angle
~
{
i
}
;
Value
{
Local
{
[
Atan2
[
Re
[
alpha_orders
~
{
i
}[]],
Re
[
betat_sup
~
{
i
}[]]]
/
deg2rad
]
;
Local
{
[
Atan2
[
Re
[
alpha_orders
~
{
i
}[]],
Re
[
betat_sup
~
{
i
}[]]]
/
deg2rad
]
;
In
Omega
;
Jacobian
JVol
;
}
}
}
In
Omega
;
Jacobian
JVol
;
}
}
}
EndFor
EndFor
For
i
In
{
0
:
2
*
nb_orders
}
For
i
In
{
0
:
2
*
nb_orders
}
{
Name
eff_r
~
{
i
}
;
Value
{
{
Name
eff_r
~
{
i
}
;
Value
{
Term
{
Type
Global
;
[
SquNorm
[
#
i
]
*
betat_sup
~
{
i
}[]
/
beta_sup
[]
]
;
Term
{
Type
Global
;
[
SquNorm
[
#
i
]
*
betat_sup
~
{
i
}[]
/
beta_sup
[]
]
;
In
SurfCutSuper1
;
}
}
}
In
SurfCutSuper1
;
}
}
}
{
Name
eff_t
~
{
i
}
;
Value
{
{
Name
eff_t
~
{
i
}
;
Value
{
Term
{
Type
Global
;
[
SquNorm
[
#
(
2
*
nb_orders
+
1
+
i
)]
*
(
betat_sub
~
{
i
}[]
/
beta_sup
[])]
;
Term
{
Type
Global
;
[
SquNorm
[
#
(
2
*
nb_orders
+
1
+
i
)]
*
(
betat_sub
~
{
i
}[]
/
beta_sup
[])]
;
In
SurfCutSubs1
;
}
}
}
In
SurfCutSubs1
;
}
}
}
EndFor
EndFor
For
i
In
{
0
:
N_rods
-
1
:
1
}
For
i
In
{
0
:
N_rods
-
1
:
1
}
{
Name
Q_rod
~
{
i
}
;
Value
{
Integral
{
[
0.5
*
epsilon0
*
omega0
*
Fabs
[
epsr_rods_im
[]]
*
(
SquNorm
[{
u2d
}
+
u1
[]])
/
(
Pinc
[]
*
d
)
]
;
In
rod
~
{
i
}
;
Integration
Int_1
;
Jacobian
JVol
;
}
}
}
{
Name
Q_rod
~
{
i
}
;
Value
{
Integral
{
[
0.5
*
epsilon0
*
omega0
*
Fabs
[
epsr_rods_im
[]]
*
(
SquNorm
[{
u2d
}
+
u1
[]])
/
(
Pinc
[]
*
d
)
]
;
In
rod
~
{
i
}
;
Integration
Int_1
;
Jacobian
JVol
;
}
}
}
EndFor
EndFor
{
Name
Q_sub
;
Value
{
Integral
{
[
0.5
*
epsilon0
*
omega0
*
Fabs
[
epsr_sub_im
[]]
*
(
SquNorm
[{
u2d
}
+
u1
[]])
/
(
Pinc
[]
*
d
)
]
;
In
sub
;
Integration
Int_1
;
Jacobian
JVol
;
}
}
}
{
Name
Q_sub
;
Value
{
Integral
{
[
0.5
*
epsilon0
*
omega0
*
Fabs
[
epsr_sub_im
[]]
*
(
SquNorm
[{
u2d
}
+
u1
[]])
/
(
Pinc
[]
*
d
)
]
;
In
sub
;
Integration
Int_1
;
Jacobian
JVol
;
}
}
}
{
Name
Q_rod_out
;
Value
{
Integral
{
[
0.5
*
epsilon0
*
omega0
*
Fabs
[
epsr_rod_out_im
[]]
*
(
SquNorm
[{
u2d
}
+
u1
[]])
/
(
Pinc
[]
*
d
)
]
;
In
rod_out
;
Integration
Int_1
;
Jacobian
JVol
;
}
}
}
{
Name
Q_rod_out
;
Value
{
Integral
{
[
0.5
*
epsilon0
*
omega0
*
Fabs
[
epsr_rod_out_im
[]]
*
(
SquNorm
[{
u2d
}
+
u1
[]])
/
(
Pinc
[]
*
d
)
]
;
In
rod_out
;
Integration
Int_1
;
Jacobian
JVol
;
}
}
}
{
Name
Q_layer_dep
;
Value
{
Integral
{
[
0.5
*
epsilon0
*
omega0
*
Fabs
[
epsr_layer_dep_im
[]]
*
(
SquNorm
[{
u2d
}
+
u1
[]])
/
(
Pinc
[]
*
d
)
]
;
In
layer_dep
;
Integration
Int_1
;
Jacobian
JVol
;
}
}
}
{
Name
Q_layer_dep
;
Value
{
Integral
{
[
0.5
*
epsilon0
*
omega0
*
Fabs
[
epsr_layer_dep_im
[]]
*
(
SquNorm
[{
u2d
}
+
u1
[]])
/
(
Pinc
[]
*
d
)
]
;
In
layer_dep
;
Integration
Int_1
;
Jacobian
JVol
;
}
}
}
{
Name
Q_layer_cov
;
Value
{
Integral
{
[
0.5
*
epsilon0
*
omega0
*
Fabs
[
epsr_layer_cov_im
[]]
*
(
SquNorm
[{
u2d
}
+
u1
[]])
/
(
Pinc
[]
*
d
)
]
;
In
layer_cov
;
Integration
Int_1
;
Jacobian
JVol
;
}
}
}
{
Name
Q_layer_cov
;
Value
{
Integral
{
[
0.5
*
epsilon0
*
omega0
*
Fabs
[
epsr_layer_cov_im
[]]
*
(
SquNorm
[{
u2d
}
+
u1
[]])
/
(
Pinc
[]
*
d
)
]
;
In
layer_cov
;
Integration
Int_1
;
Jacobian
JVol
;
}
}
}
{
Name
Q_tot
;
Value
{
Integral
{
[
0.5
*
epsilon0
*
omega0
*
Fabs
[
Im
[
CompXX
[
epsilonr
[]]]]
*
(
SquNorm
[{
u2d
}
+
u1
[]])
/
(
Pinc
[]
*
d
)
]
;
In
Plot_domain
;
Integration
Int_1
;
Jacobian
JVol
;
}
}
}
{
Name
Q_tot
;
Value
{
Integral
{
[
0.5
*
epsilon0
*
omega0
*
Fabs
[
Im
[
CompXX
[
epsilonr
[]]]]
*
(
SquNorm
[{
u2d
}
+
u1
[]])
/
(
Pinc
[]
*
d
)
]
;
In
Plot_domain
;
Integration
Int_1
;
Jacobian
JVol
;
}
}
}
{
Name
lambda_step
;
Value
{
Local
{
[
lambda0
/
nm
];
In
Omega
;
Jacobian
JVol
;
}
}
}
{
Name
lambda_step
;
Value
{
Local
{
[
lambda0
/
nm
];
In
Omega
;
Jacobian
JVol
;
}
}
}
EndIf
EndIf
}
}
}
}
}
}
...
@@ -614,14 +614,15 @@ PostOperation {
...
@@ -614,14 +614,15 @@ PostOperation {
}
}
}
}
DefineConstant
[
DefineConstant
[
R_
=
{
"helmoltz_scalar"
,
Name
"GetDP/1ResolutionChoices"
,
Visible
1
},
R_
=
{
"helmoltz_scalar"
,
Name
"GetDP/1ResolutionChoices"
,
Visible
1
},
C_
=
{
"-solve -pos -petsc_prealloc 100 -ksp_type preonly -pc_type lu -pc_factor_mat_solver_type mumps"
,
Name
"GetDP/9ComputeCommand"
,
Visible
1
},
C_
=
{
"-solve -pos -petsc_prealloc 100 -ksp_type preonly -pc_type lu -pc_factor_mat_solver_type mumps"
,
Name
"GetDP/9ComputeCommand"
,
Visible
1
},
P_
=
{
"postop_energy"
,
Name
"GetDP/2PostOperationChoices"
,
Visible
1
}];
P_
=
{
"postop_energy"
,
Name
"GetDP/2PostOperationChoices"
,
Visible
1
}
];
If
(
plotRTgraphs
)
If
(
plotRTgraphs
)
DefineConstant
[
DefineConstant
[
refl_
=
{
0
,
Name
"GetDP/R0"
,
ReadOnly
1
,
Graph
"02000000"
,
Visible
1
},
refl_
=
{
0
,
Name
"GetDP/R0"
,
ReadOnly
1
,
Graph
"02000000"
,
Visible
1
},
abs_
=
{
0
,
Name
"GetDP/total absorption"
,
ReadOnly
1
,
Graph
"00000002"
,
Visible
1
},
abs_
=
{
0
,
Name
"GetDP/total absorption"
,
ReadOnly
1
,
Graph
"00000002"
,
Visible
1
},
trans_
=
{
0
,
Name
"GetDP/T0"
,
ReadOnly
1
,
Graph
"000000000002"
,
Visible
1
}
trans_
=
{
0
,
Name
"GetDP/T0"
,
ReadOnly
1
,
Graph
"000000000002"
,
Visible
1
}
];
];
EndIf
EndIf
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment