Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
dg
dg
Commits
5354ff02
Commit
5354ff02
authored
Oct 28, 2016
by
Philippe Delandmeter
Browse files
the parallel extrusion was only reading idx files. It now reads also nc
and msh
parent
aec29e24
Pipeline
#1241
passed with stage
in 28 minutes and 19 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
dgpy/scripts/mesh.py
View file @
5354ff02
...
...
@@ -224,6 +224,9 @@ def read_msh(filename, vals={}) :
from
os
import
path
def
read_idx
(
filename
)
:
vals
=
{}
if
filename
[
-
3
:]
==
'msh'
:
read_msh
(
filename
,
vals
)
return
vals
reMerge
=
re
.
compile
(
"\s*Merge\s*
\"
(.*)
\"
\s*;"
)
dirname
=
path
.
dirname
(
filename
)
with
open
(
filename
,
"r"
)
as
f
:
...
...
dgpy/scripts/slimPre.py
View file @
5354ff02
...
...
@@ -841,6 +841,11 @@ def get_distance(region, physical_tags):
return
np
.
array
(
dist
)
def
extrude
(
mesh_file_name
,
bath_file_name
,
nb_layers
=
None
,
z_layers
=
None
,
layers_function
=
None
,
mesh_file_name_out
=
''
,
factor_show
=
0
,
periodicity
=
None
):
if
bath_file_name
[
0
][
-
3
:]
==
".nc"
:
netcdf_to_msh
(
mesh_file_name
,
bath_file_name
[
0
],
bath_file_name
[
1
],
bath_file_name
[
0
][:
-
3
])
bath_file_name
=
bath_file_name
[
0
][:
-
3
]
+
'.msh'
if
dgpy
.
Msg
.
GetCommRank
()
==
0
:
if
(
nb_layers
and
z_layers
)
or
(
nb_layers
and
layers_function
)
or
(
z_layers
and
layers_function
):
...
...
Write
Preview
Supports
Markdown
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