Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
iwr
amdis
Commits
5857b717
Commit
5857b717
authored
May 04, 2013
by
Praetorius, Simon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
FileWriter now support output after regular time intervals
parent
7cb51bdd
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
31 additions
and
5 deletions
+31
-5
AMDiS/src/ProblemStat.cc
AMDiS/src/ProblemStat.cc
+1
-1
AMDiS/src/io/FileWriter.cc
AMDiS/src/io/FileWriter.cc
+9
-2
AMDiS/src/io/FileWriter.h
AMDiS/src/io/FileWriter.h
+9
-0
AMDiS/src/io/FileWriter.hh
AMDiS/src/io/FileWriter.hh
+12
-2
No files found.
AMDiS/src/ProblemStat.cc
View file @
5857b717
...
...
@@ -905,7 +905,7 @@ namespace AMDiS {
solverMatrix
.
setMatrix
(
*
systemMatrix
);
INFO
(
info
,
8
)(
"fillin of assembled matrix: %d
\n
"
,
nnz
);
}
}
#ifdef HAVE_PARALLEL_DOMAIN_AMDIS
...
...
AMDiS/src/io/FileWriter.cc
View file @
5857b717
...
...
@@ -68,8 +68,15 @@ namespace AMDiS {
{
FUNCNAME
(
"FileWriterTemplated<T>::writeFiles()"
);
if
((
adaptInfo
->
getTimestepNumber
()
%
tsModulo
!=
0
)
&&
!
force
)
return
;
if
(
timeModulo
>
0.0
)
{
if
((
adaptInfo
->
getTime
()
<
lastWriteTime
+
timeModulo
)
&&
!
force
)
return
;
}
else
{
if
((
adaptInfo
->
getTimestepNumber
()
%
tsModulo
!=
0
)
&&
!
force
)
return
;
}
lastWriteTime
=
adaptInfo
->
getTime
();
// Containers, which store the data to be written;
std
::
vector
<
DataCollector
<>*>
dataCollectors
(
solutionVecs
.
size
());
...
...
AMDiS/src/io/FileWriter.h
View file @
5857b717
...
...
@@ -122,6 +122,11 @@ namespace AMDiS {
int
level
=
-
1
,
Flag
traverseFlag
=
Mesh
::
CALL_LEAF_EL
,
bool
(
*
writeElem
)(
ElInfo
*
)
=
NULL
);
vector
<
pair
<
double
,
string
>
>&
getParaviewAnimationFrames
()
{
return
paraviewAnimationFrames
;
}
protected:
/// Initialization of the filewriter.
...
...
@@ -202,6 +207,10 @@ namespace AMDiS {
/// Timestep modulo: write only every tsModulo-th timestep!
int
tsModulo
;
/// Time modulo: write at first iteration after lastWriteTime + timeModulo
double
timeModulo
;
double
lastWriteTime
;
/// Stores a set of pairs of timepoint and filename to write a ParaView
/// animation file.
...
...
AMDiS/src/io/FileWriter.hh
View file @
5857b717
...
...
@@ -120,6 +120,8 @@ namespace AMDiS {
indexLength
=
5
;
indexDecimals
=
3
;
tsModulo
=
1
;
timeModulo
=
-
1.0
;
lastWriteTime
=
0.0
;
nTmpSolutions
=
0
;
paraviewAnimationFrames
.
resize
(
0
),
compression
=
NONE
;
...
...
@@ -148,6 +150,7 @@ namespace AMDiS {
Parameters
::
get
(
name
+
"->index length"
,
indexLength
);
Parameters
::
get
(
name
+
"->index decimals"
,
indexDecimals
);
Parameters
::
get
(
name
+
"->write every i-th timestep"
,
tsModulo
);
Parameters
::
get
(
name
+
"->write after timestep"
,
timeModulo
);
Parameters
::
get
(
name
+
"->Povray format"
,
writePovrayFormat
);
Parameters
::
get
(
name
+
"->Povray template"
,
povrayTemplate
);
...
...
@@ -176,9 +179,16 @@ namespace AMDiS {
{
FUNCNAME
(
"FileWriterTemplated<T>::writeFiles()"
);
if
((
adaptInfo
->
getTimestepNumber
()
%
tsModulo
!=
0
)
&&
!
force
)
return
;
if
(
timeModulo
>
0.0
)
{
if
((
adaptInfo
->
getTime
()
<
lastWriteTime
+
timeModulo
)
&&
!
force
)
return
;
}
else
{
if
((
adaptInfo
->
getTimestepNumber
()
%
tsModulo
!=
0
)
&&
!
force
)
return
;
}
lastWriteTime
=
adaptInfo
->
getTime
();
// Containers, which store the data to be written;
std
::
vector
<
DataCollector
<
T
>*>
dataCollectors
(
solutionVecs
.
size
());
...
...
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