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
e4806545
Commit
e4806545
authored
2 years ago
by
Guillaume Demesy
Browse files
Options
Downloads
Patches
Plain Diff
clean up
parent
7bdf04b9
No related branches found
No related tags found
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_theta.sh
+0
-50
0 additions, 50 deletions
DiffractionGratings/grating3D_parallel_Mmatrix_theta.sh
DiffractionGratings/gratings_clean_all.sh
+10
-2
10 additions, 2 deletions
DiffractionGratings/gratings_clean_all.sh
with
10 additions
and
52 deletions
DiffractionGratings/grating3D_parallel_Mmatrix_theta.sh
deleted
100644 → 0
+
0
−
50
View file @
7bdf04b9
#!/bin/bash
export
OPENBLAS_NUM_THREADS
=
1
export
OMP_NUM_THREADS
=
1
export
NPROC
=
1
export
nb_lam
=
1
export
nb_theta
=
1
export
lambda_min
=
400
export
lambda_max
=
1200
export
FLAG_TOTAL
=
0
export
GRATING_CASE
=
"half_ellipsoid"
export
myDir
=
"res_Matrix_nb_lam"
$nb_lam
"_nb_theta"
$nb_theta
"_total"
$FLAG_TOTAL
rm
-r
$myDir
mkdir
$myDir
gmsh grating3D.geo
-setstring
test_case
$GRATING_CASE
-3
-o
grating3D.msh
myfunc
()
{
local
mysubDir
=
$myDir
/run_lam
$1_theta$2_psi$3
mkdir
$mysubDir
cp
grating3D.msh grating3D.pro grating3D_data_
$GRATING_CASE
.geo grating3D_data.geo grating3D_materials.pro
$mysubDir
if
((
$nb_lam
==
1
))
then
local
lam
=
$(
echo
"scale=10;
$lambda_min
"
| bc
)
else
local
lam
=
$(
echo
"scale=10;
$lambda_min
+(
$lambda_max
-
$lambda_min
)/(
$nb_lam
-1)*
$1
"
| bc
)
fi
local
theta
=
$(
echo
"scale=10;50/(
$nb_theta
-1)*
$2
"
| bc
)
local
psi
=
$(
echo
"scale=10;90*
$3
"
| bc
)
cd
$mysubDir
getdp grating3D.pro
-pre
helmholtz_vector
-msh
grating3D.msh
-cal
-pos
postop_helmholtz_vector
-petsc_prealloc
200
-setstring
test_case
$GRATING_CASE
-setnumber
lambda0
$lam
-setnumber
thetadeg
$theta
-setnumber
phideg 90
-setnumber
psideg
$psi
-setnumber
FLAG_TOTAL
$FLAG_TOTAL
if
[
$3
-eq
0
]
;
then
cp
res3D/rs.txt ../r_pin_sout_lam
$1_theta$2
.out
;
fi
if
[
$3
-eq
0
]
;
then
cp
res3D/rp.txt ../r_pin_pout_lam
$1_theta$2
.out
;
fi
if
[
$3
-eq
1
]
;
then
cp
res3D/rs.txt ../r_sin_sout_lam
$1_theta$2
.out
;
fi
if
[
$3
-eq
1
]
;
then
cp
res3D/rp.txt ../r_sin_pout_lam
$1_theta$2
.out
;
fi
if
[
$3
-eq
0
]
;
then
cp
res3D/ts.txt ../t_pin_sout_lam
$1_theta$2
.out
;
fi
if
[
$3
-eq
0
]
;
then
cp
res3D/tp.txt ../t_pin_pout_lam
$1_theta$2
.out
;
fi
if
[
$3
-eq
1
]
;
then
cp
res3D/ts.txt ../t_sin_sout_lam
$1_theta$2
.out
;
fi
if
[
$3
-eq
1
]
;
then
cp
res3D/tp.txt ../t_sin_pout_lam
$1_theta$2
.out
;
fi
cp
res3D/eff_t1.txt ../eff_t1_lam
$1_theta$2_psi$3
.out
cp
res3D/eff_r1.txt ../eff_r1_lam
$1_theta$2_psi$3
.out
cp
res3D/eff_t2.txt ../eff_t2_lam
$1_theta$2_psi$3
.out
cp
res3D/eff_r2.txt ../eff_r2_lam
$1_theta$2_psi$3
.out
cp
res3D/temp-Q_scat.txt ../Q_scat_lam
$1_theta$2_psi$3
.out
cd
../..
rm
-r
$mysubDir
}
export
-f
myfunc
parallel
-j
$NPROC
myfunc :::
$(
seq
0
$((
$nb_lam
-
1
))
)
:::
$(
seq
0
$((
$nb_theta
-
1
))
)
::: 0 1
This diff is collapsed.
Click to expand it.
DiffractionGratings/gratings_clean_all.sh
+
10
−
2
View file @
e4806545
rm
-rf
res2D
*
rm
-rf
res3D
*
rm
-r
res
*
rm
-r
res2D
*
rm
-r
res3D
*
rm
*
.msh
rm
*
.pre
rm
*
.db
rm
*
.pdf
rm
*
.jpg
rm
*
.npz
rm
*
.out
rm
*
.tgz
rm
*
.
*
~
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