Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
S
SWE
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Gaurav Kukreja
SWE
Commits
9a775796
Commit
9a775796
authored
Jan 18, 2013
by
Sebastian Rettenberger
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into SSE_performance_measure
parents
93a4ae11
60d0d798
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
4 deletions
+15
-4
SConstruct
SConstruct
+2
-1
NetCdfWriter.cpp
src/writer/NetCdfWriter.cpp
+8
-2
NetCdfWriter.hh
src/writer/NetCdfWriter.hh
+5
-1
No files found.
SConstruct
View file @
9a775796
...
@@ -195,6 +195,7 @@ env.Append(CCFLAGS=['-fstrict-aliasing', '-fargument-noalias'])
...
@@ -195,6 +195,7 @@ env.Append(CCFLAGS=['-fstrict-aliasing', '-fargument-noalias'])
# Vectorization?
# Vectorization?
if
env
[
'compileMode'
]
==
'release'
and
env
[
'vectorize'
]:
if
env
[
'compileMode'
]
==
'release'
and
env
[
'vectorize'
]:
env
.
Append
(
CPPDEFINES
=
[
'VECTORIZE'
])
env
.
Append
(
CPPDEFINES
=
[
'VECTORIZE'
])
if
env
[
'compiler'
]
==
'intel'
:
env
.
Append
(
CCFLAGS
=
[
'-xHost'
])
env
.
Append
(
CCFLAGS
=
[
'-xHost'
])
if
env
[
'compiler'
]
==
'intel'
and
env
[
'showVectorization'
]:
if
env
[
'compiler'
]
==
'intel'
and
env
[
'showVectorization'
]:
env
.
Append
(
CCFLAGS
=
[
'-vec-report2'
])
env
.
Append
(
CCFLAGS
=
[
'-vec-report2'
])
...
...
src/writer/NetCdfWriter.cpp
View file @
9a775796
...
@@ -43,6 +43,7 @@
...
@@ -43,6 +43,7 @@
* @param i_dY cell size in y-direction.
* @param i_dY cell size in y-direction.
* @param i_originX
* @param i_originX
* @param i_originY
* @param i_originY
* @param i_flush If > 0, flush data to disk every i_flush write operation
* @param i_dynamicBathymetry
* @param i_dynamicBathymetry
*/
*/
io
::
NetCdfWriter
::
NetCdfWriter
(
const
std
::
string
&
i_baseName
,
io
::
NetCdfWriter
::
NetCdfWriter
(
const
std
::
string
&
i_baseName
,
...
@@ -50,9 +51,11 @@ io::NetCdfWriter::NetCdfWriter( const std::string &i_baseName,
...
@@ -50,9 +51,11 @@ io::NetCdfWriter::NetCdfWriter( const std::string &i_baseName,
const
BoundarySize
&
i_boundarySize
,
const
BoundarySize
&
i_boundarySize
,
int
i_nX
,
int
i_nY
,
int
i_nX
,
int
i_nY
,
float
i_dX
,
float
i_dY
,
float
i_dX
,
float
i_dY
,
float
i_originX
,
float
i_originY
)
:
float
i_originX
,
float
i_originY
,
unsigned
int
i_flush
)
:
//const bool &i_dynamicBathymetry) : //!TODO
//const bool &i_dynamicBathymetry) : //!TODO
io
::
Writer
(
i_baseName
+
".nc"
,
i_b
,
i_boundarySize
,
i_nX
,
i_nY
)
io
::
Writer
(
i_baseName
+
".nc"
,
i_b
,
i_boundarySize
,
i_nX
,
i_nY
),
flush
(
i_flush
)
{
{
int
status
;
int
status
;
...
@@ -216,4 +219,7 @@ void io::NetCdfWriter::writeTimeStep( const Float2D &i_h,
...
@@ -216,4 +219,7 @@ void io::NetCdfWriter::writeTimeStep( const Float2D &i_h,
// Increment timeStep for next call
// Increment timeStep for next call
timeStep
++
;
timeStep
++
;
if
(
flush
>
0
&&
timeStep
%
flush
==
0
)
nc_sync
(
dataFile
);
}
}
src/writer/NetCdfWriter.hh
View file @
9a775796
...
@@ -48,6 +48,9 @@ private:
...
@@ -48,6 +48,9 @@ private:
/** Variable ids */
/** Variable ids */
int
timeVar
,
hVar
,
huVar
,
hvVar
,
bVar
;
int
timeVar
,
hVar
,
huVar
,
hvVar
,
bVar
;
/** Flush after every x write operation? */
unsigned
int
flush
;
// writer time dependent variables.
// writer time dependent variables.
void
writeVarTimeDependent
(
const
Float2D
&
i_matrix
,
void
writeVarTimeDependent
(
const
Float2D
&
i_matrix
,
int
i_ncVariable
);
int
i_ncVariable
);
...
@@ -63,7 +66,8 @@ private:
...
@@ -63,7 +66,8 @@ private:
const
BoundarySize
&
i_boundarySize
,
const
BoundarySize
&
i_boundarySize
,
int
i_nX
,
int
i_nY
,
int
i_nX
,
int
i_nY
,
float
i_dX
,
float
i_dY
,
float
i_dX
,
float
i_dY
,
float
i_originX
=
0.
,
float
i_originY
=
0.
);
float
i_originX
=
0.
,
float
i_originY
=
0.
,
unsigned
int
i_flush
=
0
);
virtual
~
NetCdfWriter
();
virtual
~
NetCdfWriter
();
// writes the unknowns at a given time step to the netCDF-file.
// writes the unknowns at a given time step to the netCDF-file.
...
...
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