Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
dg
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
Package Registry
Model registry
Operate
Environments
Terraform modules
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
gmsh
dg
Commits
eda8b0bc
Commit
eda8b0bc
authored
2 years ago
by
Matteo Cicuttin
Browse files
Options
Downloads
Patches
Plain Diff
Fixed resonator example for multiple MPI processes.
parent
d2237ab0
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
share/examples/resonator/params_resonator_gmshfem_comparison.lua
+15
-8
15 additions, 8 deletions
...xamples/resonator/params_resonator_gmshfem_comparison.lua
share/examples/resonator/params_test_maxwell_resonator.lua
+16
-9
16 additions, 9 deletions
share/examples/resonator/params_test_maxwell_resonator.lua
with
31 additions
and
17 deletions
share/examples/resonator/params_resonator_gmshfem_comparison.lua
+
15
−
8
View file @
eda8b0bc
...
...
@@ -16,13 +16,20 @@ postpro["E"].silo_mode = "zonal"
postpro
[
"H"
].
silo_mode
=
"none"
postpro
[
"J"
].
silo_mode
=
"none"
local
epsr
=
1
local
mur
=
1
local
epsr
=
1
.
0
local
mur
=
1
.
0
materials
[
1
]
=
{}
materials
[
1
].
epsilon
=
epsr
materials
[
1
].
mu
=
mur
materials
[
1
].
sigma
=
0
materials
.
epsilon
=
function
(
tag
,
x
,
y
,
z
)
return
epsr
;
end
materials
.
mu
=
function
(
tag
,
x
,
y
,
z
)
return
mur
;
end
materials
.
sigma
=
function
(
tag
,
x
,
y
,
z
)
return
0
.
0
;
end
function
electric_initial_condition
(
x
,
y
,
z
)
local
Ex
=
0
...
...
@@ -57,8 +64,8 @@ local resonance_f = omega/(2*math.pi)
local
resonance_MHz
=
resonance_f
/
1e6
local
cycle_timesteps
=
1
/
(
resonance_f
*
sim
.
dt
)
-- Compute impedance
local
eps
=
materials
[
1
].
epsilon
*
const
.
eps0
local
mu
=
m
aterials
[
1
].
m
u
*
const
.
mu0
local
eps
=
epsr
*
const
.
eps0
local
mu
=
mu
r
*
const
.
mu0
local
k_sq
=
(
omega
*
mu
)
*
(
omega
*
eps
)
local
kc_sq
=
u
*
u
+
v
*
v
local
beta
=
math.sqrt
(
k_sq
-
kc_sq
)
...
...
This diff is collapsed.
Click to expand it.
share/examples/resonator/params_test_maxwell_resonator.lua
+
16
−
9
View file @
eda8b0bc
...
...
@@ -6,7 +6,7 @@ sim.name = "test_maxwell_resonator" -- simulation name
sim
.
dt
=
1e-12
-- timestep size
sim
.
timesteps
=
501
-- num of iterations
sim
.
gmsh_model
=
"resonator.geo"
-- gmsh model filename
sim
.
use_gpu
=
1
-- 0: cpu, 1: gpu
sim
.
use_gpu
=
0
-- 0: cpu, 1: gpu
sim
.
approx_order
=
3
-- approximation order
sim
.
time_integrator
=
"leapfrog"
postpro
.
silo_output_rate
=
100
...
...
@@ -16,13 +16,20 @@ postpro["E"].silo_mode = "nodal"
postpro
[
"H"
].
silo_mode
=
"nodal"
postpro
[
"J"
].
silo_mode
=
"none"
local
epsr
=
1
local
mur
=
1
local
epsr
=
1
.
0
local
mur
=
1
.
0
materials
[
1
]
=
{}
materials
[
1
].
epsilon
=
epsr
materials
[
1
].
mu
=
mur
materials
[
1
].
sigma
=
0
materials
.
epsilon
=
function
(
tag
,
x
,
y
,
z
)
return
epsr
;
end
materials
.
mu
=
function
(
tag
,
x
,
y
,
z
)
return
mur
;
end
materials
.
sigma
=
function
(
tag
,
x
,
y
,
z
)
return
0
.
0
;
end
function
electric_initial_condition
(
x
,
y
,
z
)
local
Ex
=
0
...
...
@@ -57,8 +64,8 @@ local resonance_f = omega/(2*math.pi)
local
resonance_MHz
=
resonance_f
/
1e6
local
cycle_timesteps
=
1
/
(
resonance_f
*
sim
.
dt
)
-- Compute impedance
local
eps
=
materials
[
1
].
epsilon
*
const
.
eps0
local
mu
=
m
aterials
[
1
].
m
u
*
const
.
mu0
local
eps
=
epsr
*
const
.
eps0
local
mu
=
mu
r
*
const
.
mu0
local
k_sq
=
(
omega
*
mu
)
*
(
omega
*
eps
)
local
kc_sq
=
u
*
u
+
v
*
v
local
beta
=
math.sqrt
(
k_sq
-
kc_sq
)
...
...
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