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
5ce8ac8b
Commit
5ce8ac8b
authored
Jun 10, 2011
by
Backofen, Rainer
Browse files
changed demo and tutorial according new usage of Parameters::init(...)
parent
aecf40a9
Changes
14
Hide whitespace changes
Inline
Side-by-side
demo/src/ball.cc
View file @
5ce8ac8b
...
...
@@ -47,7 +47,7 @@ int main(int argc, char* argv[])
TEST_EXIT
(
argc
==
2
)(
"usage: ball initfile
\n
"
);
// ===== init parameters =====
Parameters
::
init
(
false
,
argv
[
1
]);
Parameters
::
init
(
argv
[
1
]);
// ===== create projection =====
WorldVector
<
double
>
ballCenter
;
...
...
demo/src/bunny.cc
View file @
5ce8ac8b
...
...
@@ -44,7 +44,7 @@ int main(int argc, char* argv[])
TEST_EXIT
(
argc
==
2
)(
"usage: bunny initfile
\n
"
);
// ===== init parameters =====
Parameters
::
init
(
false
,
argv
[
1
]);
Parameters
::
init
(
argv
[
1
]);
// ===== create projection =====
WorldVector
<
double
>
ballCenter
;
...
...
demo/src/ellipt.cc
View file @
5ce8ac8b
...
...
@@ -49,7 +49,7 @@ int main(int argc, char* argv[])
// ===== init parameters =====
Parameters
::
init
(
true
,
argv
[
1
]);
Parameters
::
init
(
argv
[
1
]);
// ===== create and init the scalar problem =====
...
...
demo/src/heat.cc
View file @
5ce8ac8b
...
...
@@ -147,7 +147,7 @@ int main(int argc, char** argv)
TEST_EXIT
(
argc
>
1
)(
"usage: heat initfile
\n
"
);
// ===== init parameters =====
Parameters
::
init
(
false
,
argv
[
1
]);
Parameters
::
init
(
argv
[
1
]);
Parameters
::
readArgv
(
argc
,
argv
);
...
...
demo/src/neumann.cc
View file @
5ce8ac8b
...
...
@@ -48,7 +48,7 @@ int main(int argc, char* argv[])
TEST_EXIT
(
argc
==
2
)(
"usage: neumann initfile
\n
"
);
// ===== init parameters =====
Parameters
::
init
(
true
,
argv
[
1
]);
Parameters
::
init
(
argv
[
1
]);
// ===== create and init the scalar problem =====
ProblemStat
neumann
(
"neumann"
);
...
...
demo/src/parametric.cc
View file @
5ce8ac8b
...
...
@@ -126,7 +126,7 @@ int main(int argc, char* argv[])
TEST_EXIT
(
argc
==
2
)(
"usage: parametric initfile
\n
"
);
// ===== init parameters =====
Parameters
::
init
(
false
,
argv
[
1
]);
Parameters
::
init
(
argv
[
1
]);
// ===== create and init the scalar problem =====
ParametricSphere
parametric
(
"parametric"
);
...
...
demo/src/periodic.cc
View file @
5ce8ac8b
...
...
@@ -38,7 +38,7 @@ int main(int argc, char* argv[])
TEST_EXIT
(
argc
==
2
)(
"usage: periodic initfile
\n
"
);
// ===== init parameters =====
Parameters
::
init
(
false
,
argv
[
1
]);
Parameters
::
init
(
argv
[
1
]);
// ===== create and init the scalar problem =====
ProblemStat
periodic
(
"periodic"
);
...
...
demo/src/sphere.cc
View file @
5ce8ac8b
...
...
@@ -32,7 +32,7 @@ int main(int argc, char* argv[])
TEST_EXIT
(
argc
==
2
)(
"usage: sphere initfile
\n
"
);
// ===== init parameters =====
Parameters
::
init
(
false
,
argv
[
1
]);
Parameters
::
init
(
argv
[
1
]);
// ===== create projection =====
WorldVector
<
double
>
ballCenter
;
...
...
demo/src/torus.cc
View file @
5ce8ac8b
...
...
@@ -92,7 +92,7 @@ int main(int argc, char* argv[])
TEST_EXIT
(
argc
==
2
)(
"usage: torus initfile
\n
"
);
// ===== init parameters =====
Parameters
::
init
(
false
,
argv
[
1
]);
Parameters
::
init
(
argv
[
1
]);
// ===== create projection =====
double
r2
=
(
1.5
-
1.0
/
sqrt
(
2.0
))
/
2.0
;
...
...
demo/src/vecellipt.cc
View file @
5ce8ac8b
...
...
@@ -47,7 +47,7 @@ int main(int argc, char* argv[])
// ===== init parameters =====
Parameters
::
init
(
false
,
argv
[
1
]);
Parameters
::
init
(
argv
[
1
]);
// ===== create and init the scalar problem =====
...
...
demo/src/vecheat.cc
View file @
5ce8ac8b
...
...
@@ -193,7 +193,7 @@ int main(int argc, char** argv)
TEST_EXIT
(
argc
>
1
)(
"usage: vecheat initfile
\n
"
);
// ===== init parameters =====
Parameters
::
init
(
false
,
argv
[
1
]);
Parameters
::
init
(
argv
[
1
]);
Parameters
::
readArgv
(
argc
,
argv
);
// ===== create and init stationary problem =====
...
...
doc/tutorial/ellipt.tex
View file @
5ce8ac8b
...
...
@@ -126,7 +126,7 @@ int main(int argc, char* argv[])
TEST
_
EXIT(argc >= 2)("usage: ellipt initfile
\n
");
// ===== init parameters =====
Parameters::init(
true,
argv[1]);
Parameters::init(argv[1]);
\end{lstlisting}
The macro
\verb
+
FUNCNAME
+
defines the current function name that is
...
...
@@ -136,9 +136,7 @@ brackets. If the condition does not hold, an error message given in
the second bracket pair is prompted and the program exits. Here the
macro is used to check, whether the parameter file was specified by
the user as command line argument. If this is the case, the parameters
are initialized by
\verb
+
Parameters::init(true, argv[1])
+
. The first
argument specifies, whether the initialized parameters should be
printed after initialization for debug reasons. The second argument is
are initialized by
\verb
+
Parameters::init(argv[1])
+
. The argument is
the name of the parameter file.
Now, a stationary problem with name
\verb
+
ellipt
+
is created and initialized:
...
...
doc/tutorial/heat.tex
View file @
5ce8ac8b
...
...
@@ -237,7 +237,7 @@ int main(int argc, char** argv)
TEST
_
EXIT(argc == 2)("usage: heat initfile
\n
");
// ===== init parameters =====
Parameters::init(
false,
argv[1]);
Parameters::init(argv[1]);
Parameters::readArgv(argc, argv);
// ===== create and init stationary problem =====
...
...
doc/tutorial/parametric.tex
View file @
5ce8ac8b
...
...
@@ -152,7 +152,7 @@ int main(int argc, char* argv[])
TEST
_
EXIT(argc == 2)("usage: torus initfile
\n
");
// ===== init parameters =====
Parameters::init(
false,
argv[1]);
Parameters::init(argv[1]);
// ===== create projection =====
double r2 = (1.5 - 1.0/std::sqrt(2.0)) / 2.0;
...
...
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