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
iwr
amdis
Commits
6edf9933
Commit
6edf9933
authored
Feb 15, 2019
by
Praetorius, Simon
Browse files
Release/v1.2
parent
44e00260
Changes
17
Hide whitespace changes
Inline
Side-by-side
.gitlab-ci.yml
View file @
6edf9933
...
@@ -17,8 +17,6 @@ build:9-debug-gcc:
...
@@ -17,8 +17,6 @@ build:9-debug-gcc:
-
install/
-
install/
name
:
"
$CI_BUILD_NAME"
name
:
"
$CI_BUILD_NAME"
expire_in
:
6 hrs
expire_in
:
6 hrs
only
:
-
master
build:9-release-gcc:
build:9-release-gcc:
stage
:
build
stage
:
build
...
@@ -29,8 +27,6 @@ build:9-release-gcc:
...
@@ -29,8 +27,6 @@ build:9-release-gcc:
-
install/
-
install/
name
:
"
$CI_BUILD_NAME"
name
:
"
$CI_BUILD_NAME"
expire_in
:
6 hrs
expire_in
:
6 hrs
only
:
-
master
build:9-parallel-debug-gcc:
build:9-parallel-debug-gcc:
stage
:
build
stage
:
build
...
@@ -41,8 +37,6 @@ build:9-parallel-debug-gcc:
...
@@ -41,8 +37,6 @@ build:9-parallel-debug-gcc:
-
install/
-
install/
name
:
"
$CI_BUILD_NAME"
name
:
"
$CI_BUILD_NAME"
expire_in
:
6 hrs
expire_in
:
6 hrs
only
:
-
master
build:9-parallel-release-gcc:
build:9-parallel-release-gcc:
stage
:
build
stage
:
build
...
@@ -53,8 +47,6 @@ build:9-parallel-release-gcc:
...
@@ -53,8 +47,6 @@ build:9-parallel-release-gcc:
-
install/
-
install/
name
:
"
$CI_BUILD_NAME"
name
:
"
$CI_BUILD_NAME"
expire_in
:
6 hrs
expire_in
:
6 hrs
only
:
-
master
# compile the demos
# compile the demos
...
@@ -64,8 +56,6 @@ demo:9-debug-gcc:
...
@@ -64,8 +56,6 @@ demo:9-debug-gcc:
-
tools/build_amdis.sh --stage demo --config Debug
-
tools/build_amdis.sh --stage demo --config Debug
dependencies
:
dependencies
:
-
build:9-debug-gcc
-
build:9-debug-gcc
only
:
-
master
demo:9-release-gcc:
demo:9-release-gcc:
stage
:
demo
stage
:
demo
...
@@ -73,8 +63,6 @@ demo:9-release-gcc:
...
@@ -73,8 +63,6 @@ demo:9-release-gcc:
-
tools/build_amdis.sh --stage demo --config Release
-
tools/build_amdis.sh --stage demo --config Release
dependencies
:
dependencies
:
-
build:9-release-gcc
-
build:9-release-gcc
only
:
-
master
demo:9-parallel-debug-gcc:
demo:9-parallel-debug-gcc:
stage
:
demo
stage
:
demo
...
@@ -82,8 +70,6 @@ demo:9-parallel-debug-gcc:
...
@@ -82,8 +70,6 @@ demo:9-parallel-debug-gcc:
-
tools/build_amdis.sh --stage demo --config Debug --parallel
-
tools/build_amdis.sh --stage demo --config Debug --parallel
dependencies
:
dependencies
:
-
build:9-parallel-debug-gcc
-
build:9-parallel-debug-gcc
only
:
-
master
demo:9-parallel-release-gcc:
demo:9-parallel-release-gcc:
stage
:
demo
stage
:
demo
...
@@ -91,8 +77,6 @@ demo:9-parallel-release-gcc:
...
@@ -91,8 +77,6 @@ demo:9-parallel-release-gcc:
-
tools/build_amdis.sh --stage demo --config Release --parallel
-
tools/build_amdis.sh --stage demo --config Release --parallel
dependencies
:
dependencies
:
-
build:9-parallel-release-gcc
-
build:9-parallel-release-gcc
only
:
-
master
# compiel and run the tests
# compiel and run the tests
...
@@ -102,8 +86,6 @@ test:9-debug-gcc:
...
@@ -102,8 +86,6 @@ test:9-debug-gcc:
-
tools/build_amdis.sh --stage test --config Debug
-
tools/build_amdis.sh --stage test --config Debug
dependencies
:
dependencies
:
-
build:9-debug-gcc
-
build:9-debug-gcc
only
:
-
master
test:9-release-gcc:
test:9-release-gcc:
stage
:
test
stage
:
test
...
@@ -111,8 +93,6 @@ test:9-release-gcc:
...
@@ -111,8 +93,6 @@ test:9-release-gcc:
-
tools/build_amdis.sh --stage test --config Release
-
tools/build_amdis.sh --stage test --config Release
dependencies
:
dependencies
:
-
build:9-release-gcc
-
build:9-release-gcc
only
:
-
master
test:9-parallel-debug-gcc:
test:9-parallel-debug-gcc:
stage
:
test
stage
:
test
...
@@ -120,8 +100,6 @@ test:9-parallel-debug-gcc:
...
@@ -120,8 +100,6 @@ test:9-parallel-debug-gcc:
-
tools/build_amdis.sh --stage test --config Debug --parallel
-
tools/build_amdis.sh --stage test --config Debug --parallel
dependencies
:
dependencies
:
-
build:9-parallel-debug-gcc
-
build:9-parallel-debug-gcc
only
:
-
master
test:9-parallel-release-gcc:
test:9-parallel-release-gcc:
stage
:
test
stage
:
test
...
@@ -129,5 +107,3 @@ test:9-parallel-release-gcc:
...
@@ -129,5 +107,3 @@ test:9-parallel-release-gcc:
-
tools/build_amdis.sh --stage test --config Release --parallel
-
tools/build_amdis.sh --stage test --config Release --parallel
dependencies
:
dependencies
:
-
build:9-parallel-release-gcc
-
build:9-parallel-release-gcc
only
:
-
master
AMDiS/CMakeLists.txt
View file @
6edf9933
set
(
CMAKE_LEGACY_CYGWIN_WIN32 0
)
set
(
CMAKE_LEGACY_CYGWIN_WIN32 0
)
cmake_minimum_required
(
VERSION 2.8 FATAL_ERROR
)
cmake_minimum_required
(
VERSION 2.8
.12
FATAL_ERROR
)
project
(
AMDiS
)
project
(
AMDiS
)
set
(
AMDiS_VERSION
"1.
1
.0"
)
set
(
AMDiS_VERSION
"1.
2
.0"
)
set
(
BASE_DIR
${
AMDiS_SOURCE_DIR
}
)
set
(
BASE_DIR
${
AMDiS_SOURCE_DIR
}
)
set
(
SOURCE_DIR
${
BASE_DIR
}
/src
)
set
(
SOURCE_DIR
${
BASE_DIR
}
/src
)
...
...
AMDiS/src/DOFSerializer.cc
View file @
6edf9933
...
@@ -7,34 +7,38 @@
...
@@ -7,34 +7,38 @@
#include
"Traverse.h"
#include
"Traverse.h"
namespace
AMDiS
namespace
AMDiS
{
{
// s
a
tre values of DOFVector on all macro elements to internal container
// st
o
re values of DOFVector on all macro elements to internal container
void
DOFSerializer
::
gather
(
DOFVector
<
double
>
const
*
vec
,
std
::
vector
<
double
>&
values
)
void
DOFSerializer
::
gather
(
DOFVector
<
double
>
const
*
vec
,
std
::
vector
<
double
>&
values
)
{
{
std
::
fill
(
visited_
.
begin
(),
visited_
.
end
(),
false
);
std
::
fill
(
visited_
.
begin
(),
visited_
.
end
(),
false
);
values
.
clear
();
values
.
clear
();
values
.
reserve
(
numValues_
);
for
(
auto
*
macroEl
:
mesh_
->
getMacroElements
())
for
(
auto
*
macroEl
:
mesh_
->
getMacroElements
())
gather
(
macroEl
->
getIndex
(),
vec
,
values
,
false
);
gather
(
macroEl
->
getIndex
(),
vec
,
values
,
false
);
numValues_
=
values
.
size
();
}
}
// s
a
tre values of DOFVector on macro element `macroIndex` to internal container
// st
o
re values of DOFVector on macro element `macroIndex` to internal container
void
DOFSerializer
::
gather
(
int
macroIndex
,
DOFVector
<
double
>
const
*
vec
,
std
::
vector
<
double
>&
values
,
bool
reset
)
void
DOFSerializer
::
gather
(
int
macroIndex
,
DOFVector
<
double
>
const
*
vec
,
std
::
vector
<
double
>&
values
,
bool
reset
)
{
{
FUNCNAME
(
"DOFSerializer::gather()"
);
TEST_EXIT
(
mesh_
==
vec
->
getFeSpace
()
->
getMesh
())(
"Incompatible meshes!
\n
"
);
if
(
reset
)
{
if
(
reset
)
{
std
::
fill
(
visited_
.
begin
(),
visited_
.
end
(),
false
);
std
::
fill
(
visited_
.
begin
(),
visited_
.
end
(),
false
);
values
.
clear
();
values
.
clear
();
}
}
TEST_EXIT
(
mesh_
==
vec
->
getFeSpace
()
->
getMesh
())(
"Incompatible meshes!
\n
"
);
TraverseStack
stack
;
TraverseStack
stack
;
ElInfo
*
elInfo
=
stack
.
traverseFirstOneMacro
(
mesh_
,
macroIndex
,
-
1
,
Mesh
::
CALL_EVERY_EL_PREORDER
);
ElInfo
*
elInfo
=
stack
.
traverseFirstOneMacro
(
mesh_
,
macroIndex
,
-
1
,
Mesh
::
CALL_EVERY_EL_PREORDER
);
while
(
elInfo
)
{
while
(
elInfo
)
{
Element
*
el
=
elInfo
->
getElement
();
Element
*
el
=
elInfo
->
getElement
();
if
(
el
->
isLeaf
())
{
if
(
el
->
isLeaf
())
{
gather
(
VERTEX
,
elInfo
,
vec
,
values
);
gather
(
VERTEX
,
elInfo
,
vec
,
values
);
if
(
mesh_
->
getDim
()
>
1
)
if
(
mesh_
->
getDim
()
>
1
)
...
@@ -43,14 +47,15 @@ void DOFSerializer::gather(int macroIndex, DOFVector<double> const* vec, std::ve
...
@@ -43,14 +47,15 @@ void DOFSerializer::gather(int macroIndex, DOFVector<double> const* vec, std::ve
gather
(
FACE
,
elInfo
,
vec
,
values
);
gather
(
FACE
,
elInfo
,
vec
,
values
);
gather
(
CENTER
,
elInfo
,
vec
,
values
);
gather
(
CENTER
,
elInfo
,
vec
,
values
);
}
}
elInfo
=
stack
.
traverseNext
(
elInfo
);
elInfo
=
stack
.
traverseNext
(
elInfo
);
}
}
}
}
void
DOFSerializer
::
gather
(
GeoIndex
geo
,
ElInfo
*
elInfo
,
DOFVector
<
double
>
const
*
vec
,
std
::
vector
<
double
>&
values
)
void
DOFSerializer
::
gather
(
GeoIndex
geo
,
ElInfo
*
elInfo
,
DOFVector
<
double
>
const
*
vec
,
std
::
vector
<
double
>&
values
)
{
{
FUNCNAME_DBG
(
"DOFSerializer::gather()"
);
int
nd
;
int
nd
;
if
((
nd
=
admin_
->
getNumberOfDofs
(
geo
)))
{
if
((
nd
=
admin_
->
getNumberOfDofs
(
geo
)))
{
int
entities
=
mesh_
->
getGeo
(
geo
);
int
entities
=
mesh_
->
getGeo
(
geo
);
...
@@ -59,7 +64,7 @@ void DOFSerializer::gather(GeoIndex geo, ElInfo* elInfo, DOFVector<double> const
...
@@ -59,7 +64,7 @@ void DOFSerializer::gather(GeoIndex geo, ElInfo* elInfo, DOFVector<double> const
for
(
int
n
=
0
;
n
<
entities
;
n
++
)
{
for
(
int
n
=
0
;
n
<
entities
;
n
++
)
{
for
(
int
d
=
0
;
d
<
nd
;
d
++
)
{
for
(
int
d
=
0
;
d
<
nd
;
d
++
)
{
DegreeOfFreedom
globalDof
=
elInfo
->
getElement
()
->
getDof
(
n0
+
n
,
nd0
+
d
);
DegreeOfFreedom
globalDof
=
elInfo
->
getElement
()
->
getDof
(
n0
+
n
,
nd0
+
d
);
TEST_EXIT
(
globalDof
<
visited_
.
size
())(
"visited container not large enough!
\n
"
);
TEST_EXIT
_DBG
(
globalDof
<
visited_
.
size
())(
"visited container not large enough!
\n
"
);
if
(
!
visited_
[
globalDof
])
{
if
(
!
visited_
[
globalDof
])
{
visited_
[
globalDof
]
=
true
;
visited_
[
globalDof
]
=
true
;
values
.
push_back
((
*
vec
)[
globalDof
]);
values
.
push_back
((
*
vec
)[
globalDof
]);
...
@@ -75,7 +80,7 @@ void DOFSerializer::scatter(std::vector<double> const& values, DOFVector<double>
...
@@ -75,7 +80,7 @@ void DOFSerializer::scatter(std::vector<double> const& values, DOFVector<double>
{
{
std
::
fill
(
visited_
.
begin
(),
visited_
.
end
(),
false
);
std
::
fill
(
visited_
.
begin
(),
visited_
.
end
(),
false
);
counter_
=
0u
;
counter_
=
0u
;
for
(
auto
*
macroEl
:
mesh_
->
getMacroElements
())
for
(
auto
*
macroEl
:
mesh_
->
getMacroElements
())
scatter
(
macroEl
->
getIndex
(),
values
,
vec
,
false
);
scatter
(
macroEl
->
getIndex
(),
values
,
vec
,
false
);
}
}
...
@@ -83,19 +88,20 @@ void DOFSerializer::scatter(std::vector<double> const& values, DOFVector<double>
...
@@ -83,19 +88,20 @@ void DOFSerializer::scatter(std::vector<double> const& values, DOFVector<double>
// assign stored values to DOFVector, on macroElement with index `macroIndex`
// assign stored values to DOFVector, on macroElement with index `macroIndex`
void
DOFSerializer
::
scatter
(
int
macroIndex
,
std
::
vector
<
double
>
const
&
values
,
DOFVector
<
double
>*
vec
,
bool
reset
)
const
void
DOFSerializer
::
scatter
(
int
macroIndex
,
std
::
vector
<
double
>
const
&
values
,
DOFVector
<
double
>*
vec
,
bool
reset
)
const
{
{
FUNCNAME
(
"DOFSerializer::scatter()"
);
TEST_EXIT
(
mesh_
==
vec
->
getFeSpace
()
->
getMesh
())(
"Incompatible meshes!
\n
"
);
if
(
reset
)
{
if
(
reset
)
{
std
::
fill
(
visited_
.
begin
(),
visited_
.
end
(),
false
);
std
::
fill
(
visited_
.
begin
(),
visited_
.
end
(),
false
);
counter_
=
0u
;
counter_
=
0u
;
}
}
TEST_EXIT
(
mesh_
==
vec
->
getFeSpace
()
->
getMesh
())(
"Incompatible meshes!
\n
"
);
TraverseStack
stack
;
TraverseStack
stack
;
ElInfo
*
elInfo
=
stack
.
traverseFirstOneMacro
(
mesh_
,
macroIndex
,
-
1
,
Mesh
::
CALL_EVERY_EL_PREORDER
);
ElInfo
*
elInfo
=
stack
.
traverseFirstOneMacro
(
mesh_
,
macroIndex
,
-
1
,
Mesh
::
CALL_EVERY_EL_PREORDER
);
while
(
elInfo
)
{
while
(
elInfo
)
{
Element
*
el
=
elInfo
->
getElement
();
Element
*
el
=
elInfo
->
getElement
();
if
(
el
->
isLeaf
())
{
if
(
el
->
isLeaf
())
{
scatter
(
VERTEX
,
elInfo
,
values
,
vec
);
scatter
(
VERTEX
,
elInfo
,
values
,
vec
);
if
(
mesh_
->
getDim
()
>
1
)
if
(
mesh_
->
getDim
()
>
1
)
...
@@ -104,7 +110,7 @@ void DOFSerializer::scatter(int macroIndex, std::vector<double> const& values, D
...
@@ -104,7 +110,7 @@ void DOFSerializer::scatter(int macroIndex, std::vector<double> const& values, D
scatter
(
FACE
,
elInfo
,
values
,
vec
);
scatter
(
FACE
,
elInfo
,
values
,
vec
);
scatter
(
CENTER
,
elInfo
,
values
,
vec
);
scatter
(
CENTER
,
elInfo
,
values
,
vec
);
}
}
elInfo
=
stack
.
traverseNext
(
elInfo
);
elInfo
=
stack
.
traverseNext
(
elInfo
);
}
}
}
}
...
@@ -112,6 +118,7 @@ void DOFSerializer::scatter(int macroIndex, std::vector<double> const& values, D
...
@@ -112,6 +118,7 @@ void DOFSerializer::scatter(int macroIndex, std::vector<double> const& values, D
void
DOFSerializer
::
scatter
(
GeoIndex
geo
,
ElInfo
*
elInfo
,
std
::
vector
<
double
>
const
&
values
,
DOFVector
<
double
>*
vec
)
const
void
DOFSerializer
::
scatter
(
GeoIndex
geo
,
ElInfo
*
elInfo
,
std
::
vector
<
double
>
const
&
values
,
DOFVector
<
double
>*
vec
)
const
{
{
FUNCNAME
(
"DOFSerializer::scatter()"
);
int
nd
;
int
nd
;
if
((
nd
=
admin_
->
getNumberOfDofs
(
geo
)))
{
if
((
nd
=
admin_
->
getNumberOfDofs
(
geo
)))
{
int
entities
=
mesh_
->
getGeo
(
geo
);
int
entities
=
mesh_
->
getGeo
(
geo
);
...
@@ -120,7 +127,7 @@ void DOFSerializer::scatter(GeoIndex geo, ElInfo* elInfo, std::vector<double> co
...
@@ -120,7 +127,7 @@ void DOFSerializer::scatter(GeoIndex geo, ElInfo* elInfo, std::vector<double> co
for
(
int
n
=
0
;
n
<
entities
;
n
++
)
{
for
(
int
n
=
0
;
n
<
entities
;
n
++
)
{
for
(
int
d
=
0
;
d
<
nd
;
d
++
)
{
for
(
int
d
=
0
;
d
<
nd
;
d
++
)
{
DegreeOfFreedom
globalDof
=
elInfo
->
getElement
()
->
getDof
(
n0
+
n
,
nd0
+
d
);
DegreeOfFreedom
globalDof
=
elInfo
->
getElement
()
->
getDof
(
n0
+
n
,
nd0
+
d
);
TEST_EXIT
(
globalDof
<
visited_
.
size
())(
"visited container not large enough!
\n
"
);
TEST_EXIT
_DBG
(
globalDof
<
visited_
.
size
())(
"visited container not large enough!
\n
"
);
if
(
!
visited_
[
globalDof
])
{
if
(
!
visited_
[
globalDof
])
{
visited_
[
globalDof
]
=
true
;
visited_
[
globalDof
]
=
true
;
TEST_EXIT
(
counter_
<
values
.
size
())(
"Not enough values in value-container!
\n
"
);
TEST_EXIT
(
counter_
<
values
.
size
())(
"Not enough values in value-container!
\n
"
);
...
...
AMDiS/src/DOFSerializer.h
View file @
6edf9933
...
@@ -41,47 +41,51 @@ namespace AMDiS
...
@@ -41,47 +41,51 @@ namespace AMDiS
class
DOFSerializer
class
DOFSerializer
{
{
public:
public:
/// Constructor, stores a pointer to the DOFAdmin. If the number of values to store can be estimated,
/// Constructor, stores a pointer to the DOFAdmin. If the number of values to store can be estimated,
/// pass a second argument `numValues`
/// pass a second argument `numValues`
DOFSerializer
(
DOFAdmin
*
admin
,
std
::
size_t
numValues
=
0
)
DOFSerializer
(
DOFAdmin
*
admin
,
std
::
size_t
numValues
=
0
u
)
:
admin_
(
admin
)
:
admin_
(
admin
)
,
mesh_
(
admin
->
getMesh
())
,
mesh_
(
admin
->
getMesh
())
,
visited_
(
admin
->
getUsedSize
(),
false
)
,
visited_
(
admin
->
getUsedSize
(),
false
)
,
numValues_
(
numValues
)
{}
{}
// s
a
tre values of DOFVector on all macro elements to internal container
// st
o
re values of DOFVector on all macro elements to internal container
void
gather
(
DOFVector
<
double
>
const
*
vec
,
std
::
vector
<
double
>&
values
);
void
gather
(
DOFVector
<
double
>
const
*
vec
,
std
::
vector
<
double
>&
values
);
// s
a
tre values of DOFVector on macro element `macroIndex` to internal container
// st
o
re values of DOFVector on macro element `macroIndex` to internal container
void
gather
(
int
macroIndex
,
DOFVector
<
double
>
const
*
vec
,
std
::
vector
<
double
>&
values
,
bool
reset
=
true
);
void
gather
(
int
macroIndex
,
DOFVector
<
double
>
const
*
vec
,
std
::
vector
<
double
>&
values
,
bool
reset
=
true
);
// assign stored values to DOFVector, for all macro elements
// assign stored values to DOFVector, for all macro elements
void
scatter
(
std
::
vector
<
double
>
const
&
values
,
DOFVector
<
double
>*
vec
)
const
;
void
scatter
(
std
::
vector
<
double
>
const
&
values
,
DOFVector
<
double
>*
vec
)
const
;
// assign stored values to DOFVector, on macroElement with index `macroIndex`
// assign stored values to DOFVector, on macroElement with index `macroIndex`
void
scatter
(
int
macroIndex
,
std
::
vector
<
double
>
const
&
values
,
DOFVector
<
double
>*
vec
,
bool
reset
=
true
)
const
;
void
scatter
(
int
macroIndex
,
std
::
vector
<
double
>
const
&
values
,
DOFVector
<
double
>*
vec
,
bool
reset
=
true
)
const
;
protected:
protected:
// collect values of one geometry-type
// collect values of one geometry-type
void
gather
(
GeoIndex
geo
,
ElInfo
*
elInfo
,
DOFVector
<
double
>
const
*
vec
,
std
::
vector
<
double
>&
values
);
void
gather
(
GeoIndex
geo
,
ElInfo
*
elInfo
,
DOFVector
<
double
>
const
*
vec
,
std
::
vector
<
double
>&
values
);
// assign values of one geometry type
// assign values of one geometry type
void
scatter
(
GeoIndex
geo
,
ElInfo
*
elInfo
,
std
::
vector
<
double
>
const
&
values
,
DOFVector
<
double
>*
vec
)
const
;
void
scatter
(
GeoIndex
geo
,
ElInfo
*
elInfo
,
std
::
vector
<
double
>
const
&
values
,
DOFVector
<
double
>*
vec
)
const
;
protected:
protected:
DOFAdmin
*
admin_
;
DOFAdmin
*
admin_
;
Mesh
*
mesh_
;
Mesh
*
mesh_
;
// stored which DOFs were already visited during traversal
// stored which DOFs were already visited during traversal
mutable
std
::
vector
<
bool
>
visited_
;
mutable
std
::
vector
<
bool
>
visited_
;
// estimated number of values
std
::
size_t
numValues_
=
0u
;
// a counter used during assignment of values. To guarantee the same order as during gather
// a counter used during assignment of values. To guarantee the same order as during gather
mutable
std
::
size_t
counter_
=
0u
;
mutable
std
::
size_t
counter_
=
0u
;
};
};
...
...
AMDiS/src/Initfile.h
View file @
6edf9933
...
@@ -37,7 +37,6 @@
...
@@ -37,7 +37,6 @@
#include
<boost/lexical_cast.hpp>
#include
<boost/lexical_cast.hpp>
#include
<boost/numeric/conversion/cast.hpp>
#include
<boost/numeric/conversion/cast.hpp>
#include
<boost/thread/shared_mutex.hpp>
// requires c++14
#include
<boost/type_traits.hpp>
#include
<boost/type_traits.hpp>
...
@@ -423,8 +422,6 @@ namespace AMDiS {
...
@@ -423,8 +422,6 @@ namespace AMDiS {
template
<
typename
T
>
template
<
typename
T
>
static
void
get
(
const
std
::
string
tag
,
T
&
value
,
int
debugInfo
=
-
1
)
static
void
get
(
const
std
::
string
tag
,
T
&
value
,
int
debugInfo
=
-
1
)
{
{
// boost::shared_lock<boost::shared_mutex> lock(singlett().mutex_);
if
(
debugInfo
==
-
1
)
if
(
debugInfo
==
-
1
)
debugInfo
=
singlett
().
getMsgInfo
();
debugInfo
=
singlett
().
getMsgInfo
();
else
{
else
{
...
@@ -498,8 +495,6 @@ namespace AMDiS {
...
@@ -498,8 +495,6 @@ namespace AMDiS {
/// return InitEntry object for tag tag
/// return InitEntry object for tag tag
static
InitEntry
get
(
const
std
::
string
tag
)
static
InitEntry
get
(
const
std
::
string
tag
)
{
{
// boost::shared_lock<boost::shared_mutex> lock(singlett().mutex_);
InitEntry
result
;
InitEntry
result
;
std
::
string
valStr
;
std
::
string
valStr
;
...
@@ -527,8 +522,6 @@ else if(error_code == TAG_NOT_FOUND_BREAK)
...
@@ -527,8 +522,6 @@ else if(error_code == TAG_NOT_FOUND_BREAK)
template
<
typename
T
>
template
<
typename
T
>
static
void
set
(
const
std
::
string
tag
,
T
const
&
value
,
int
debugInfo
=
-
1
)
static
void
set
(
const
std
::
string
tag
,
T
const
&
value
,
int
debugInfo
=
-
1
)
{
{
// boost::unique_lock<boost::shared_mutex> lock(singlett().mutex_);
if
(
debugInfo
==
-
1
)
if
(
debugInfo
==
-
1
)
debugInfo
=
singlett
().
getMsgInfo
();
debugInfo
=
singlett
().
getMsgInfo
();
...
@@ -578,14 +571,14 @@ else if(error_code == TAG_NOT_FOUND_BREAK)
...
@@ -578,14 +571,14 @@ else if(error_code == TAG_NOT_FOUND_BREAK)
{
{
singlett
().
clear
();
singlett
().
clear
();
}
}
/// save singlett-data to file with filename fn
/// save singlett-data to file with filename fn
static
void
save
(
std
::
string
fn
)
static
void
save
(
std
::
string
fn
)
{
{
singlett
().
write
(
fn
);
singlett
().
write
(
fn
);
}
}
// list of included filenames
// list of included filenames
static
std
::
set
<
std
::
string
>&
getIncludeList
()
static
std
::
set
<
std
::
string
>&
getIncludeList
()
...
@@ -593,7 +586,7 @@ else if(error_code == TAG_NOT_FOUND_BREAK)
...
@@ -593,7 +586,7 @@ else if(error_code == TAG_NOT_FOUND_BREAK)
static
std
::
set
<
std
::
string
>
include_list
;
static
std
::
set
<
std
::
string
>
include_list
;
return
include_list
;
return
include_list
;
}
}
protected:
protected:
Initfile
()
Initfile
()
:
msgInfo
(
0
),
:
msgInfo
(
0
),
...
@@ -656,8 +649,6 @@ protected:
...
@@ -656,8 +649,6 @@ protected:
void
getInternalParameters
();
void
getInternalParameters
();
int
msgInfo
,
msgWait
,
paramInfo
,
breakOnMissingTag
;
int
msgInfo
,
msgWait
,
paramInfo
,
breakOnMissingTag
;
// mutable boost::shared_mutex mutex_;
};
};
typedef
Initfile
Parameters
;
typedef
Initfile
Parameters
;
...
...
AMDiS/src/MeshStructure.cc
View file @
6edf9933
...
@@ -280,25 +280,25 @@ namespace AMDiS {
...
@@ -280,25 +280,25 @@ namespace AMDiS {
bool
cont
=
true
;
bool
cont
=
true
;
while
(
cont
)
{
while
(
cont
)
{
bool
cont1
;
bool
cont1
;
//
#ifndef NDEBUG
#ifndef NDEBUG
bool
cont2
;
bool
cont2
;
//
#endif
#endif
if
(
structure1
->
isLeafElement
()
==
structure2
->
isLeafElement
())
{
if
(
structure1
->
isLeafElement
()
==
structure2
->
isLeafElement
())
{
cont1
=
structure1
->
nextElement
(
result
);
cont1
=
structure1
->
nextElement
(
result
);
//
#ifndef NDEBUG
#ifndef NDEBUG
cont2
=
structure2
->
nextElement
();
cont2
=
structure2
->
nextElement
();
//
#endif
#endif
}
else
{
}
else
{
if
(
structure1
->
isLeafElement
())
{
if
(
structure1
->
isLeafElement
())
{
cont1
=
structure1
->
nextElement
();
cont1
=
structure1
->
nextElement
();
//
#ifndef NDEBUG
#ifndef NDEBUG
cont2
=
structure2
->
skipBranch
(
result
);
cont2
=
structure2
->
skipBranch
(
result
);
//
#endif
#endif
}
else
{
}
else
{
cont1
=
structure1
->
skipBranch
(
result
);
cont1
=
structure1
->
skipBranch
(
result
);
//
#ifndef NDEBUG
#ifndef NDEBUG
cont2
=
structure2
->
nextElement
();
cont2
=
structure2
->
nextElement
();
//
#endif
#endif
}
}
}
}
TEST_EXIT_DBG
(
cont1
==
cont2
)(
"Structures don't match!
\n
"
);
TEST_EXIT_DBG
(
cont1
==
cont2
)(
"Structures don't match!
\n
"
);
...
@@ -504,7 +504,7 @@ namespace AMDiS {
...
@@ -504,7 +504,7 @@ namespace AMDiS {
elInfo
=
stack
.
traverseNext
(
elInfo
);
elInfo
=
stack
.
traverseNext
(
elInfo
);
}
}
}
}
void
MeshStructure
::
setMeshStructureValues
(
int
macroElIndex
,