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
7bc84046
Commit
7bc84046
authored
Feb 13, 2012
by
Thomas Witkowski
Browse files
Rename some object in parallel sources.
parent
a1f6ce9c
Changes
7
Hide whitespace changes
Inline
Side-by-side
AMDiS/CMakeLists.txt
View file @
7bc84046
...
@@ -224,7 +224,7 @@ if(ENABLE_PARALLEL_DOMAIN)
...
@@ -224,7 +224,7 @@ if(ENABLE_PARALLEL_DOMAIN)
SET
(
PARALLEL_DOMAIN_AMDIS_SRC
SET
(
PARALLEL_DOMAIN_AMDIS_SRC
${
SOURCE_DIR
}
/parallel/DofComm.cc
${
SOURCE_DIR
}
/parallel/DofComm.cc
${
SOURCE_DIR
}
/parallel/CheckerPartitioner.cc
${
SOURCE_DIR
}
/parallel/CheckerPartitioner.cc
${
SOURCE_DIR
}
/parallel/ElementObjectData.cc
${
SOURCE_DIR
}
/parallel/ElementObjectData
base
.cc
${
SOURCE_DIR
}
/parallel/MeshDistributor.cc
${
SOURCE_DIR
}
/parallel/MeshDistributor.cc
${
SOURCE_DIR
}
/parallel/MeshManipulation.cc
${
SOURCE_DIR
}
/parallel/MeshManipulation.cc
${
SOURCE_DIR
}
/parallel/MeshPartitioner.cc
${
SOURCE_DIR
}
/parallel/MeshPartitioner.cc
...
...
AMDiS/src/parallel/ElementObjectData.cc
→
AMDiS/src/parallel/ElementObjectData
base
.cc
View file @
7bc84046
...
@@ -10,14 +10,14 @@
...
@@ -10,14 +10,14 @@
// See also license.opensource.txt in the distribution.
// See also license.opensource.txt in the distribution.
#include
"ElementObjectData.h"
#include
"VertexVector.h"
#include
"VertexVector.h"
#include
"parallel/ElementObjectDatabase.h"
namespace
AMDiS
{
namespace
AMDiS
{
void
ElementObject
s
::
addElement
(
ElInfo
*
elInfo
)
void
ElementObject
Database
::
addElement
(
ElInfo
*
elInfo
)
{
{
FUNCNAME
(
"ElementObject
s
::addElement()"
);
FUNCNAME
(
"ElementObject
Database
::addElement()"
);
TEST_EXIT_DBG
(
mesh
)(
"Mesh not set!
\n
"
);
TEST_EXIT_DBG
(
mesh
)(
"Mesh not set!
\n
"
);
...
@@ -128,9 +128,9 @@ namespace AMDiS {
...
@@ -128,9 +128,9 @@ namespace AMDiS {
}
}
void
ElementObject
s
::
createPeriodicData
(
const
FiniteElemSpace
*
feSpace
)
void
ElementObject
Database
::
createPeriodicData
(
const
FiniteElemSpace
*
feSpace
)
{
{
FUNCNAME
(
"ElementObject
s
::createPeriodicData()"
);
FUNCNAME
(
"ElementObject
Database
::createPeriodicData()"
);
TEST_EXIT_DBG
(
mesh
)(
"Mesh not set!
\n
"
);
TEST_EXIT_DBG
(
mesh
)(
"Mesh not set!
\n
"
);
...
@@ -317,9 +317,9 @@ namespace AMDiS {
...
@@ -317,9 +317,9 @@ namespace AMDiS {
}
}
BoundaryType
ElementObject
s
::
getNewBoundaryType
(
DOFAdmin
*
admin
)
BoundaryType
ElementObject
Database
::
getNewBoundaryType
(
DOFAdmin
*
admin
)
{
{
FUNCNAME
(
"ElementObject
s
::getNewBoundaryType()"
);
FUNCNAME
(
"ElementObject
Database
::getNewBoundaryType()"
);
BoundaryType
newPeriodicBoundaryType
=
0
;
BoundaryType
newPeriodicBoundaryType
=
0
;
for
(
map
<
BoundaryType
,
VertexVector
*>::
iterator
it
=
mesh
->
getPeriodicAssociations
().
begin
();
for
(
map
<
BoundaryType
,
VertexVector
*>::
iterator
it
=
mesh
->
getPeriodicAssociations
().
begin
();
...
@@ -336,11 +336,12 @@ namespace AMDiS {
...
@@ -336,11 +336,12 @@ namespace AMDiS {
}
}
BoundaryType
ElementObjects
::
provideConnectedPeriodicBoundary
(
DOFAdmin
*
admin
,
BoundaryType
BoundaryType
b0
,
ElementObjectDatabase
::
provideConnectedPeriodicBoundary
(
DOFAdmin
*
admin
,
BoundaryType
b1
)
BoundaryType
b0
,
BoundaryType
b1
)
{
{
FUNCNAME
(
"ElementObject
s
::provideConnectedPeriodicBoundary()"
);
FUNCNAME
(
"ElementObject
Database
::provideConnectedPeriodicBoundary()"
);
std
::
pair
<
BoundaryType
,
BoundaryType
>
bConn
=
std
::
pair
<
BoundaryType
,
BoundaryType
>
bConn
=
(
b0
<=
b1
?
make_pair
(
b0
,
b1
)
:
make_pair
(
b1
,
b0
));
(
b0
<=
b1
?
make_pair
(
b0
,
b1
)
:
make_pair
(
b1
,
b0
));
...
@@ -371,9 +372,9 @@ namespace AMDiS {
...
@@ -371,9 +372,9 @@ namespace AMDiS {
}
}
void
ElementObject
s
::
createRankData
(
map
<
int
,
int
>&
macroElementRankMap
)
void
ElementObject
Database
::
createRankData
(
map
<
int
,
int
>&
macroElementRankMap
)
{
{
FUNCNAME
(
"ElementObject
s
::createRankData()"
);
FUNCNAME
(
"ElementObject
Database
::createRankData()"
);
vertexOwner
.
clear
();
vertexOwner
.
clear
();
vertexInRank
.
clear
();
vertexInRank
.
clear
();
...
@@ -424,11 +425,11 @@ namespace AMDiS {
...
@@ -424,11 +425,11 @@ namespace AMDiS {
}
}
void
ElementObject
s
::
createReverseModeData
(
const
FiniteElemSpace
*
feSpace
,
void
ElementObject
Database
::
createReverseModeData
(
const
FiniteElemSpace
*
feSpace
,
map
<
int
,
Element
*>
&
elIndexMap
,
map
<
int
,
Element
*>
&
elIndexMap
,
map
<
int
,
int
>
&
elIndexTypeMap
)
map
<
int
,
int
>
&
elIndexTypeMap
)
{
{
FUNCNAME
(
"ElementObject
s
::createReverseModeData()"
);
FUNCNAME
(
"ElementObject
Database
::createReverseModeData()"
);
// === In 2D, all reverse modes are always true! ===
// === In 2D, all reverse modes are always true! ===
...
@@ -537,9 +538,9 @@ namespace AMDiS {
...
@@ -537,9 +538,9 @@ namespace AMDiS {
}
}
void
ElementObject
s
::
serialize
(
ostream
&
out
)
void
ElementObject
Database
::
serialize
(
ostream
&
out
)
{
{
FUNCNAME
(
"ElementObject
s
::serialize()"
);
FUNCNAME
(
"ElementObject
Database
::serialize()"
);
int
nSize
=
vertexElements
.
size
();
int
nSize
=
vertexElements
.
size
();
SerUtil
::
serialize
(
out
,
nSize
);
SerUtil
::
serialize
(
out
,
nSize
);
...
@@ -664,9 +665,9 @@ namespace AMDiS {
...
@@ -664,9 +665,9 @@ namespace AMDiS {
}
}
void
ElementObject
s
::
deserialize
(
istream
&
in
)
void
ElementObject
Database
::
deserialize
(
istream
&
in
)
{
{
FUNCNAME
(
"ElementObject
s
::deserialize()"
);
FUNCNAME
(
"ElementObject
Database
::deserialize()"
);
int
nSize
;
int
nSize
;
SerUtil
::
deserialize
(
in
,
nSize
);
SerUtil
::
deserialize
(
in
,
nSize
);
...
@@ -821,7 +822,8 @@ namespace AMDiS {
...
@@ -821,7 +822,8 @@ namespace AMDiS {
}
}
void
ElementObjects
::
serialize
(
ostream
&
out
,
vector
<
ElementObjectData
>&
elVec
)
void
ElementObjectDatabase
::
serialize
(
ostream
&
out
,
vector
<
ElementObjectData
>&
elVec
)
{
{
int
nSize
=
elVec
.
size
();
int
nSize
=
elVec
.
size
();
SerUtil
::
serialize
(
out
,
nSize
);
SerUtil
::
serialize
(
out
,
nSize
);
...
@@ -830,7 +832,8 @@ namespace AMDiS {
...
@@ -830,7 +832,8 @@ namespace AMDiS {
}
}
void
ElementObjects
::
deserialize
(
istream
&
in
,
vector
<
ElementObjectData
>&
elVec
)
void
ElementObjectDatabase
::
deserialize
(
istream
&
in
,
vector
<
ElementObjectData
>&
elVec
)
{
{
int
nSize
;
int
nSize
;
SerUtil
::
deserialize
(
in
,
nSize
);
SerUtil
::
deserialize
(
in
,
nSize
);
...
@@ -840,7 +843,8 @@ namespace AMDiS {
...
@@ -840,7 +843,8 @@ namespace AMDiS {
}
}
void
ElementObjects
::
serialize
(
ostream
&
out
,
map
<
int
,
ElementObjectData
>&
data
)
void
ElementObjectDatabase
::
serialize
(
ostream
&
out
,
map
<
int
,
ElementObjectData
>&
data
)
{
{
int
nSize
=
data
.
size
();
int
nSize
=
data
.
size
();
SerUtil
::
serialize
(
out
,
nSize
);
SerUtil
::
serialize
(
out
,
nSize
);
...
@@ -852,7 +856,8 @@ namespace AMDiS {
...
@@ -852,7 +856,8 @@ namespace AMDiS {
}
}
void
ElementObjects
::
deserialize
(
istream
&
in
,
map
<
int
,
ElementObjectData
>&
data
)
void
ElementObjectDatabase
::
deserialize
(
istream
&
in
,
map
<
int
,
ElementObjectData
>&
data
)
{
{
int
nSize
;
int
nSize
;
SerUtil
::
deserialize
(
in
,
nSize
);
SerUtil
::
deserialize
(
in
,
nSize
);
...
...
AMDiS/src/parallel/ElementObjectData.h
→
AMDiS/src/parallel/ElementObjectData
base
.h
View file @
7bc84046
...
@@ -18,10 +18,10 @@
...
@@ -18,10 +18,10 @@
/** \file ElementObjectData.h */
/** \file ElementObjectData
base
.h */
#ifndef AMDIS_ELEMENTOBJECTDATA_H
#ifndef AMDIS_ELEMENT
_
OBJECT
_
DATA
BASE
_H
#define AMDIS_ELEMENTOBJECTDATA_H
#define AMDIS_ELEMENT
_
OBJECT
_
DATA
BASE
_H
#include
<map>
#include
<map>
#include
<vector>
#include
<vector>
...
@@ -99,9 +99,9 @@ namespace AMDiS {
...
@@ -99,9 +99,9 @@ namespace AMDiS {
* boundaries on object level. This is required, because two elements may share
* boundaries on object level. This is required, because two elements may share
* a common vertex without beging neighbours in the definition of AMDiS.
* a common vertex without beging neighbours in the definition of AMDiS.
*/
*/
class
ElementObject
s
{
class
ElementObject
Database
{
public:
public:
ElementObject
s
()
ElementObject
Database
()
:
mesh
(
NULL
),
:
mesh
(
NULL
),
iterGeoPos
(
CENTER
)
iterGeoPos
(
CENTER
)
{}
{}
...
...
AMDiS/src/parallel/MeshDistributor.cc
View file @
7bc84046
...
@@ -156,7 +156,7 @@ namespace AMDiS {
...
@@ -156,7 +156,7 @@ namespace AMDiS {
}
}
}
while
(
doNext
);
}
while
(
doNext
);
elObj
ects
.
setMesh
(
feSpaces
[
0
]
->
getMesh
());
elObj
Db
.
setMesh
(
feSpaces
[
0
]
->
getMesh
());
// If the problem has been already read from a file, we need only to set
// If the problem has been already read from a file, we need only to set
// isRankDofs to all matrices and rhs vector and to remove periodic
// isRankDofs to all matrices and rhs vector and to remove periodic
...
@@ -559,7 +559,7 @@ namespace AMDiS {
...
@@ -559,7 +559,7 @@ namespace AMDiS {
while
(
elInfo
)
{
while
(
elInfo
)
{
for
(
int
i
=
0
;
i
<
4
;
i
++
)
{
for
(
int
i
=
0
;
i
<
4
;
i
++
)
{
ElementObjectData
elData
(
elInfo
->
getElement
()
->
getIndex
(),
i
);
ElementObjectData
elData
(
elInfo
->
getElement
()
->
getIndex
(),
i
);
allEdges
.
insert
(
elObj
ects
.
getEdgeLocalMap
(
elData
));
allEdges
.
insert
(
elObj
Db
.
getEdgeLocalMap
(
elData
));
}
}
rankMacroEls
.
insert
(
elInfo
->
getElement
()
->
getIndex
());
rankMacroEls
.
insert
(
elInfo
->
getElement
()
->
getIndex
());
...
@@ -572,7 +572,7 @@ namespace AMDiS {
...
@@ -572,7 +572,7 @@ namespace AMDiS {
bool
valid3dMesh
=
true
;
bool
valid3dMesh
=
true
;
for
(
std
::
set
<
DofEdge
>::
iterator
it
=
allEdges
.
begin
();
it
!=
allEdges
.
end
();
++
it
)
{
for
(
std
::
set
<
DofEdge
>::
iterator
it
=
allEdges
.
begin
();
it
!=
allEdges
.
end
();
++
it
)
{
vector
<
ElementObjectData
>&
edgeEls
=
elObj
ects
.
getElements
(
*
it
);
vector
<
ElementObjectData
>&
edgeEls
=
elObj
Db
.
getElements
(
*
it
);
TEST_EXIT_DBG
(
edgeEls
.
size
()
>
0
)
TEST_EXIT_DBG
(
edgeEls
.
size
()
>
0
)
(
"No edge %d/%d in elObjDB!
\n
"
,
it
->
first
,
it
->
second
);
(
"No edge %d/%d in elObjDB!
\n
"
,
it
->
first
,
it
->
second
);
...
@@ -1326,7 +1326,7 @@ namespace AMDiS {
...
@@ -1326,7 +1326,7 @@ namespace AMDiS {
// === Remove double DOFs. ===
// === Remove double DOFs. ===
MeshManipulation
meshManipulation
(
mesh
);
MeshManipulation
meshManipulation
(
mesh
);
meshManipulation
.
deleteDoubleDofs
(
feSpaces
,
newMacroEl
,
elObj
ects
);
meshManipulation
.
deleteDoubleDofs
(
feSpaces
,
newMacroEl
,
elObj
Db
);
mesh
->
dofCompress
();
mesh
->
dofCompress
();
partitioner
->
createPartitionMap
(
partitionMap
);
partitioner
->
createPartitionMap
(
partitionMap
);
...
@@ -1415,7 +1415,7 @@ namespace AMDiS {
...
@@ -1415,7 +1415,7 @@ namespace AMDiS {
{
{
FUNCNAME
(
"MeshDistributor::updateInteriorBoundaryInfo()"
);
FUNCNAME
(
"MeshDistributor::updateInteriorBoundaryInfo()"
);
elObj
ects
.
createRankData
(
partitionMap
);
elObj
Db
.
createRankData
(
partitionMap
);
createBoundaryData
();
createBoundaryData
();
#if (DEBUG != 0)
#if (DEBUG != 0)
...
@@ -1443,22 +1443,22 @@ namespace AMDiS {
...
@@ -1443,22 +1443,22 @@ namespace AMDiS {
macroElIndexMap
.
insert
(
make_pair
(
el
->
getIndex
(),
el
));
macroElIndexMap
.
insert
(
make_pair
(
el
->
getIndex
(),
el
));
macroElIndexTypeMap
.
insert
(
make_pair
(
el
->
getIndex
(),
elInfo
->
getType
()));
macroElIndexTypeMap
.
insert
(
make_pair
(
el
->
getIndex
(),
elInfo
->
getType
()));
// Add all sub object of the element to the variable elObj
ects
.
// Add all sub object of the element to the variable elObj
Db
.
elObj
ects
.
addElement
(
elInfo
);
elObj
Db
.
addElement
(
elInfo
);
elInfo
=
stack
.
traverseNext
(
elInfo
);
elInfo
=
stack
.
traverseNext
(
elInfo
);
}
}
// Create periodic data, if there are periodic boundary conditions.
// Create periodic data, if there are periodic boundary conditions.
elObj
ects
.
createPeriodicData
(
feSpaces
[
0
]);
elObj
Db
.
createPeriodicData
(
feSpaces
[
0
]);
// Create data about the reverse modes of neighbouring elements.
// Create data about the reverse modes of neighbouring elements.
elObj
ects
.
createReverseModeData
(
feSpaces
[
0
],
macroElIndexMap
,
elObj
Db
.
createReverseModeData
(
feSpaces
[
0
],
macroElIndexMap
,
macroElIndexTypeMap
);
macroElIndexTypeMap
);
// Create mesh element data for this rank.
// Create mesh element data for this rank.
elObj
ects
.
createRankData
(
partitionMap
);
elObj
Db
.
createRankData
(
partitionMap
);
}
}
...
@@ -1478,12 +1478,12 @@ namespace AMDiS {
...
@@ -1478,12 +1478,12 @@ namespace AMDiS {
for
(
int
geoPos
=
0
;
geoPos
<
mesh
->
getDim
();
geoPos
++
)
{
for
(
int
geoPos
=
0
;
geoPos
<
mesh
->
getDim
();
geoPos
++
)
{
GeoIndex
geoIndex
=
INDEX_OF_DIM
(
geoPos
,
mesh
->
getDim
());
GeoIndex
geoIndex
=
INDEX_OF_DIM
(
geoPos
,
mesh
->
getDim
());
while
(
elObj
ects
.
iterate
(
geoIndex
))
{
while
(
elObj
Db
.
iterate
(
geoIndex
))
{
map
<
int
,
ElementObjectData
>&
objData
=
elObj
ects
.
getIterateData
();
map
<
int
,
ElementObjectData
>&
objData
=
elObj
Db
.
getIterateData
();
if
(
!
(
objData
.
count
(
mpiRank
)
&&
objData
.
size
()
>
1
))
if
(
!
(
objData
.
count
(
mpiRank
)
&&
objData
.
size
()
>
1
))
continue
;
continue
;
int
owner
=
elObj
ects
.
getIterateOwner
();
int
owner
=
elObj
Db
.
getIterateOwner
();
ElementObjectData
&
rankBoundEl
=
objData
[
mpiRank
];
ElementObjectData
&
rankBoundEl
=
objData
[
mpiRank
];
AtomicBoundary
bound
;
AtomicBoundary
bound
;
...
@@ -1521,10 +1521,10 @@ namespace AMDiS {
...
@@ -1521,10 +1521,10 @@ namespace AMDiS {
b
=
bound
;
b
=
bound
;
if
(
geoIndex
==
EDGE
)
if
(
geoIndex
==
EDGE
)
b
.
neighObj
.
reverseMode
=
b
.
neighObj
.
reverseMode
=
elObj
ects
.
getEdgeReverseMode
(
rankBoundEl
,
it2
->
second
);
elObj
Db
.
getEdgeReverseMode
(
rankBoundEl
,
it2
->
second
);
if
(
geoIndex
==
FACE
)
if
(
geoIndex
==
FACE
)
b
.
neighObj
.
reverseMode
=
b
.
neighObj
.
reverseMode
=
elObj
ects
.
getFaceReverseMode
(
rankBoundEl
,
it2
->
second
);
elObj
Db
.
getFaceReverseMode
(
rankBoundEl
,
it2
->
second
);
}
}
}
else
{
}
else
{
...
@@ -1545,10 +1545,10 @@ namespace AMDiS {
...
@@ -1545,10 +1545,10 @@ namespace AMDiS {
b
=
bound
;
b
=
bound
;
if
(
geoIndex
==
EDGE
)
if
(
geoIndex
==
EDGE
)
b
.
rankObj
.
reverseMode
=
b
.
rankObj
.
reverseMode
=
elObj
ects
.
getEdgeReverseMode
(
rankBoundEl
,
ownerBoundEl
);
elObj
Db
.
getEdgeReverseMode
(
rankBoundEl
,
ownerBoundEl
);
if
(
geoIndex
==
FACE
)
if
(
geoIndex
==
FACE
)
b
.
rankObj
.
reverseMode
=
b
.
rankObj
.
reverseMode
=
elObj
ects
.
getFaceReverseMode
(
rankBoundEl
,
ownerBoundEl
);
elObj
Db
.
getFaceReverseMode
(
rankBoundEl
,
ownerBoundEl
);
}
}
}
}
}
}
...
@@ -1556,16 +1556,16 @@ namespace AMDiS {
...
@@ -1556,16 +1556,16 @@ namespace AMDiS {
// === Create periodic boundary data structure. ===
// === Create periodic boundary data structure. ===
for
(
PerBoundMap
<
DegreeOfFreedom
>::
iterator
it
=
elObj
ects
.
getPeriodicVertices
().
begin
();
for
(
PerBoundMap
<
DegreeOfFreedom
>::
iterator
it
=
elObj
Db
.
getPeriodicVertices
().
begin
();
it
!=
elObj
ects
.
getPeriodicVertices
().
end
();
++
it
)
{
it
!=
elObj
Db
.
getPeriodicVertices
().
end
();
++
it
)
{
if
(
elObj
ects
.
isInRank
(
it
->
first
.
first
,
mpiRank
)
==
false
)
if
(
elObj
Db
.
isInRank
(
it
->
first
.
first
,
mpiRank
)
==
false
)
continue
;
continue
;
ElementObjectData
&
perDofEl0
=
ElementObjectData
&
perDofEl0
=
elObj
ects
.
getElementsInRank
(
it
->
first
.
first
)[
mpiRank
];
elObj
Db
.
getElementsInRank
(
it
->
first
.
first
)[
mpiRank
];
for
(
map
<
int
,
ElementObjectData
>::
iterator
elIt
=
elObj
ects
.
getElementsInRank
(
it
->
first
.
second
).
begin
();
for
(
map
<
int
,
ElementObjectData
>::
iterator
elIt
=
elObj
Db
.
getElementsInRank
(
it
->
first
.
second
).
begin
();
elIt
!=
elObj
ects
.
getElementsInRank
(
it
->
first
.
second
).
end
();
++
elIt
)
{
elIt
!=
elObj
Db
.
getElementsInRank
(
it
->
first
.
second
).
end
();
++
elIt
)
{
int
otherElementRank
=
elIt
->
first
;
int
otherElementRank
=
elIt
->
first
;
ElementObjectData
&
perDofEl1
=
elIt
->
second
;
ElementObjectData
&
perDofEl1
=
elIt
->
second
;
...
@@ -1601,15 +1601,15 @@ namespace AMDiS {
...
@@ -1601,15 +1601,15 @@ namespace AMDiS {
}
}
for
(
PerBoundMap
<
DofEdge
>::
iterator
it
=
elObj
ects
.
getPeriodicEdges
().
begin
();
for
(
PerBoundMap
<
DofEdge
>::
iterator
it
=
elObj
Db
.
getPeriodicEdges
().
begin
();
it
!=
elObj
ects
.
getPeriodicEdges
().
end
();
++
it
)
{
it
!=
elObj
Db
.
getPeriodicEdges
().
end
();
++
it
)
{
if
(
elObj
ects
.
isInRank
(
it
->
first
.
first
,
mpiRank
)
==
false
)
if
(
elObj
Db
.
isInRank
(
it
->
first
.
first
,
mpiRank
)
==
false
)
continue
;
continue
;
ElementObjectData
&
perEdgeEl0
=
elObj
ects
.
getElementsInRank
(
it
->
first
.
first
)[
mpiRank
];
ElementObjectData
&
perEdgeEl0
=
elObj
Db
.
getElementsInRank
(
it
->
first
.
first
)[
mpiRank
];
for
(
map
<
int
,
ElementObjectData
>::
iterator
elIt
=
elObj
ects
.
getElementsInRank
(
it
->
first
.
second
).
begin
();
for
(
map
<
int
,
ElementObjectData
>::
iterator
elIt
=
elObj
Db
.
getElementsInRank
(
it
->
first
.
second
).
begin
();
elIt
!=
elObj
ects
.
getElementsInRank
(
it
->
first
.
second
).
end
();
++
elIt
)
{
elIt
!=
elObj
Db
.
getElementsInRank
(
it
->
first
.
second
).
end
();
++
elIt
)
{
int
otherElementRank
=
elIt
->
first
;
int
otherElementRank
=
elIt
->
first
;
ElementObjectData
&
perEdgeEl1
=
elIt
->
second
;
ElementObjectData
&
perEdgeEl1
=
elIt
->
second
;
...
@@ -1633,27 +1633,29 @@ namespace AMDiS {
...
@@ -1633,27 +1633,29 @@ namespace AMDiS {
b
=
bound
;
b
=
bound
;
if
(
mpiRank
>
otherElementRank
)
if
(
mpiRank
>
otherElementRank
)
b
.
neighObj
.
reverseMode
=
elObjects
.
getEdgeReverseMode
(
perEdgeEl0
,
perEdgeEl1
);
b
.
neighObj
.
reverseMode
=
elObjDb
.
getEdgeReverseMode
(
perEdgeEl0
,
perEdgeEl1
);
else
else
b
.
rankObj
.
reverseMode
=
elObjects
.
getEdgeReverseMode
(
perEdgeEl0
,
perEdgeEl1
);
b
.
rankObj
.
reverseMode
=
elObjDb
.
getEdgeReverseMode
(
perEdgeEl0
,
perEdgeEl1
);
}
}
}
}
for
(
PerBoundMap
<
DofFace
>::
iterator
it
=
elObj
ects
.
getPeriodicFaces
().
begin
();
for
(
PerBoundMap
<
DofFace
>::
iterator
it
=
elObj
Db
.
getPeriodicFaces
().
begin
();
it
!=
elObj
ects
.
getPeriodicFaces
().
end
();
++
it
)
{
it
!=
elObj
Db
.
getPeriodicFaces
().
end
();
++
it
)
{
if
(
elObj
ects
.
isInRank
(
it
->
first
.
first
,
mpiRank
)
==
false
)
if
(
elObj
Db
.
isInRank
(
it
->
first
.
first
,
mpiRank
)
==
false
)
continue
;
continue
;
TEST_EXIT_DBG
(
elObj
ects
.
getElements
(
it
->
first
.
first
).
size
()
==
1
)
TEST_EXIT_DBG
(
elObj
Db
.
getElements
(
it
->
first
.
first
).
size
()
==
1
)
(
"Should not happen!
\n
"
);
(
"Should not happen!
\n
"
);
TEST_EXIT_DBG
(
elObj
ects
.
getElements
(
it
->
first
.
second
).
size
()
==
1
)
TEST_EXIT_DBG
(
elObj
Db
.
getElements
(
it
->
first
.
second
).
size
()
==
1
)
(
"Should not happen!
\n
"
);
(
"Should not happen!
\n
"
);
ElementObjectData
&
perFaceEl0
=
elObj
ects
.
getElementsInRank
(
it
->
first
.
first
)[
mpiRank
];
ElementObjectData
&
perFaceEl0
=
elObj
Db
.
getElementsInRank
(
it
->
first
.
first
)[
mpiRank
];
for
(
map
<
int
,
ElementObjectData
>::
iterator
elIt
=
elObj
ects
.
getElementsInRank
(
it
->
first
.
second
).
begin
();
for
(
map
<
int
,
ElementObjectData
>::
iterator
elIt
=
elObj
Db
.
getElementsInRank
(
it
->
first
.
second
).
begin
();
elIt
!=
elObj
ects
.
getElementsInRank
(
it
->
first
.
second
).
end
();
++
elIt
)
{
elIt
!=
elObj
Db
.
getElementsInRank
(
it
->
first
.
second
).
end
();
++
elIt
)
{
int
otherElementRank
=
elIt
->
first
;
int
otherElementRank
=
elIt
->
first
;
ElementObjectData
&
perFaceEl1
=
elIt
->
second
;
ElementObjectData
&
perFaceEl1
=
elIt
->
second
;
...
@@ -1678,10 +1680,10 @@ namespace AMDiS {
...
@@ -1678,10 +1680,10 @@ namespace AMDiS {
if
(
mpiRank
>
otherElementRank
)
if
(
mpiRank
>
otherElementRank
)
b
.
neighObj
.
reverseMode
=
b
.
neighObj
.
reverseMode
=
elObj
ects
.
getFaceReverseMode
(
perFaceEl0
,
perFaceEl1
);
elObj
Db
.
getFaceReverseMode
(
perFaceEl0
,
perFaceEl1
);
else
else
b
.
rankObj
.
reverseMode
=
b
.
rankObj
.
reverseMode
=
elObj
ects
.
getFaceReverseMode
(
perFaceEl0
,
perFaceEl1
);
elObj
Db
.
getFaceReverseMode
(
perFaceEl0
,
perFaceEl1
);
}
}
}
}
...
@@ -2259,7 +2261,7 @@ namespace AMDiS {
...
@@ -2259,7 +2261,7 @@ namespace AMDiS {
SerUtil
::
serialize
(
out
,
elemWeights
);
SerUtil
::
serialize
(
out
,
elemWeights
);
SerUtil
::
serialize
(
out
,
partitionMap
);
SerUtil
::
serialize
(
out
,
partitionMap
);
elObj
ects
.
serialize
(
out
);
elObj
Db
.
serialize
(
out
);
rankIntBoundary
.
serialize
(
out
);
rankIntBoundary
.
serialize
(
out
);
otherIntBoundary
.
serialize
(
out
);
otherIntBoundary
.
serialize
(
out
);
...
@@ -2329,7 +2331,7 @@ namespace AMDiS {
...
@@ -2329,7 +2331,7 @@ namespace AMDiS {
}
}
}
}
elObj
ects
.
deserialize
(
in
);
elObj
Db
.
deserialize
(
in
);
rankIntBoundary
.
deserialize
(
in
,
elIndexMap
);
rankIntBoundary
.
deserialize
(
in
,
elIndexMap
);
otherIntBoundary
.
deserialize
(
in
,
elIndexMap
);
otherIntBoundary
.
deserialize
(
in
,
elIndexMap
);
...
...
AMDiS/src/parallel/MeshDistributor.h
View file @
7bc84046
...
@@ -26,7 +26,7 @@
...
@@ -26,7 +26,7 @@
#include
<mpi.h>
#include
<mpi.h>
#include
"parallel/DofComm.h"
#include
"parallel/DofComm.h"
#include
"parallel/ElementObjectData.h"
#include
"parallel/ElementObjectData
base
.h"
#include
"parallel/ParallelTypes.h"
#include
"parallel/ParallelTypes.h"
#include
"parallel/MeshPartitioner.h"
#include
"parallel/MeshPartitioner.h"
#include
"parallel/InteriorBoundary.h"
#include
"parallel/InteriorBoundary.h"
...
@@ -607,11 +607,9 @@ namespace AMDiS {
...
@@ -607,11 +607,9 @@ namespace AMDiS {
/// Mesh of the problem.
/// Mesh of the problem.
Mesh
*
mesh
;
Mesh
*
mesh
;
/** \brief
/// A refinement manager that should be used on the mesh. It is used to