Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
amdis
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Backofen, Rainer
amdis
Commits
7bc84046
Commit
7bc84046
authored
Feb 13, 2012
by
Thomas Witkowski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename some object in parallel sources.
parent
a1f6ce9c
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
125 additions
and
137 deletions
+125
-137
AMDiS/CMakeLists.txt
AMDiS/CMakeLists.txt
+1
-1
AMDiS/src/parallel/ElementObjectDatabase.cc
AMDiS/src/parallel/ElementObjectDatabase.cc
+30
-25
AMDiS/src/parallel/ElementObjectDatabase.h
AMDiS/src/parallel/ElementObjectDatabase.h
+5
-5
AMDiS/src/parallel/MeshDistributor.cc
AMDiS/src/parallel/MeshDistributor.cc
+46
-44
AMDiS/src/parallel/MeshDistributor.h
AMDiS/src/parallel/MeshDistributor.h
+33
-53
AMDiS/src/parallel/MeshManipulation.cc
AMDiS/src/parallel/MeshManipulation.cc
+8
-7
AMDiS/src/parallel/MeshManipulation.h
AMDiS/src/parallel/MeshManipulation.h
+2
-2
No files found.
AMDiS/CMakeLists.txt
View file @
7bc84046
...
...
@@ -224,7 +224,7 @@ if(ENABLE_PARALLEL_DOMAIN)
SET
(
PARALLEL_DOMAIN_AMDIS_SRC
${
SOURCE_DIR
}
/parallel/DofComm.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/MeshManipulation.cc
${
SOURCE_DIR
}
/parallel/MeshPartitioner.cc
...
...
AMDiS/src/parallel/ElementObjectData.cc
→
AMDiS/src/parallel/ElementObjectData
base
.cc
View file @
7bc84046
...
...
@@ -10,14 +10,14 @@
// See also license.opensource.txt in the distribution.
#include "ElementObjectData.h"
#include "VertexVector.h"
#include "parallel/ElementObjectDatabase.h"
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
"
);
...
...
@@ -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
"
);
...
...
@@ -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
;
for
(
map
<
BoundaryType
,
VertexVector
*>::
iterator
it
=
mesh
->
getPeriodicAssociations
().
begin
();
...
...
@@ -336,11 +336,12 @@ namespace AMDiS {
}
BoundaryType
ElementObjects
::
provideConnectedPeriodicBoundary
(
DOFAdmin
*
admin
,
BoundaryType
ElementObjectDatabase
::
provideConnectedPeriodicBoundary
(
DOFAdmin
*
admin
,
BoundaryType
b0
,
BoundaryType
b1
)
{
FUNCNAME
(
"ElementObject
s
::provideConnectedPeriodicBoundary()"
);
FUNCNAME
(
"ElementObject
Database
::provideConnectedPeriodicBoundary()"
);
std
::
pair
<
BoundaryType
,
BoundaryType
>
bConn
=
(
b0
<=
b1
?
make_pair
(
b0
,
b1
)
:
make_pair
(
b1
,
b0
));
...
...
@@ -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
();
vertexInRank
.
clear
();
...
...
@@ -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
,
int
>
&
elIndexTypeMap
)
{
FUNCNAME
(
"ElementObject
s
::createReverseModeData()"
);
FUNCNAME
(
"ElementObject
Database
::createReverseModeData()"
);
// === In 2D, all reverse modes are always true! ===
...
...
@@ -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
();
SerUtil
::
serialize
(
out
,
nSize
);
...
...
@@ -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
;
SerUtil
::
deserialize
(
in
,
nSize
);
...
...
@@ -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
();
SerUtil
::
serialize
(
out
,
nSize
);
...
...
@@ -830,7 +832,8 @@ namespace AMDiS {
}
void
ElementObjects
::
deserialize
(
istream
&
in
,
vector
<
ElementObjectData
>&
elVec
)
void
ElementObjectDatabase
::
deserialize
(
istream
&
in
,
vector
<
ElementObjectData
>&
elVec
)
{
int
nSize
;
SerUtil
::
deserialize
(
in
,
nSize
);
...
...
@@ -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
();
SerUtil
::
serialize
(
out
,
nSize
);
...
...
@@ -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
;
SerUtil
::
deserialize
(
in
,
nSize
);
...
...
AMDiS/src/parallel/ElementObjectData.h
→
AMDiS/src/parallel/ElementObjectData
base
.h
View file @
7bc84046
...
...
@@ -18,10 +18,10 @@
/** \file ElementObjectData.h */
/** \file ElementObjectData
base
.h */
#ifndef AMDIS_ELEMENT
OBJECTDATA
_H
#define AMDIS_ELEMENT
OBJECTDATA
_H
#ifndef AMDIS_ELEMENT
_OBJECT_DATABASE
_H
#define AMDIS_ELEMENT
_OBJECT_DATABASE
_H
#include <map>
#include <vector>
...
...
@@ -99,9 +99,9 @@ namespace AMDiS {
* boundaries on object level. This is required, because two elements may share
* a common vertex without beging neighbours in the definition of AMDiS.
*/
class
ElementObject
s
{
class
ElementObject
Database
{
public:
ElementObject
s
()
ElementObject
Database
()
:
mesh
(
NULL
),
iterGeoPos
(
CENTER
)
{}
...
...
AMDiS/src/parallel/MeshDistributor.cc
View file @
7bc84046
...
...
@@ -156,7 +156,7 @@ namespace AMDiS {
}
}
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
// isRankDofs to all matrices and rhs vector and to remove periodic
...
...
@@ -559,7 +559,7 @@ namespace AMDiS {
while
(
elInfo
)
{
for
(
int
i
=
0
;
i
<
4
;
i
++
)
{
ElementObjectData
elData
(
elInfo
->
getElement
()
->
getIndex
(),
i
);
allEdges
.
insert
(
elObj
ects
.
getEdgeLocalMap
(
elData
));
allEdges
.
insert
(
elObj
Db
.
getEdgeLocalMap
(
elData
));
}
rankMacroEls
.
insert
(
elInfo
->
getElement
()
->
getIndex
());
...
...
@@ -572,7 +572,7 @@ namespace AMDiS {
bool
valid3dMesh
=
true
;
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
)
(
"No edge %d/%d in elObjDB!
\n
"
,
it
->
first
,
it
->
second
);
...
...
@@ -1326,7 +1326,7 @@ namespace AMDiS {
// === Remove double DOFs. ===
MeshManipulation
meshManipulation
(
mesh
);
meshManipulation
.
deleteDoubleDofs
(
feSpaces
,
newMacroEl
,
elObj
ects
);
meshManipulation
.
deleteDoubleDofs
(
feSpaces
,
newMacroEl
,
elObj
Db
);
mesh
->
dofCompress
();
partitioner
->
createPartitionMap
(
partitionMap
);
...
...
@@ -1415,7 +1415,7 @@ namespace AMDiS {
{
FUNCNAME
(
"MeshDistributor::updateInteriorBoundaryInfo()"
);
elObj
ects
.
createRankData
(
partitionMap
);
elObj
Db
.
createRankData
(
partitionMap
);
createBoundaryData
();
#if (DEBUG != 0)
...
...
@@ -1443,22 +1443,22 @@ namespace AMDiS {
macroElIndexMap
.
insert
(
make_pair
(
el
->
getIndex
(),
el
));
macroElIndexTypeMap
.
insert
(
make_pair
(
el
->
getIndex
(),
elInfo
->
getType
()));
// Add all sub object of the element to the variable elObj
ects
.
elObj
ects
.
addElement
(
elInfo
);
// Add all sub object of the element to the variable elObj
Db
.
elObj
Db
.
addElement
(
elInfo
);
elInfo
=
stack
.
traverseNext
(
elInfo
);
}
// 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.
elObj
ects
.
createReverseModeData
(
feSpaces
[
0
],
macroElIndexMap
,
elObj
Db
.
createReverseModeData
(
feSpaces
[
0
],
macroElIndexMap
,
macroElIndexTypeMap
);
// Create mesh element data for this rank.
elObj
ects
.
createRankData
(
partitionMap
);
elObj
Db
.
createRankData
(
partitionMap
);
}
...
...
@@ -1478,12 +1478,12 @@ namespace AMDiS {
for
(
int
geoPos
=
0
;
geoPos
<
mesh
->
getDim
();
geoPos
++
)
{
GeoIndex
geoIndex
=
INDEX_OF_DIM
(
geoPos
,
mesh
->
getDim
());
while
(
elObj
ects
.
iterate
(
geoIndex
))
{
map
<
int
,
ElementObjectData
>&
objData
=
elObj
ects
.
getIterateData
();
while
(
elObj
Db
.
iterate
(
geoIndex
))
{
map
<
int
,
ElementObjectData
>&
objData
=
elObj
Db
.
getIterateData
();
if
(
!
(
objData
.
count
(
mpiRank
)
&&
objData
.
size
()
>
1
))
continue
;
int
owner
=
elObj
ects
.
getIterateOwner
();
int
owner
=
elObj
Db
.
getIterateOwner
();
ElementObjectData
&
rankBoundEl
=
objData
[
mpiRank
];
AtomicBoundary
bound
;
...
...
@@ -1521,10 +1521,10 @@ namespace AMDiS {
b
=
bound
;
if
(
geoIndex
==
EDGE
)
b
.
neighObj
.
reverseMode
=
elObj
ects
.
getEdgeReverseMode
(
rankBoundEl
,
it2
->
second
);
elObj
Db
.
getEdgeReverseMode
(
rankBoundEl
,
it2
->
second
);
if
(
geoIndex
==
FACE
)
b
.
neighObj
.
reverseMode
=
elObj
ects
.
getFaceReverseMode
(
rankBoundEl
,
it2
->
second
);
elObj
Db
.
getFaceReverseMode
(
rankBoundEl
,
it2
->
second
);
}
}
else
{
...
...
@@ -1545,10 +1545,10 @@ namespace AMDiS {
b
=
bound
;
if
(
geoIndex
==
EDGE
)
b
.
rankObj
.
reverseMode
=
elObj
ects
.
getEdgeReverseMode
(
rankBoundEl
,
ownerBoundEl
);
elObj
Db
.
getEdgeReverseMode
(
rankBoundEl
,
ownerBoundEl
);
if
(
geoIndex
==
FACE
)
b
.
rankObj
.
reverseMode
=
elObj
ects
.
getFaceReverseMode
(
rankBoundEl
,
ownerBoundEl
);
elObj
Db
.
getFaceReverseMode
(
rankBoundEl
,
ownerBoundEl
);
}
}
}
...
...
@@ -1556,16 +1556,16 @@ namespace AMDiS {
// === Create periodic boundary data structure. ===
for
(
PerBoundMap
<
DegreeOfFreedom
>::
iterator
it
=
elObj
ects
.
getPeriodicVertices
().
begin
();
it
!=
elObj
ects
.
getPeriodicVertices
().
end
();
++
it
)
{
if
(
elObj
ects
.
isInRank
(
it
->
first
.
first
,
mpiRank
)
==
false
)
for
(
PerBoundMap
<
DegreeOfFreedom
>::
iterator
it
=
elObj
Db
.
getPeriodicVertices
().
begin
();
it
!=
elObj
Db
.
getPeriodicVertices
().
end
();
++
it
)
{
if
(
elObj
Db
.
isInRank
(
it
->
first
.
first
,
mpiRank
)
==
false
)
continue
;
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
();
elIt
!=
elObj
ects
.
getElementsInRank
(
it
->
first
.
second
).
end
();
++
elIt
)
{
for
(
map
<
int
,
ElementObjectData
>::
iterator
elIt
=
elObj
Db
.
getElementsInRank
(
it
->
first
.
second
).
begin
();
elIt
!=
elObj
Db
.
getElementsInRank
(
it
->
first
.
second
).
end
();
++
elIt
)
{
int
otherElementRank
=
elIt
->
first
;
ElementObjectData
&
perDofEl1
=
elIt
->
second
;
...
...
@@ -1601,15 +1601,15 @@ namespace AMDiS {
}
for
(
PerBoundMap
<
DofEdge
>::
iterator
it
=
elObj
ects
.
getPeriodicEdges
().
begin
();
it
!=
elObj
ects
.
getPeriodicEdges
().
end
();
++
it
)
{
if
(
elObj
ects
.
isInRank
(
it
->
first
.
first
,
mpiRank
)
==
false
)
for
(
PerBoundMap
<
DofEdge
>::
iterator
it
=
elObj
Db
.
getPeriodicEdges
().
begin
();
it
!=
elObj
Db
.
getPeriodicEdges
().
end
();
++
it
)
{
if
(
elObj
Db
.
isInRank
(
it
->
first
.
first
,
mpiRank
)
==
false
)
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
();
elIt
!=
elObj
ects
.
getElementsInRank
(
it
->
first
.
second
).
end
();
++
elIt
)
{
for
(
map
<
int
,
ElementObjectData
>::
iterator
elIt
=
elObj
Db
.
getElementsInRank
(
it
->
first
.
second
).
begin
();
elIt
!=
elObj
Db
.
getElementsInRank
(
it
->
first
.
second
).
end
();
++
elIt
)
{
int
otherElementRank
=
elIt
->
first
;
ElementObjectData
&
perEdgeEl1
=
elIt
->
second
;
...
...
@@ -1633,27 +1633,29 @@ namespace AMDiS {
b
=
bound
;
if
(
mpiRank
>
otherElementRank
)
b
.
neighObj
.
reverseMode
=
elObjects
.
getEdgeReverseMode
(
perEdgeEl0
,
perEdgeEl1
);
b
.
neighObj
.
reverseMode
=
elObjDb
.
getEdgeReverseMode
(
perEdgeEl0
,
perEdgeEl1
);
else
b
.
rankObj
.
reverseMode
=
elObjects
.
getEdgeReverseMode
(
perEdgeEl0
,
perEdgeEl1
);
b
.
rankObj
.
reverseMode
=
elObjDb
.
getEdgeReverseMode
(
perEdgeEl0
,
perEdgeEl1
);
}
}
for
(
PerBoundMap
<
DofFace
>::
iterator
it
=
elObj
ects
.
getPeriodicFaces
().
begin
();
it
!=
elObj
ects
.
getPeriodicFaces
().
end
();
++
it
)
{
if
(
elObj
ects
.
isInRank
(
it
->
first
.
first
,
mpiRank
)
==
false
)
for
(
PerBoundMap
<
DofFace
>::
iterator
it
=
elObj
Db
.
getPeriodicFaces
().
begin
();
it
!=
elObj
Db
.
getPeriodicFaces
().
end
();
++
it
)
{
if
(
elObj
Db
.
isInRank
(
it
->
first
.
first
,
mpiRank
)
==
false
)
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
"
);
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
"
);
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
();
elIt
!=
elObj
ects
.
getElementsInRank
(
it
->
first
.
second
).
end
();
++
elIt
)
{
for
(
map
<
int
,
ElementObjectData
>::
iterator
elIt
=
elObj
Db
.
getElementsInRank
(
it
->
first
.
second
).
begin
();
elIt
!=
elObj
Db
.
getElementsInRank
(
it
->
first
.
second
).
end
();
++
elIt
)
{
int
otherElementRank
=
elIt
->
first
;
ElementObjectData
&
perFaceEl1
=
elIt
->
second
;
...
...
@@ -1678,10 +1680,10 @@ namespace AMDiS {
if
(
mpiRank
>
otherElementRank
)
b
.
neighObj
.
reverseMode
=
elObj
ects
.
getFaceReverseMode
(
perFaceEl0
,
perFaceEl1
);
elObj
Db
.
getFaceReverseMode
(
perFaceEl0
,
perFaceEl1
);
else
b
.
rankObj
.
reverseMode
=
elObj
ects
.
getFaceReverseMode
(
perFaceEl0
,
perFaceEl1
);
elObj
Db
.
getFaceReverseMode
(
perFaceEl0
,
perFaceEl1
);
}
}
...
...
@@ -2259,7 +2261,7 @@ namespace AMDiS {
SerUtil
::
serialize
(
out
,
elemWeights
);
SerUtil
::
serialize
(
out
,
partitionMap
);
elObj
ects
.
serialize
(
out
);
elObj
Db
.
serialize
(
out
);
rankIntBoundary
.
serialize
(
out
);
otherIntBoundary
.
serialize
(
out
);
...
...
@@ -2329,7 +2331,7 @@ namespace AMDiS {
}
}
elObj
ects
.
deserialize
(
in
);
elObj
Db
.
deserialize
(
in
);
rankIntBoundary
.
deserialize
(
in
,
elIndexMap
);
otherIntBoundary
.
deserialize
(
in
,
elIndexMap
);
...
...
AMDiS/src/parallel/MeshDistributor.h
View file @
7bc84046
...
...
@@ -26,7 +26,7 @@
#include <mpi.h>
#include "parallel/DofComm.h"
#include "parallel/ElementObjectData.h"
#include "parallel/ElementObjectData
base
.h"
#include "parallel/ParallelTypes.h"
#include "parallel/MeshPartitioner.h"
#include "parallel/InteriorBoundary.h"
...
...
@@ -607,11 +607,9 @@ namespace AMDiS {
/// Mesh of the problem.
Mesh
*
mesh
;
/** \brief
* A refinement manager that should be used on the mesh. It is used to
* refine elements at interior boundaries in order to fit together with
* elements on the other side of the interior boundary.
*/
/// A refinement manager that should be used on the mesh. It is used to
/// refine elements at interior boundaries in order to fit together with
/// elements on the other side of the interior boundary.
RefinementManager
*
refineManager
;
/// Info level.
...
...
@@ -625,17 +623,15 @@ namespace AMDiS {
/// this element.
map
<
int
,
double
>
elemWeights
;
/** \brief
* Stores to every macro element index the number of the rank that owns this
* macro element.
*/
/// Stores to every macro element index the number of the rank that owns this
/// macro element.
map
<
int
,
int
>
partitionMap
;
map
<
const
FiniteElemSpace
*
,
DofData
>
dofFeData
;
/// Data
structure to store
all sub-objects of all elements of the
/// Data
base to store and query
all sub-objects of all elements of the
/// macro mesh.
ElementObject
s
elObjects
;
ElementObject
Database
elObjDb
;
/// Maps to each macro element index a pointer to the corresponding element.
map
<
int
,
Element
*>
macroElIndexMap
;
...
...
@@ -643,47 +639,35 @@ namespace AMDiS {
/// Maps to each macro element index the type of this element.
map
<
int
,
int
>
macroElIndexTypeMap
;
/** \brief
* Defines the interior boundaries of the domain that result from
* partitioning the whole mesh. Contains only the boundaries, which are
* owned by the rank, i.e., the object gives for every neighbour rank i
* the boundaries this rank owns and shares with rank i.
*/
/// Defines the interior boundaries of the domain that result from
/// partitioning the whole mesh. Contains only the boundaries, which are
/// owned by the rank, i.e., the object gives for every neighbour rank i
/// the boundaries this rank owns and shares with rank i.
InteriorBoundary
rankIntBoundary
;
/** \brief
* Defines the interior boundaries of the domain that result from
* partitioning the whole mesh. Contains only the boundaries, which are
* not owned by the rank, i.e., the object gives for every neighbour rank
* i the boundaries that are owned by rank i and are shared with this rank.
*/
/// Defines the interior boundaries of the domain that result from
/// partitioning the whole mesh. Contains only the boundaries, which are
/// not owned by the rank, i.e., the object gives for every neighbour rank
/// i the boundaries that are owned by rank i and are shared with this rank.
InteriorBoundary
otherIntBoundary
;
/** \brief
* Defines the periodic boundaries with other ranks. Periodic boundaries
* have no owner, as it is the case of interior boundaries.
*/
/// Defines the periodic boundaries with other ranks. Periodic boundaries
/// have no owner, as it is the case of interior boundaries.
InteriorBoundary
periodicBoundary
;
/** \brief
* This map contains for each rank the list of DOFs the current rank must
* send to exchange solution DOFs at the interior boundaries.
*/
/// This map contains for each rank the list of DOFs the current rank must
/// end to exchange solution DOFs at the interior boundaries.
DofComm
sendDofs
;
/** \brief
* This map contains on each rank the list of DOFs from which the current
* rank will receive DOF values (i.e., this are all DOFs at an interior
* boundary). The DOF indices are given in rank's local numbering.
*/
/// This map contains on each rank the list of DOFs from which the current
/// rank will receive DOF values (i.e., this are all DOFs at an interior
/// boundary). The DOF indices are given in rank's local numbering.
DofComm
recvDofs
;
/** \brief
* This map contains on each rank a list of DOFs along the interior bound-
* aries to communicate with other ranks. The DOF indices are given in rank's
* local numbering. Periodic boundaries within one subdomain are not
* considered here.
*/
/// This map contains on each rank a list of DOFs along the interior bound-
/// aries to communicate with other ranks. The DOF indices are given in rank's
/// local numbering. Periodic boundaries within one subdomain are not
/// considered here.
DofComm
periodicDofs
;
PeriodicMap
periodicMap
;
...
...
@@ -692,12 +676,10 @@ namespace AMDiS {
/// repartitioned.
vector
<
DOFVector
<
double
>*>
interchangeVectors
;
/** \brief
* If the problem definition has been read from a serialization file, this
* variable is true, otherwise it is false. This variable is used to stop the
* initialization function, if the problem definition has already been read
* from a serialization file.
*/
/// If the problem definition has been read from a serialization file, this
/// variable is true, otherwise it is false. This variable is used to stop the
/// initialization function, if the problem definition has already been read
/// from a serialization file.
bool
deserialized
;
/// Denotes whether there exists a filewriter for this object.
...
...
@@ -721,10 +703,8 @@ namespace AMDiS {
/// Directory name where all debug output files should be written to.
string
debugOutputDir
;
/** \brief
* Stores the mesh change index. This is used to recognize changes in the
* mesh structure (e.g. through refinement or coarsening managers).
*/
/// Stores the mesh change index. This is used to recognize changes in the
/// mesh structure (e.g. through refinement or coarsening managers).
long
lastMeshChangeIndex
;
/// Stores for all macro elements of the original macro mesh the
...
...
AMDiS/src/parallel/MeshManipulation.cc
View file @
7bc84046
...
...
@@ -43,7 +43,7 @@ namespace AMDiS {
void
MeshManipulation
::
deleteDoubleDofs
(
vector
<
const
FiniteElemSpace
*>&
feSpaces
,
std
::
set
<
MacroElement
*>&
newMacroEl
,
ElementObject
s
&
objects
)
ElementObject
Database
&
elObjDb
)
{
FUNCNAME
(
"MeshManipulation::deleteDoubleDofs()"
);
...
...
@@ -92,7 +92,7 @@ namespace AMDiS {
for
(
int
i
=
0
;
i
<
mesh
->
getGeo
(
VERTEX
);
i
++
)
{
vector
<
ElementObjectData
>
&
vertexEl
=
objects
.
getElementsVertex
((
*
it
)
->
getIndex
(),
i
);
elObjDb
.
getElementsVertex
((
*
it
)
->
getIndex
(),
i
);
for
(
vector
<
ElementObjectData
>::
iterator
elIt
=
vertexEl
.
begin
();
elIt
!=
vertexEl
.
end
();
++
elIt
)
{
...
...
@@ -121,7 +121,7 @@ namespace AMDiS {
ElementObjectData
elObj
((
*
it
)
->
getIndex
(),
i
);
vector
<
ElementObjectData
>
&
edgeEl
=
objects
.
getElementsEdge
((
*
it
)
->
getIndex
(),
i
);
elObjDb
.
getElementsEdge
((
*
it
)
->
getIndex
(),
i
);
for
(
vector
<
ElementObjectData
>::
iterator
elIt
=
edgeEl
.
begin
();
elIt
!=
edgeEl
.
end
();
++
elIt
)
{
...
...
@@ -135,7 +135,7 @@ namespace AMDiS {
Element
*
el0
=
(
*
it
)
->
getElement
();
Element
*
el1
=
macroIndexMap
[
elIt
->
elIndex
]
->
getElement
();
bool
reverseMode
=
objects
.
getEdgeReverseMode
(
elObj
,
*
elIt
);
bool
reverseMode
=
elObjDb
.
getEdgeReverseMode
(
elObj
,
*
elIt
);
BoundaryObject
b0
(
el0
,
0
,
EDGE
,
i
,
reverseMode
);
BoundaryObject
b1
(
el1
,
0
,
EDGE
,
elIt
->
ithObject
,
false
);
...
...
@@ -171,7 +171,7 @@ namespace AMDiS {
ElementObjectData
elObj
((
*
it
)
->
getIndex
(),
i
);
vector
<
ElementObjectData
>
&
faceEl
=
objects
.
getElementsFace
((
*
it
)
->
getIndex
(),
i
);
elObjDb
.
getElementsFace
((
*
it
)
->
getIndex
(),
i
);
for
(
vector
<
ElementObjectData
>::
iterator
elIt
=
faceEl
.
begin
();
elIt
!=
faceEl
.
end
();
++
elIt
)
{
...
...
@@ -179,12 +179,13 @@ namespace AMDiS {
continue
;
if
(
macrosProcessed
.
count
(
elIt
->
elIndex
)
==
1
)
{
TEST_EXIT_DBG
(
macroIndexMap
.
count
(
elIt
->
elIndex
))(
"Should not happen!
\n
"
);
TEST_EXIT_DBG
(
macroIndexMap
.
count
(
elIt
->
elIndex
))
(
"Should not happen!
\n
"
);
Element
*
el0
=
(
*
it
)
->
getElement
();
Element
*
el1
=
macroIndexMap
[
elIt
->
elIndex
]
->
getElement
();
bool
reverseMode
=
objects
.
getFaceReverseMode
(
elObj
,
*
elIt
);
bool
reverseMode
=
elObjDb
.
getFaceReverseMode
(
elObj
,
*
elIt
);
BoundaryObject
b0
(
el0
,
0
,
FACE
,
i
,
reverseMode
);
BoundaryObject
b1
(
el1
,
0
,
FACE
,
elIt
->
ithObject
,
false
);
...
...
AMDiS/src/parallel/MeshManipulation.h
View file @
7bc84046
...
...
@@ -27,7 +27,7 @@
#include <map>
#include "AMDiS_fwd.h"
#include "parallel/ElementObjectData.h"
#include "parallel/ElementObjectData
base
.h"