Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Backofen, Rainer
amdis
Commits
b810b92a
Commit
b810b92a
authored
Jul 08, 2011
by
Praetorius, Simon
Browse files
parameter-initialization sourced out from contructor to init() method
parent
9fa45563
Changes
2
Hide whitespace changes
Inline
Side-by-side
AMDiS/src/AdaptInfo.h
View file @
b810b92a
...
...
@@ -145,21 +145,11 @@ namespace AMDiS {
deserialized
(
false
),
rosenbrockMode
(
false
)
{
Parameters
::
get
(
name_
+
"->start time"
,
startTime
);
time
=
startTime
;
Parameters
::
get
(
name_
+
"->timestep"
,
timestep
);
Parameters
::
get
(
name_
+
"->end time"
,
endTime
);
Parameters
::
get
(
name_
+
"->max iteration"
,
maxSpaceIteration
);
Parameters
::
get
(
name_
+
"->max timestep iteration"
,
maxTimestepIteration
);
Parameters
::
get
(
name_
+
"->max time iteration"
,
maxTimeIteration
);
Parameters
::
get
(
name_
+
"->min timestep"
,
minTimestep
);
Parameters
::
get
(
name_
+
"->max timestep"
,
maxTimestep
);
Parameters
::
get
(
name_
+
"->number of timesteps"
,
nTimesteps
);
init
();
char
number
[
5
];
for
(
int
i
=
0
;
i
<
size
;
i
++
)
{
sprintf
(
number
,
"[%d]"
,
i
);
scalContents
[
i
]
=
new
ScalContent
(
name
+
std
::
string
(
number
));
sprintf
(
number
,
"[%d]"
,
i
);
scalContents
[
i
]
=
new
ScalContent
(
name
+
std
::
string
(
number
));
}
}
...
...
@@ -167,9 +157,25 @@ namespace AMDiS {
virtual
~
AdaptInfo
()
{
for
(
unsigned
int
i
=
0
;
i
<
scalContents
.
size
();
i
++
)
delete
scalContents
[
i
];
delete
scalContents
[
i
];
}
/// Sets initial values to time/timestep variables
inline
void
init
()
{
Parameters
::
get
(
name
+
"->start time"
,
startTime
);
time
=
startTime
;
Parameters
::
get
(
name
+
"->timestep"
,
timestep
);
Parameters
::
get
(
name
+
"->end time"
,
endTime
);
Parameters
::
get
(
name
+
"->max iteration"
,
maxSpaceIteration
);
Parameters
::
get
(
name
+
"->max timestep iteration"
,
maxTimestepIteration
);
Parameters
::
get
(
name
+
"->max time iteration"
,
maxTimeIteration
);
Parameters
::
get
(
name
+
"->min timestep"
,
minTimestep
);
Parameters
::
get
(
name
+
"->max timestep"
,
maxTimestep
);
Parameters
::
get
(
name
+
"->number of timesteps"
,
nTimesteps
);
}
/// Resets all variables to zero (or something equivalent)
inline
void
reset
()
{
spaceIteration
=
-
1
;
...
...
demo/init/bunny.
init
→
demo/init/bunny.
dat.3d
View file @
b810b92a
File moved
Write
Preview
Supports
Markdown
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