Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
shalava
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
Keyboard shortcuts
?
Snippets
Groups
Projects
Due to inactivity, this project is scheduled to be deleted on 2036-01-29.
Why is this scheduled?
Show more breadcrumbs
rheolef
shalava
Commits
3ab9cbc9
Commit
3ab9cbc9
authored
5 years ago
by
Noe Bernabeu
Browse files
Options
Downloads
Patches
Plain Diff
correction adim and geojson reading
parent
e1fc4007
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
lavaview.cc
+1
-1
1 addition, 1 deletion
lavaview.cc
page5_simulation.py
+8
-1
8 additions, 1 deletion
page5_simulation.py
with
9 additions
and
2 deletions
lavaview.cc
+
1
−
1
View file @
3ab9cbc9
...
...
@@ -384,7 +384,7 @@ int main (int argc, char **argv) {
field
h_plus
=
L
*
interpolate
(
Xh
,
max
(
0.
,
h
));
odiststream
ovtk
(
"output-"
+
itos
(
k
)
+
".branch"
);
branch
vtk_event
(
"t"
,
"time"
,
"h"
,
"f"
,
"f+h"
,
"u_parallel"
);
ovtk
<<
vtk_event
(
timer
*
T_carac
,
time_h
,
h_plus
*
L
,
fh
,
fh
+
h
,
U
*
u_parallel
);
ovtk
<<
vtk_event
(
timer
*
T_carac
,
time_h
,
h_plus
,
fh
,
fh
+
h
,
u_parallel
);
if
(
k
==
k_max
)
break
;
if
(
timer
>
tf_adim
)
break
;
//if (norm_L2_dh_dt < epsilon) break;
...
...
This diff is collapsed.
Click to expand it.
page5_simulation.py
+
8
−
1
View file @
3ab9cbc9
...
...
@@ -109,7 +109,14 @@ class page5():
data
=
json
.
load
(
f
)
for
feature
in
data
[
'
features
'
]:
my_file
=
open
(
"
final_shape0.tmp
"
,
"
w
"
)
#erase
for
vertex
in
feature
[
'
geometry
'
][
'
coordinates
'
]:
list_of_coordinates
=
feature
[
'
geometry
'
][
'
coordinates
'
]
try
:
float
(
list_of_coordinates
[
0
][
0
])
#if len(list_of_coordinates)==1: #from GeoJson,list_of_coordinates=[[coordinate]] 1 hook too much
except
:
list_of_coordinates
=
list_of_coordinates
[
0
]
del
list_of_coordinates
[
-
1
]
for
vertex
in
list_of_coordinates
:
utm_convert
=
utm
.
from_latlon
(
vertex
[
1
],
vertex
[
0
])
my_file
.
write
(
str
(
utm_convert
[
0
])
+
"
"
+
str
(
utm_convert
[
1
])
+
"
\n
"
)
my_file
.
close
()
...
...
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