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
d8b47d8f
Commit
d8b47d8f
authored
Jul 02, 2008
by
Thomas Witkowski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* Small changes
parent
639f286f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
18 deletions
+13
-18
AMDiS/src/Global.cc
AMDiS/src/Global.cc
+3
-2
AMDiS/src/Global.h
AMDiS/src/Global.h
+7
-15
AMDiS/src/Parameters.cc
AMDiS/src/Parameters.cc
+3
-1
No files found.
AMDiS/src/Global.cc
View file @
d8b47d8f
...
...
@@ -24,7 +24,8 @@ namespace AMDiS {
{
NULL
,
NEW
Line
(
NULL
),
NEW
Triangle
(
NULL
),
NEW
Tetrahedron
(
NULL
)
};
NEW
Tetrahedron
(
NULL
)
};
void
Msg
::
wait
(
bool
w
)
{
...
...
@@ -43,7 +44,7 @@ namespace AMDiS {
FUNCNAME
(
"Msg::change_out()"
);
if
(
fp
)
{
if
(
out
&&
*
out
!=
::
std
::
cout
&&
*
out
!=
::
std
::
cerr
)
{
if
(
out
&&
*
out
!=
::
std
::
cout
&&
*
out
!=
::
std
::
cerr
)
{
dynamic_cast
<
::
std
::
ofstream
*>
(
out
)
->
close
();
delete
out
;
}
...
...
AMDiS/src/Global.h
View file @
d8b47d8f
...
...
@@ -444,7 +444,6 @@ namespace AMDiS {
*/
static
const
Element
*
getReferenceElement
(
int
dim
)
{
FUNCNAME
(
"Global::getReferenceElement()"
);
initTest
();
TEST_EXIT
((
dim
>
0
)
&&
(
dim
<
4
))(
"invalid dim: %d
\n
"
,
dim
);
return
referenceElement
[
dim
];
};
...
...
@@ -453,7 +452,6 @@ namespace AMDiS {
* returns geometrical information. Currently this is only dimOfWorld.
*/
static
inline
int
getGeo
(
GeoIndex
p
)
{
initTest
();
if
(
WORLD
==
p
)
return
dimOfWorld
;
...
...
@@ -466,7 +464,6 @@ namespace AMDiS {
* getGeo(VERTEX, 3) returns 4 because a Tetrahedron has 4 vertices.
*/
static
inline
int
getGeo
(
GeoIndex
p
,
int
dim
)
{
initTest
();
TEST_EXIT_DBG
((
p
>=
MINPART
)
&&
(
p
<=
MAXPART
))
(
"Calling for invalid geometry value %d
\n
"
,
p
);
TEST_EXIT_DBG
((
dim
>=
0
)
&&
(
dim
<
4
))
...
...
@@ -477,25 +474,17 @@ namespace AMDiS {
return
geoIndexTable
[
dim
][
p
-
MINPART
];
}
private:
/** \brief
* Global is a pure static class. So the constructor is private to avoid
* instantiation.
*/
Global
();
/** \brief
* inits the Global class with the help of Parameters.
*/
static
void
init
();
private:
/** \brief
* calls init if Global is not yet initialized.
* Global is a pure static class. So the constructor is private to avoid
* instantiation.
*/
static
inline
void
initTest
()
{
if
(
dimOfWorld
==
0
)
init
();
};
Global
();
private:
/** \brief
...
...
@@ -512,6 +501,9 @@ namespace AMDiS {
*/
static
Element
*
referenceElement
[
4
];
/** \brief
* Stores the precalculated results that should be returned by Global::getGeo.
*/
static
::
std
::
vector
<
::
std
::
vector
<
int
>
>
geoIndexTable
;
};
...
...
AMDiS/src/Parameters.cc
View file @
d8b47d8f
...
...
@@ -565,13 +565,14 @@ namespace AMDiS {
initIntern
();
if
(
0
==
fn
.
size
())
{
Global
::
init
();
return
;
}
if
(
NULL
==
flags
)
{
singlett
->
read
(
fn
);
}
else
{
singlett
->
inputFile
.
open
(
fn
.
data
(),
::
std
::
ios
::
in
);
singlett
->
inputFile
.
open
(
fn
.
data
(),
::
std
::
ios
::
in
);
if
(
!
(
singlett
->
inputFile
.
rdstate
()))
{
ERROR
(
"can not read from file %s
\n
"
,
fn
.
data
());
return
;
...
...
@@ -676,6 +677,7 @@ namespace AMDiS {
if
(
p
&&
singlett
->
msgInfo
)
printParameters
();
Global
::
init
();
return
;
}
...
...
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