Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
easyWave
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Merge Requests
0
Merge Requests
0
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
geoperil
easyWave
Commits
b940b99c
Commit
b940b99c
authored
Mar 06, 2014
by
Johannes Spazier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- The reading of ASCII grid input files that was broken in previous revisions has been fixed.
- Flushing the output explicitly.
parent
9e4d7de8
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
49 additions
and
24 deletions
+49
-24
code/branches/multi-gpu/EasyWave.cu
code/branches/multi-gpu/EasyWave.cu
+3
-1
code/branches/multi-gpu/ewGrid.cpp
code/branches/multi-gpu/ewGrid.cpp
+46
-23
No files found.
code/branches/multi-gpu/EasyWave.cu
View file @
b940b99c
...
...
@@ -135,6 +135,8 @@ int main( int argc, char **argv )
}
}
fflush
(
stdout
);
if
(
Par
.
outDump
)
{
if
(
(
elapsed
-
lastDump
)
>=
Par
.
outDump
)
{
Node
.
copyIntermediate
();
...
...
code/branches/multi-gpu/ewGrid.cpp
View file @
b940b99c
...
...
@@ -99,6 +99,8 @@ int ewLoadBathymetry()
Dx
=
Re
*
g2r
(
DLon
);
// in m along the equator
Dy
=
Re
*
g2r
(
DLat
);
if
(
isBin
)
{
/* NOTE: optimal would be reading everything in one step, but that does not work because rows and columns are transposed
* (only possible with binary data at all) - use temporary buffer for now (consumes additional memory!) */
float
*
buf
=
new
float
[
NLat
*
NLon
];
...
...
@@ -112,8 +114,6 @@ int ewLoadBathymetry()
if
(
isBin
)
fval
=
buf
[
(
j
-
1
)
*
NLon
+
(
i
-
1
)
];
//ierr = fread( &fval, sizeof(float), 1, fp );
else
ierr
=
fscanf
(
fp
,
" %f "
,
&
fval
);
Node
(
m
,
iTopo
)
=
fval
;
Node
(
m
,
iTime
)
=
-
1
;
...
...
@@ -130,6 +130,29 @@ int ewLoadBathymetry()
delete
[]
buf
;
}
else
{
for
(
j
=
1
;
j
<=
NLat
;
j
++
)
{
for
(
i
=
1
;
i
<=
NLon
;
i
++
)
{
m
=
idx
(
j
,
i
);
ierr
=
fscanf
(
fp
,
" %f "
,
&
fval
);
Node
(
m
,
iTopo
)
=
fval
;
Node
(
m
,
iTime
)
=
-
1
;
Node
(
m
,
iD
)
=
-
fval
;
if
(
Node
(
m
,
iD
)
<
0
)
{
Node
(
m
,
iD
)
=
0.0
f
;
}
else
if
(
Node
(
m
,
iD
)
<
Par
.
dmin
)
{
Node
(
m
,
iD
)
=
Par
.
dmin
;
}
}
}
}
for
(
k
=
1
;
k
<
MAX_VARS_PER_NODE
-
2
;
k
++
)
{
Node
.
initMemory
(
k
,
0
);
}
...
...
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