Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
irp
Fresnel
Commits
e5433fbb
Commit
e5433fbb
authored
May 10, 2021
by
Leon Merten Lohse
Browse files
Change scaling of coefficients for FD solver
parent
c1452b4d
Pipeline
#195047
passed with stages
in 1 minute
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
fresnel/finite_differences.py
View file @
e5433fbb
...
...
@@ -27,13 +27,13 @@ class Solver2d:
self
.
f
=
self
.
_compute_f
(
F0
)
def
_compute_rz
(
self
,
Az
):
return
Az
*
2
*
self
.
dx
**
2
/
self
.
dz
*
(
1
+
0j
)
return
2
*
Az
/
self
.
dz
*
(
1
+
0j
)
def
_compute_rxx
(
self
,
Axx
):
return
-
Axx
*
(
1
+
0j
)
return
-
Axx
/
self
.
dx
**
2
*
(
1
+
0j
)
def
_compute_f
(
self
,
F
):
return
F
*
self
.
dx
**
2
*
self
.
_ones
return
F
*
self
.
_ones
def
step
(
self
,
F
,
boundary
):
...
...
@@ -78,16 +78,16 @@ class Solver2dSym:
self
.
f
=
self
.
_compute_f
(
F0
)
def
_compute_rz
(
self
,
Az
):
return
Az
*
2
*
self
.
dx
**
2
/
self
.
dz
*
(
1
+
0j
)
return
2
*
Az
/
self
.
dz
*
(
1
+
0j
)
def
_compute_rxx
(
self
,
Axx
):
return
-
Axx
*
(
1
+
0j
)
return
-
Axx
/
self
.
dx
**
2
*
(
1
+
0j
)
def
_compute_rx
(
self
,
Ax
):
return
-
Ax
*
(
1
+
0j
)
return
-
Ax
/
self
.
dx
**
2
*
(
1
+
0j
)
def
_compute_f
(
self
,
F
):
return
F
*
self
.
dx
**
2
*
self
.
_ones
return
F
*
self
.
_ones
def
step
(
self
,
F
,
boundary
):
...
...
@@ -135,16 +135,16 @@ class Solver3d:
self
.
f
=
self
.
_compute_f
(
F0
)
def
_compute_rz
(
self
,
Az
):
return
Az
*
2
*
self
.
dx
*
*
2
/
self
.
dz
*
(
1
+
0j
)
return
2
*
Az
*
2
/
self
.
dz
*
(
1
+
0j
)
def
_compute_rxx
(
self
,
Axx
):
return
-
Axx
*
(
1
+
0j
)
return
-
Axx
/
self
.
dx
**
2
*
(
1
+
0j
)
def
_compute_ryy
(
self
,
Ayy
):
return
-
Ayy
*
self
.
dx
**
2
/
self
.
dy
**
2
*
(
1
+
0j
)
return
-
Ayy
/
self
.
dy
**
2
*
(
1
+
0j
)
def
_compute_f
(
self
,
F
):
return
F
*
self
.
dx
**
2
/
2
*
self
.
_ones
return
F
/
2
*
self
.
_ones
def
step
(
self
,
F
,
boundary
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment