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
d8b47d8f
Commit
d8b47d8f
authored
Jul 02, 2008
by
Thomas Witkowski
Browse files
* Small changes
parent
639f286f
Changes
3
Show whitespace changes
Inline
Side-by-side
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
)
{
...
...
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
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