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
93ff16c1
Commit
93ff16c1
authored
2 years ago
by
Guillaume Demesy
Browse files
Options
Downloads
Patches
Plain Diff
check paper test cases
parent
18bb0367
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!7
pillar + check Mmatrix again
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
DiffractionGratings/grating3D_parallel_Mmatrix.sh
+8
-6
8 additions, 6 deletions
DiffractionGratings/grating3D_parallel_Mmatrix.sh
DiffractionGratings/grating3D_postplot_Mmatrix.py
+3
-3
3 additions, 3 deletions
DiffractionGratings/grating3D_postplot_Mmatrix.py
with
11 additions
and
9 deletions
DiffractionGratings/grating3D_parallel_Mmatrix.sh
+
8
−
6
View file @
93ff16c1
...
@@ -4,20 +4,22 @@ export OMP_NUM_THREADS=1
...
@@ -4,20 +4,22 @@ export OMP_NUM_THREADS=1
export
NPROC
=
96
export
NPROC
=
96
### choose configuration
### choose configuration
### theta loop study for the pillar case
### theta loop study for the "U" case
### config 1
export
flag_angle_study
=
"theta"
export
flag_angle_study
=
"theta"
export
loop_angle_max
=
50
export
loop_angle_max
=
50
export
fixed_angle
=
90
export
fixed_angle
=
90
export
GRATING_CASE
=
"
pillar
"
export
GRATING_CASE
=
"
U
"
### phi loop study for the half_ellipsoid case
### phi loop study for the "U" case
### config 2
# export flag_angle_study="phi"
# export flag_angle_study="phi"
# export loop_angle_max=360
# export loop_angle_max=360
# export fixed_angle=50
# export fixed_angle=50
# export GRATING_CASE="
half_ellipsoid
"
# export GRATING_CASE="
U
"
export
nb_angle
=
2
0
export
nb_angle
=
4
0
export
nb_lam
=
10
0
export
nb_lam
=
5
0
export
lambda_min
=
400
export
lambda_min
=
400
export
lambda_max
=
1200
export
lambda_max
=
1200
export
FLAG_TOTAL
=
0
export
FLAG_TOTAL
=
0
...
...
This diff is collapsed.
Click to expand it.
DiffractionGratings/grating3D_postplot_Mmatrix.py
+
3
−
3
View file @
93ff16c1
...
@@ -164,7 +164,7 @@ ax=axes[2,1];zplot = ax.pcolormesh(L,P,Qscat_pin.real);add_colorbar(zplot);ax.ti
...
@@ -164,7 +164,7 @@ ax=axes[2,1];zplot = ax.pcolormesh(L,P,Qscat_pin.real);add_colorbar(zplot);ax.ti
plt
.
savefig
(
'
BALANCE_new_code.jpg
'
)
plt
.
savefig
(
'
BALANCE_new_code.jpg
'
)
fig
,
axes
=
plt
.
subplots
(
4
,
4
,
subplot_kw
=
dict
(
projection
=
'
polar
'
)
,
figsize
=
(
12
,
12
))
fig
,
axes
=
plt
.
subplots
(
4
,
4
,
subplot_kw
=
dict
(
projection
=
'
polar
'
)
,
figsize
=
(
12
,
12
))
flag_lam
=
Fals
e
flag_lam
=
Tru
e
rlabel
=
r
"
$\hbar \nu$
"
if
not
flag_lam
else
r
"
$\lambda_0$
"
rlabel
=
r
"
$\hbar \nu$
"
if
not
flag_lam
else
r
"
$\lambda_0$
"
anglelabel
=
r
"
$\varphi_0$
"
if
flag_angle_study
==
'
phi
'
else
r
"
$\theta_0$
"
anglelabel
=
r
"
$\varphi_0$
"
if
flag_angle_study
==
'
phi
'
else
r
"
$\theta_0$
"
which_r
=
tab_hnu
if
not
flag_lam
else
tab_lam
which_r
=
tab_hnu
if
not
flag_lam
else
tab_lam
...
@@ -173,8 +173,8 @@ for i in range(4):
...
@@ -173,8 +173,8 @@ for i in range(4):
for
j
in
range
(
4
):
for
j
in
range
(
4
):
ax
=
axes
[
i
,
j
]
ax
=
axes
[
i
,
j
]
if
i
!=
0
or
j
!=
0
:
if
i
!=
0
or
j
!=
0
:
sm
=
ax
.
contourf
(
tab_angle
*
np
.
pi
/
180
,
which_r
,
M
[
i
,
j
]
/
M
[
0
,
0
],
cmap
=
plt
.
cm
.
bwr
,
levels
=
30
,
vmin
=-
1
,
vmax
=
1
)
#
sm=ax.contourf(tab_angle*np.pi/180,which_r,M[i,j]/M[0,0],cmap=plt.cm.bwr,levels=30,vmin=-1,vmax=1)
#
sm=ax.contourf(tab_angle*np.pi/180,which_r,M[i,j]/M[0,0],cmap=plt.cm.bwr,levels=30)
sm
=
ax
.
contourf
(
tab_angle
*
np
.
pi
/
180
,
which_r
,
M
[
i
,
j
]
/
M
[
0
,
0
],
cmap
=
plt
.
cm
.
bwr
,
levels
=
30
)
ax
.
text
(
0.
,
1.
,
r
"
$M_{%d%d}$
"
%
(
i
+
1
,
j
+
1
)
,
fontsize
=
16
,
transform
=
ax
.
transAxes
)
ax
.
text
(
0.
,
1.
,
r
"
$M_{%d%d}$
"
%
(
i
+
1
,
j
+
1
)
,
fontsize
=
16
,
transform
=
ax
.
transAxes
)
ax
.
set_xticks
([])
ax
.
set_xticks
([])
ax
.
set_yticks
([])
ax
.
set_yticks
([])
...
...
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