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
4e2c28e8
Commit
4e2c28e8
authored
5 years ago
by
Guillaume Demesy
Browse files
Options
Downloads
Patches
Plain Diff
postpro python
parent
43ead0e8
No related branches found
No related tags found
1 merge request
!4
Grating3d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
DiffractionGratings/grating3D.pro
+4
-4
4 additions, 4 deletions
DiffractionGratings/grating3D.pro
DiffractionGratings/grating3D_postplot.py
+11
-0
11 additions, 0 deletions
DiffractionGratings/grating3D_postplot.py
with
15 additions
and
4 deletions
DiffractionGratings/grating3D.pro
+
4
−
4
View file @
4e2c28e8
...
...
@@ -392,10 +392,10 @@ PostOperation {
EndIf
EndIf
// // For DEBUG
//
Print [ epsr_xx , OnElementsOf Omega, File StrCat[myDir,"epsr_xx.pos"];
// Print [ Ecm , OnElementsOf Omega_plot, File StrCat[myDir,"Ecm.pos"];
// Print [ E1, OnElementsOf Omega_plot, File StrCat[myDir,"E1.pos"];
// Print [ Damp_pml_top, OnElementsOf PMLtop, File StrCat[myDir,"Damp_pml_top.pos"];
Print
[
epsr_xx
,
OnElementsOf
Omega
,
File
StrCat
[
myDir
,
"epsr_xx.pos"
]
]
;
// Print [ Ecm , OnElementsOf Omega_plot, File StrCat[myDir,"Ecm.pos"]
]
;
// Print [ E1, OnElementsOf Omega_plot, File StrCat[myDir,"E1.pos"]
]
;
// Print [ Damp_pml_top, OnElementsOf PMLtop, File StrCat[myDir,"Damp_pml_top.pos"]
]
;
// For i In {0:nb_slice-1}
// Print [ Etot , OnPlane { {-period_x/2+small_delta,-period_y/2+small_delta,zcut_sub~{i}} {-period_x/2+small_delta,period_y/2-small_delta,zcut_sub~{i}} {period_x/2-small_delta,-period_y/2+small_delta,zcut_sub~{i}} } {ninterv_integ,ninterv_integ} , File StrCat[myDir,> "./Views/Etot_XYcut.out",Format Table];
// Print [ Edif , OnPlane { {-period_x/2+small_delta,-period_y/2+small_delta,zcut_sup~{i}} {-period_x/2+small_delta,period_y/2-small_delta,zcut_sup~{i}} {period_x/2-small_delta,-period_y/2+small_delta,zcut_sup~{i}} } {ninterv_integ,ninterv_integ} , File StrCat[myDir,> "./Views/Edif_XYcut.out",Format Table];
...
...
This diff is collapsed.
Click to expand it.
DiffractionGratings/grating3D_postplot.py
0 → 100644
+
11
−
0
View file @
4e2c28e8
import
numpy
as
np
Rnm
=
np
.
loadtxt
(
'
eff_r.txt
'
)[:,
1
]
Tnm
=
np
.
loadtxt
(
'
eff_t.txt
'
)[:,
1
]
Q
=
[
np
.
loadtxt
(
'
temp-Q_L_%g.txt
'
%
k
)[
1
]
for
k
in
range
(
2
,
7
)]
Q
.
append
(
np
.
loadtxt
(
'
temp-Q_scat.txt
'
)[
1
])
Q
=
np
.
array
(
Q
)
TOT
=
Rnm
.
sum
()
+
Tnm
.
sum
()
+
Q
.
sum
()
print
(
'
Rtot
'
,
Rnm
.
sum
())
print
(
'
Ttot
'
,
Tnm
.
sum
())
print
(
'
Atot
'
,
Q
.
sum
())
print
(
'
TOT
'
,
TOT
)
\ No newline at end of file
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