Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
amdis
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
iwr
amdis
Commits
b810b92a
Commit
b810b92a
authored
13 years ago
by
Praetorius, Simon
Browse files
Options
Downloads
Patches
Plain Diff
parameter-initialization sourced out from contructor to init() method
parent
9fa45563
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
AMDiS/src/AdaptInfo.h
+20
-14
20 additions, 14 deletions
AMDiS/src/AdaptInfo.h
demo/init/bunny.dat.3d
+0
-0
0 additions, 0 deletions
demo/init/bunny.dat.3d
with
20 additions
and
14 deletions
AMDiS/src/AdaptInfo.h
+
20
−
14
View file @
b810b92a
...
@@ -145,21 +145,11 @@ namespace AMDiS {
...
@@ -145,21 +145,11 @@ namespace AMDiS {
deserialized
(
false
),
deserialized
(
false
),
rosenbrockMode
(
false
)
rosenbrockMode
(
false
)
{
{
Parameters
::
get
(
name_
+
"->start time"
,
startTime
);
init
();
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
);
char
number
[
5
];
char
number
[
5
];
for
(
int
i
=
0
;
i
<
size
;
i
++
)
{
for
(
int
i
=
0
;
i
<
size
;
i
++
)
{
sprintf
(
number
,
"[%d]"
,
i
);
sprintf
(
number
,
"[%d]"
,
i
);
scalContents
[
i
]
=
new
ScalContent
(
name
+
std
::
string
(
number
));
scalContents
[
i
]
=
new
ScalContent
(
name
+
std
::
string
(
number
));
}
}
}
}
...
@@ -167,9 +157,25 @@ namespace AMDiS {
...
@@ -167,9 +157,25 @@ namespace AMDiS {
virtual
~
AdaptInfo
()
virtual
~
AdaptInfo
()
{
{
for
(
unsigned
int
i
=
0
;
i
<
scalContents
.
size
();
i
++
)
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
()
inline
void
reset
()
{
{
spaceIteration
=
-
1
;
spaceIteration
=
-
1
;
...
...
This diff is collapsed.
Click to expand it.
demo/init/bunny.
init
→
demo/init/bunny.
dat.3d
+
0
−
0
View file @
b810b92a
File moved
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment