Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Backofen, Rainer
amdis
Commits
83dd4be1
Commit
83dd4be1
authored
Aug 07, 2008
by
Thomas Witkowski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* Small bug fixes
parent
18c0eba3
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
127 additions
and
102 deletions
+127
-102
AMDiS/README
AMDiS/README
+1
-1
AMDiS/src/AdaptBase.h
AMDiS/src/AdaptBase.h
+8
-8
AMDiS/src/AdaptInstationary.cc
AMDiS/src/AdaptInstationary.cc
+65
-58
AMDiS/src/AdaptInstationary.h
AMDiS/src/AdaptInstationary.h
+1
-1
AMDiS/src/AdaptStationary.cc
AMDiS/src/AdaptStationary.cc
+12
-12
AMDiS/src/DOFVector.hh
AMDiS/src/DOFVector.hh
+13
-12
AMDiS/src/ElementFileWriter.cc
AMDiS/src/ElementFileWriter.cc
+4
-2
AMDiS/src/FileWriter.cc
AMDiS/src/FileWriter.cc
+3
-0
AMDiS/src/ProblemIterationInterface.h
AMDiS/src/ProblemIterationInterface.h
+3
-1
AMDiS/src/ProblemScal.h
AMDiS/src/ProblemScal.h
+9
-3
AMDiS/src/Serializer.h
AMDiS/src/Serializer.h
+8
-4
No files found.
AMDiS/README
View file @
83dd4be1
...
...
@@ -65,7 +65,7 @@ The runtime will increase by factor 5 to 6 without --enable-debug!
5) Run the configure script:
./configure --prefix=`pwd` --with-mpi=/licsoft/libraries/openmpi/1.2.
4
/64bit --enable-parmetis
./configure --prefix=`pwd` --with-mpi=/licsoft/libraries/openmpi/1.2.
6
/64bit --enable-parmetis
You may also enable --enable-debug.
...
...
AMDiS/src/AdaptBase.h
View file @
83dd4be1
...
...
@@ -43,14 +43,14 @@ namespace AMDiS {
/** \brief
* Constructor
*/
AdaptBase
(
const
::
std
::
string
&
name
,
AdaptBase
(
const
::
std
::
string
&
name
,
ProblemIterationInterface
*
problemIteration
,
AdaptInfo
*
adaptInfo
,
ProblemTimeInterface
*
problemTime
=
NULL
,
AdaptInfo
*
initialAdaptInfo
=
NULL
)
AdaptInfo
*
adaptInfo
_
,
ProblemTimeInterface
*
problemTime
=
NULL
,
AdaptInfo
*
initialAdaptInfo
=
NULL
)
:
name_
(
name
),
problemIteration_
(
problemIteration
),
adaptInfo
_
(
adaptInfo
),
adaptInfo
(
adaptInfo
_
),
problemTime_
(
problemTime
),
initialAdaptInfo_
(
initialAdaptInfo
)
{};
...
...
@@ -85,10 +85,10 @@ namespace AMDiS {
};
/** \brief
* Returns \ref adaptInfo
_
* Returns \ref adaptInfo
*/
inline
AdaptInfo
*
getAdaptInfo
()
{
return
adaptInfo
_
;
return
adaptInfo
;
};
/** \brief
...
...
@@ -123,7 +123,7 @@ namespace AMDiS {
/** \brief
* Main adapt info
*/
AdaptInfo
*
adaptInfo
_
;
AdaptInfo
*
adaptInfo
;
/** \brief
* problem time interface
...
...
AMDiS/src/AdaptInstationary.cc
View file @
83dd4be1
...
...
@@ -77,24 +77,24 @@ namespace AMDiS {
FUNCNAME
(
"AdaptInstationary::explicitTimeStrategy()"
);
// estimate before first adaption
if
(
adaptInfo
_
->
getTime
()
<=
adaptInfo
_
->
getStartTime
())
{
problemIteration_
->
oneIteration
(
adaptInfo
_
,
ESTIMATE
);
if
(
adaptInfo
->
getTime
()
<=
adaptInfo
->
getStartTime
())
{
problemIteration_
->
oneIteration
(
adaptInfo
,
ESTIMATE
);
}
// increment time
adaptInfo
_
->
setTime
(
adaptInfo
_
->
getTime
()
+
adaptInfo
_
->
getTimestep
());
adaptInfo
->
setTime
(
adaptInfo
->
getTime
()
+
adaptInfo
->
getTimestep
());
problemTime_
->
setTime
(
adaptInfo
_
);
problemTime_
->
setTime
(
adaptInfo
);
INFO
(
info_
,
6
)(
"time = %e, timestep = %e
\n
"
,
adaptInfo
_
->
getTime
(),
adaptInfo
_
->
getTimestep
());
adaptInfo
->
getTime
(),
adaptInfo
->
getTimestep
());
adaptInfo
_
->
setSpaceIteration
(
0
);
adaptInfo
->
setSpaceIteration
(
0
);
// do the iteration
problemIteration_
->
beginIteration
(
adaptInfo
_
);
problemIteration_
->
oneIteration
(
adaptInfo
_
,
FULL_ITERATION
);
problemIteration_
->
endIteration
(
adaptInfo
_
);
problemIteration_
->
beginIteration
(
adaptInfo
);
problemIteration_
->
oneIteration
(
adaptInfo
,
FULL_ITERATION
);
problemIteration_
->
endIteration
(
adaptInfo
);
}
void
AdaptInstationary
::
implicitTimeStrategy
()
...
...
@@ -102,54 +102,54 @@ namespace AMDiS {
FUNCNAME
(
"AdaptInstationary::implicitTimeStrategy()"
);
do
{
adaptInfo
_
->
setTime
(
adaptInfo
_
->
getTime
()
+
adaptInfo
_
->
getTimestep
());
problemTime_
->
setTime
(
adaptInfo
_
);
adaptInfo
->
setTime
(
adaptInfo
->
getTime
()
+
adaptInfo
->
getTimestep
());
problemTime_
->
setTime
(
adaptInfo
);
INFO
(
info_
,
6
)(
"time = %e, try timestep = %e
\n
"
,
adaptInfo
_
->
getTime
(),
adaptInfo
_
->
getTimestep
());
adaptInfo
->
getTime
(),
adaptInfo
->
getTimestep
());
problemIteration_
->
oneIteration
(
adaptInfo
_
,
NO_ADAPTION
);
problemIteration_
->
oneIteration
(
adaptInfo
,
NO_ADAPTION
);
adaptInfo
_
->
incTimestepIteration
();
adaptInfo
->
incTimestepIteration
();
if
(
!
fixedTimestep_
&&
!
adaptInfo
_
->
timeToleranceReached
()
&&
!
adaptInfo
_
->
getTimestep
()
<=
adaptInfo
_
->
getMinTimestep
())
!
adaptInfo
->
timeToleranceReached
()
&&
!
adaptInfo
->
getTimestep
()
<=
adaptInfo
->
getMinTimestep
())
{
adaptInfo
_
->
setTime
(
adaptInfo
_
->
getTime
()
-
adaptInfo
_
->
getTimestep
());
adaptInfo
_
->
setTimestep
(
adaptInfo
_
->
getTimestep
()
*
time_delta_1
);
adaptInfo
->
setTime
(
adaptInfo
->
getTime
()
-
adaptInfo
->
getTimestep
());
adaptInfo
->
setTimestep
(
adaptInfo
->
getTimestep
()
*
time_delta_1
);
continue
;
}
adaptInfo
_
->
setSpaceIteration
(
0
);
adaptInfo
->
setSpaceIteration
(
0
);
do
{
problemIteration_
->
beginIteration
(
adaptInfo
_
);
problemIteration_
->
beginIteration
(
adaptInfo
);
if
(
problemIteration_
->
oneIteration
(
adaptInfo
_
,
FULL_ITERATION
))
{
if
(
problemIteration_
->
oneIteration
(
adaptInfo
,
FULL_ITERATION
))
{
if
(
!
fixedTimestep_
&&
!
adaptInfo
_
->
timeToleranceReached
()
&&
!
adaptInfo
_
->
getTimestep
()
<=
adaptInfo
_
->
getMinTimestep
())
!
adaptInfo
->
timeToleranceReached
()
&&
!
adaptInfo
->
getTimestep
()
<=
adaptInfo
->
getMinTimestep
())
{
adaptInfo
_
->
setTime
(
adaptInfo
_
->
getTime
()
-
adaptInfo
_
->
getTimestep
());
adaptInfo
_
->
setTimestep
(
adaptInfo
_
->
getTimestep
()
*
time_delta_1
);
problemIteration_
->
endIteration
(
adaptInfo
_
);
adaptInfo
_
->
incSpaceIteration
();
adaptInfo
->
setTime
(
adaptInfo
->
getTime
()
-
adaptInfo
->
getTimestep
());
adaptInfo
->
setTimestep
(
adaptInfo
->
getTimestep
()
*
time_delta_1
);
problemIteration_
->
endIteration
(
adaptInfo
);
adaptInfo
->
incSpaceIteration
();
break
;
}
}
adaptInfo
_
->
incSpaceIteration
();
problemIteration_
->
endIteration
(
adaptInfo
_
);
adaptInfo
->
incSpaceIteration
();
problemIteration_
->
endIteration
(
adaptInfo
);
}
while
(
!
adaptInfo
_
->
spaceToleranceReached
()
&&
adaptInfo
_
->
getSpaceIteration
()
<=
adaptInfo
_
->
getMaxSpaceIteration
());
}
while
(
!
adaptInfo
_
->
timeToleranceReached
()
&&
!
adaptInfo
_
->
getTimestep
()
<=
adaptInfo
_
->
getMinTimestep
()
&&
adaptInfo
_
->
getTimestepIteration
()
<=
adaptInfo
_
->
getMaxTimestepIteration
());
}
while
(
!
adaptInfo
->
spaceToleranceReached
()
&&
adaptInfo
->
getSpaceIteration
()
<=
adaptInfo
->
getMaxSpaceIteration
());
}
while
(
!
adaptInfo
->
timeToleranceReached
()
&&
!
adaptInfo
->
getTimestep
()
<=
adaptInfo
->
getMinTimestep
()
&&
adaptInfo
->
getTimestepIteration
()
<=
adaptInfo
->
getMaxTimestepIteration
());
if
(
!
fixedTimestep_
&&
adaptInfo
_
->
timeErrorLow
())
{
adaptInfo
_
->
setTimestep
(
adaptInfo
_
->
getTimestep
()
*
time_delta_2
);
if
(
!
fixedTimestep_
&&
adaptInfo
->
timeErrorLow
())
{
adaptInfo
->
setTimestep
(
adaptInfo
->
getTimestep
()
*
time_delta_2
);
}
}
...
...
@@ -157,7 +157,7 @@ namespace AMDiS {
{
FUNCNAME
(
"AdaptInstationary::oneTimestep"
);
adaptInfo
_
->
setTimestepIteration
(
0
);
adaptInfo
->
setTimestepIteration
(
0
);
switch
(
strategy
)
{
...
...
@@ -172,7 +172,7 @@ namespace AMDiS {
explicitTimeStrategy
();
}
adaptInfo
_
->
incTimestepNumber
();
adaptInfo
->
incTimestepNumber
();
}
int
AdaptInstationary
::
adapt
()
...
...
@@ -181,29 +181,36 @@ namespace AMDiS {
int
errorCode
=
0
;
TEST_EXIT
(
adaptInfo
_
->
getTimestep
()
>=
adaptInfo
_
->
getMinTimestep
())
TEST_EXIT
(
adaptInfo
->
getTimestep
()
>=
adaptInfo
->
getMinTimestep
())
(
"timestep < min timestep
\n
"
);
TEST_EXIT
(
adaptInfo
_
->
getTimestep
()
<=
adaptInfo
_
->
getMaxTimestep
())
TEST_EXIT
(
adaptInfo
->
getTimestep
()
<=
adaptInfo
->
getMaxTimestep
())
(
"timestep > max timestep
\n
"
);
TEST_EXIT
(
adaptInfo
_
->
getTimestep
()
>
0
)(
"timestep <= 0!
\n
"
);
TEST_EXIT
(
adaptInfo
->
getTimestep
()
>
0
)(
"timestep <= 0!
\n
"
);
if
(
adaptInfo
_
->
getTimestepNumber
()
==
0
)
{
adaptInfo
_
->
setTime
(
adaptInfo
_
->
getStartTime
());
initialAdaptInfo_
->
setStartTime
(
adaptInfo
_
->
getStartTime
());
initialAdaptInfo_
->
setTime
(
adaptInfo
_
->
getStartTime
());
if
(
adaptInfo
->
getTimestepNumber
()
==
0
)
{
adaptInfo
->
setTime
(
adaptInfo
->
getStartTime
());
initialAdaptInfo_
->
setStartTime
(
adaptInfo
->
getStartTime
());
initialAdaptInfo_
->
setTime
(
adaptInfo
->
getStartTime
());
problemTime_
->
setTime
(
adaptInfo
_
);
problemTime_
->
setTime
(
adaptInfo
);
// initial adaption
problemTime_
->
solveInitialProblem
(
initialAdaptInfo_
);
problemTime_
->
transferInitialSolution
(
adaptInfo
_
);
problemTime_
->
transferInitialSolution
(
adaptInfo
);
}
while
(
adaptInfo_
->
getTime
()
<
adaptInfo_
->
getEndTime
()
-
DBL_TOL
)
{
// while (adaptInfo->getTime() < adaptInfo->getEndTime() - DBL_TOL) {
while
(
adaptInfo
->
getEndTime
()
-
adaptInfo
->
getTime
()
>
DBL_TOL
)
{
std
::
cout
.
precision
(
10
);
std
::
cout
<<
"TIME: "
<<
adaptInfo
->
getTime
()
<<
std
::
endl
;
std
::
cout
<<
"END TIME: "
<<
adaptInfo
->
getEndTime
()
<<
std
::
endl
;
std
::
cout
<<
"DIFF: "
<<
adaptInfo
->
getEndTime
()
-
adaptInfo
->
getTime
()
<<
std
::
endl
;
std
::
cout
<<
"TOL: "
<<
DBL_TOL
<<
std
::
endl
;
iterationTimestamp_
=
time
(
NULL
);
problemTime_
->
initTimestep
(
adaptInfo
_
);
problemTime_
->
initTimestep
(
adaptInfo
);
#ifdef _OPENMP
if
(
problemTime_
->
existsDelayedCalculation
())
{
...
...
@@ -223,9 +230,9 @@ namespace AMDiS {
oneTimestep
();
#endif
problemTime_
->
closeTimestep
(
adaptInfo
_
);
problemTime_
->
closeTimestep
(
adaptInfo
);
if
(
breakWhenStable
&&
(
adaptInfo
_
->
getSolverIterations
()
==
0
))
{
if
(
breakWhenStable
&&
(
adaptInfo
->
getSolverIterations
()
==
0
))
{
break
;
}
...
...
@@ -269,7 +276,7 @@ namespace AMDiS {
FUNCNAME
(
"AdaptInstationary::serialize()"
);
problemIteration_
->
serialize
(
out
);
adaptInfo
_
->
serialize
(
out
);
adaptInfo
->
serialize
(
out
);
if
(
problemTime_
)
{
problemTime_
->
serialize
(
out
);
}
...
...
@@ -280,7 +287,7 @@ namespace AMDiS {
FUNCNAME
(
"AdaptInstationary::deserialize()"
);
problemIteration_
->
deserialize
(
in
);
adaptInfo
_
->
deserialize
(
in
);
adaptInfo
->
deserialize
(
in
);
if
(
problemTime_
)
{
problemTime_
->
deserialize
(
in
);
}
...
...
@@ -298,20 +305,20 @@ namespace AMDiS {
time_t
currentTimestamp
=
time
(
NULL
);
// Update list with the last iteration runtimes.
lastIterationsDuration
_
.
push
(
currentTimestamp
-
iterationTimestamp_
);
lastIterationsDuration
.
push
(
currentTimestamp
-
iterationTimestamp_
);
// The list should not contain more than 5 elements. If so, delete the oldest one.
if
(
lastIterationsDuration
_
.
size
()
>
5
)
{
lastIterationsDuration
_
.
pop
();
if
(
lastIterationsDuration
.
size
()
>
5
)
{
lastIterationsDuration
.
pop
();
}
// Calculate the avarage of the last iterations.
::
std
::
queue
<
int
>
tmpQueue
=
lastIterationsDuration
_
;
::
std
::
queue
<
int
>
tmpQueue
=
lastIterationsDuration
;
int
avrgLastIterations
=
0
;
while
(
!
tmpQueue
.
empty
())
{
avrgLastIterations
+=
tmpQueue
.
front
();
tmpQueue
.
pop
();
}
avrgLastIterations
/=
lastIterationsDuration
_
.
size
();
avrgLastIterations
/=
lastIterationsDuration
.
size
();
// Check if there is enough time for a further iteration.
if
(
initialTimestamp_
+
queueRuntime_
-
currentTimestamp
<
avrgLastIterations
*
2
)
{
...
...
AMDiS/src/AdaptInstationary.h
View file @
83dd4be1
...
...
@@ -186,7 +186,7 @@ namespace AMDiS {
/** \brief
* Stores the runtime (in seconds) of some last timestep iterations.
*/
::
std
::
queue
<
int
>
lastIterationsDuration
_
;
::
std
::
queue
<
int
>
lastIterationsDuration
;
};
}
...
...
AMDiS/src/AdaptStationary.cc
View file @
83dd4be1
...
...
@@ -20,26 +20,26 @@ namespace AMDiS {
FUNCNAME
(
"AdaptStationary::adapt()"
);
// initial iteration
if
(
adaptInfo
_
->
getSpaceIteration
()
==
-
1
)
{
problemIteration_
->
beginIteration
(
adaptInfo
_
);
problemIteration_
->
oneIteration
(
adaptInfo
_
,
NO_ADAPTION
);
problemIteration_
->
endIteration
(
adaptInfo
_
);
adaptInfo
_
->
incSpaceIteration
();
if
(
adaptInfo
->
getSpaceIteration
()
==
-
1
)
{
problemIteration_
->
beginIteration
(
adaptInfo
);
problemIteration_
->
oneIteration
(
adaptInfo
,
NO_ADAPTION
);
problemIteration_
->
endIteration
(
adaptInfo
);
adaptInfo
->
incSpaceIteration
();
}
// adaption loop
while
(
!
adaptInfo
_
->
spaceToleranceReached
()
&&
(
adaptInfo
_
->
getSpaceIteration
()
<
adaptInfo
_
->
getMaxSpaceIteration
()
||
adaptInfo
_
->
getMaxSpaceIteration
()
<
0
)
)
{
while
(
!
adaptInfo
->
spaceToleranceReached
()
&&
(
adaptInfo
->
getSpaceIteration
()
<
adaptInfo
->
getMaxSpaceIteration
()
||
adaptInfo
->
getMaxSpaceIteration
()
<
0
)
)
{
problemIteration_
->
beginIteration
(
adaptInfo
_
);
Flag
adapted
=
problemIteration_
->
oneIteration
(
adaptInfo
_
,
FULL_ITERATION
);
problemIteration_
->
endIteration
(
adaptInfo
_
);
problemIteration_
->
beginIteration
(
adaptInfo
);
Flag
adapted
=
problemIteration_
->
oneIteration
(
adaptInfo
,
FULL_ITERATION
);
problemIteration_
->
endIteration
(
adaptInfo
);
if
(
!
adapted
)
break
;
adaptInfo
_
->
incSpaceIteration
();
adaptInfo
->
incSpaceIteration
();
}
return
0
;
...
...
AMDiS/src/DOFVector.hh
View file @
83dd4be1
...
...
@@ -785,23 +785,24 @@ namespace AMDiS {
}
template
<
typename
T
>
DOFVector
<
T
>&
DOFVector
<
T
>::
operator
=
(
const
DOFVector
<
T
>&
rhs
)
DOFVector
<
T
>&
DOFVector
<
T
>::
operator
=
(
const
DOFVector
<
T
>&
rhs
)
{
feSpace
=
rhs
.
feSpace
;
vec
=
rhs
.
vec
;
this
->
elementVector
=
NULL
;
interFct
=
rhs
.
interFct
;
refineInter
=
rhs
.
refineInter
;
coarsenOperation
=
rhs
.
coarsenOperation
;
this
->
operators
=
rhs
.
operators
;
this
->
operatorFactor
=
rhs
.
operatorFactor
;
feSpace
=
rhs
.
feSpace
;
vec
=
rhs
.
vec
;
this
->
elementVector
=
NULL
;
interFct
=
rhs
.
interFct
;
refineInter
=
rhs
.
refineInter
;
coarsenOperation
=
rhs
.
coarsenOperation
;
this
->
operators
=
rhs
.
operators
;
this
->
operatorFactor
=
rhs
.
operatorFactor
;
if
(
rhs
.
boundaryManager
)
{
if
(
this
->
boundaryManager
)
delete
this
->
boundaryManager
;
if
(
this
->
boundaryManager
)
delete
this
->
boundaryManager
;
this
->
boundaryManager
=
new
BoundaryManager
(
*
rhs
.
boundaryManager
);
// boundaryManager->setDOFVector(this);
}
else
{
this
->
boundaryManager
=
NULL
;
}
else
this
->
boundaryManager
=
NULL
;
return
*
this
;
}
...
...
AMDiS/src/ElementFileWriter.cc
View file @
83dd4be1
...
...
@@ -36,8 +36,10 @@ namespace AMDiS {
GET_PARAMETER
(
0
,
name
+
"->output->append index"
,
"%d"
,
&
appendIndex
);
GET_PARAMETER
(
0
,
name
+
"->output->index length"
,
"%d"
,
&
indexLength
);
GET_PARAMETER
(
0
,
name
+
"->output->index decimals"
,
"%d"
,
&
indexDecimals
);
GET_PARAMETER
(
0
,
name
+
"->output->write every i-th timestep"
,
"%d"
,
&
tsModulo
);
GET_PARAMETER
(
0
,
name
+
"->output->write every i-th timestep"
,
"%d"
,
&
tsModulo
);
TEST_EXIT
(
tsModulo
>
0
)
(
"Init file option
\"
write every i-th timestep
\"
is smaller than 1!
\n
"
);
}
void
ElementFileWriter
::
writeFiles
(
AdaptInfo
*
adaptInfo
,
bool
force
,
...
...
AMDiS/src/FileWriter.cc
View file @
83dd4be1
...
...
@@ -155,6 +155,9 @@ namespace AMDiS {
TEST_EXIT
(
!
delayWriting_
||
amdisHaveOpenMP
)
(
"Delayed writing only possible with OpenMP support!
\n
"
);
TEST_EXIT
(
tsModulo
>
0
)
(
"Init file option
\"
write every i-th timestep
\"
is smaller than 1!
\n
"
);
}
void
FileWriter
::
writeFiles
(
AdaptInfo
*
adaptInfo
,
...
...
AMDiS/src/ProblemIterationInterface.h
View file @
83dd4be1
...
...
@@ -84,7 +84,9 @@ namespace AMDiS {
/** \brief
* Returns the problem with the given name.
*/
virtual
ProblemStatBase
*
getProblem
(
const
::
std
::
string
&
name
)
{
return
NULL
;
};
virtual
ProblemStatBase
*
getProblem
(
const
::
std
::
string
&
name
)
{
return
NULL
;
};
/** \brief
* Returns the name of the problem.
...
...
AMDiS/src/ProblemScal.h
View file @
83dd4be1
...
...
@@ -177,18 +177,24 @@ namespace AMDiS {
/** \brief
* Returns number of managed problems
*/
virtual
int
getNumProblems
()
{
return
1
;
};
virtual
int
getNumProblems
()
{
return
1
;
};
/** \brief
* Implementation of ProblemStatBase::getNumComponents()
*/
virtual
int
getNumComponents
()
{
return
1
;
};
virtual
int
getNumComponents
()
{
return
1
;
};
/** \brief
* Returns the problem with the given number. If only one problem
* is managed by this master problem, the number hasn't to be given.
*/
virtual
ProblemStatBase
*
getProblem
(
int
number
=
0
)
{
return
this
;
};
virtual
ProblemStatBase
*
getProblem
(
int
number
=
0
)
{
return
this
;
};
/** \brief
* Writes output files.
...
...
AMDiS/src/Serializer.h
View file @
83dd4be1
...
...
@@ -39,14 +39,18 @@ namespace AMDiS {
Serializer
(
ProblemType
*
problem
)
:
name_
(
""
),
problem_
(
problem
),
tsModulo
_
(
1
),
tsModulo
(
1
),
timestepNumber_
(
-
1
)
{
GET_PARAMETER
(
0
,
problem_
->
getName
()
+
"->output->serialization filename"
,
&
name_
);
GET_PARAMETER
(
0
,
problem_
->
getName
()
+
"->output->write every i-th timestep"
,
"%d"
,
&
tsModulo_
);
"%d"
,
&
tsModulo
);
TEST_EXIT
(
name_
!=
""
)(
"no filename
\n
"
);
TEST_EXIT
(
tsModulo
>
0
)
(
"Init file option
\"
write every i-th timestep
\"
is smaller than 1!
\n
"
);
};
virtual
~
Serializer
()
{};
...
...
@@ -60,7 +64,7 @@ namespace AMDiS {
FUNCNAME
(
"Serializer::writeFiles()"
);
timestepNumber_
++
;
timestepNumber_
%=
tsModulo
_
;
timestepNumber_
%=
tsModulo
;
if
((
timestepNumber_
!=
0
)
&&
!
force
)
{
return
;
}
...
...
@@ -95,7 +99,7 @@ namespace AMDiS {
/** \brief
* The problem is serialized every tsModulo-th timestep.
*/
int
tsModulo
_
;
int
tsModulo
;
/** \brief
* Current timestep number.
...
...
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