Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Veit Lüschow
veros_veit
Commits
93d87c34
Commit
93d87c34
authored
Feb 18, 2020
by
Dion Häfner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
👁
:candy
parent
8334ab70
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
2 deletions
+9
-2
veros/core/streamfunction/streamfunction_init.py
veros/core/streamfunction/streamfunction_init.py
+9
-2
No files found.
veros/core/streamfunction/streamfunction_init.py
View file @
93d87c34
...
...
@@ -134,6 +134,13 @@ def streamfunction_init(vs):
@
veros_method
def
_ascii_map
(
vs
,
boundary_map
):
def
_get_char
(
c
):
if
c
==
0
:
return
'.'
if
c
<
0
:
return
'#'
return
str
(
c
%
10
)
map_string
=
''
linewidth
=
100
imt
=
vs
.
nx
+
4
...
...
@@ -150,8 +157,8 @@ def _ascii_map(vs, boundary_map):
map_string
+=
''
.
join
([
'{:5d}'
.
format
(
istart
+
i
+
1
-
2
)
for
i
in
range
(
1
,
iline
+
1
,
5
)])
map_string
+=
'
\n
'
for
j
in
range
(
vs
.
ny
+
3
,
-
1
,
-
1
):
map_string
+=
'{:3d} '
.
format
(
j
)
+
''
.
join
([
str
(
boundary_map
[
istart
+
i
-
2
,
j
]
%
10
)
if
boundary_map
[
istart
+
i
-
2
,
j
]
>=
0
else
'*'
for
i
in
range
(
2
,
iline
+
2
)])
map_string
+=
'{:3d} '
.
format
(
j
)
map_string
+=
''
.
join
([
_get_char
(
boundary_map
[
istart
+
i
-
2
,
j
]
)
for
i
in
range
(
2
,
iline
+
2
)])
map_string
+=
'
\n
'
map_string
+=
''
.
join
([
'{:5d}'
.
format
(
istart
+
i
+
1
-
2
)
for
i
in
range
(
1
,
iline
+
1
,
5
)])
map_string
+=
'
\n
'
...
...
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