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