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
Aland, Sebastian
amdis
Commits
3dc8e48f
Commit
3dc8e48f
authored
Jan 17, 2012
by
Thomas Witkowski
Browse files
Fixed bugs due to last changes in parallel code.
parent
3dae32b2
Changes
3
Hide whitespace changes
Inline
Side-by-side
AMDiS/src/parallel/MeshDistributor.cc
View file @
3dc8e48f
...
...
@@ -160,7 +160,6 @@ namespace AMDiS {
}
}
while
(
doNext
);
elObjects
.
setMesh
(
feSpaces
[
0
]
->
getMesh
());
// If the problem has been already read from a file, we need only to set
...
...
@@ -532,12 +531,13 @@ namespace AMDiS {
vector
<
double
>
dofs
;
for
(
int
i
=
0
;
i
<
nComponents
;
i
++
)
{
TEST_EXIT_DBG
(
sendIt
->
second
.
count
(
vec
.
getFeSpace
(
i
)))
(
"Should not happen!
\n
"
);
DofContainer
&
feDofs
=
sendIt
->
second
[
vec
.
getFeSpace
(
i
)];
DOFVector
<
double
>&
dofVec
=
*
(
vec
.
getDOFVector
(
i
));
int
nFeDofs
=
feDofs
.
size
();
dofs
.
resize
(
dofs
.
size
()
+
nFeDofs
);
for
(
int
j
=
0
;
j
<
nFeDofs
;
j
++
)
dofs
.
push_back
(
dofVec
[
*
(
feDofs
[
j
])]);
}
...
...
@@ -947,12 +947,8 @@ namespace AMDiS {
it
!=
allBound
.
end
();
++
it
)
stdMpi
.
recv
(
it
->
first
);
MSG
(
"DA 1
\n
"
);
stdMpi
.
startCommunication
();
MSG
(
"DA 2
\n
"
);
// === Compare received mesh structure codes. ===
bool
meshChanged
=
false
;
...
...
@@ -1178,7 +1174,7 @@ namespace AMDiS {
// === Run mesh partitioner to calculate a new mesh partitioning. ===
//
partitioner->setLocalGlobalDofMap(&mapLocalGlobalDofs);
partitioner
->
setLocalGlobalDofMap
(
&
(
dofFeData
[
feSpaces
[
0
]].
mapLocalGlobalDofs
)
)
;
bool
partitioningSucceed
=
partitioner
->
partition
(
elemWeights
,
ADAPTIVE_REPART
);
if
(
!
partitioningSucceed
)
{
MSG
(
"Mesh partitioner created empty partition!
\n
"
);
...
...
@@ -1919,14 +1915,13 @@ namespace AMDiS {
updateLocalGlobalNumbering
(
feSpaces
[
i
]);
#if (DEBUG != 0)
MSG
(
"------------- Debug information -------------
\n
"
);
for
(
unsigned
int
i
=
0
;
i
<
feSpaces
.
size
();
i
++
)
{
MSG
(
"FE space %d:
\n
"
,
i
);
MSG
(
" nRankDofs = %d
\n
"
,
dofFeData
[
feSpaces
[
i
]].
nRankDofs
);
MSG
(
" nOverallDofs = %d
\n
"
,
dofFeData
[
feSpaces
[
i
]].
nOverallDofs
);
MSG
(
" rStartDofs %d
\n
"
,
dofFeData
[
feSpaces
[
i
]].
rStartDofs
);
MSG
(
" rStartDofs
=
%d
\n
"
,
dofFeData
[
feSpaces
[
i
]].
rStartDofs
);
}
stringstream
oss
;
...
...
@@ -2273,6 +2268,8 @@ namespace AMDiS {
{
FUNCNAME
(
"MeshDistributor::mapGlobalToLocal()"
);
TEST_EXIT_DBG
(
dofFeData
.
count
(
feSpace
))(
"Should not happen!
\n
"
);
for
(
DofMapping
::
iterator
it
=
dofFeData
[
feSpace
].
mapLocalGlobalDofs
.
begin
();
it
!=
dofFeData
[
feSpace
].
mapLocalGlobalDofs
.
end
();
++
it
)
if
(
it
->
second
==
dof
)
...
...
AMDiS/src/parallel/MeshDistributor.h
View file @
3dc8e48f
...
...
@@ -168,23 +168,39 @@ namespace AMDiS {
/// Returns \ref nRankDOFs, the number of DOFs in the rank mesh.
inline
int
getNumberRankDofs
(
const
FiniteElemSpace
*
feSpace
)
{
FUNCNAME
(
"MeshDistributor::getNumberRankDofs()"
);
TEST_EXIT_DBG
(
dofFeData
.
count
(
feSpace
))(
"Should not happen!
\n
"
);
return
dofFeData
[
feSpace
].
nRankDofs
;
}
/// Returns \ref rStartDofs, the first global DOF index owned by rank.
inline
int
getStartDofs
(
const
FiniteElemSpace
*
feSpace
)
{
FUNCNAME
(
"MeshDistributor::getStartDofs()"
);
TEST_EXIT_DBG
(
dofFeData
.
count
(
feSpace
))(
"Should not happen!
\n
"
);
return
dofFeData
[
feSpace
].
rStartDofs
;
}
/// Returns \ref nOverallDofs, the global number of DOFs.
inline
int
getNumberOverallDofs
(
const
FiniteElemSpace
*
feSpace
)
{
FUNCNAME
(
"MeshDistributor::getNumberOverallDofs()"
);
TEST_EXIT_DBG
(
dofFeData
.
count
(
feSpace
))(
"Should not happen!
\n
"
);
return
dofFeData
[
feSpace
].
nOverallDofs
;
}
inline
DofMapping
&
getMapLocalGlobalDofs
(
const
FiniteElemSpace
*
feSpace
)
{
FUNCNAME
(
"MeshDistributor::getMapLocalGlobalDofs()"
);
TEST_EXIT_DBG
(
dofFeData
.
count
(
feSpace
))(
"Should not happen!
\n
"
);
return
dofFeData
[
feSpace
].
mapLocalGlobalDofs
;
}
...
...
@@ -192,6 +208,11 @@ namespace AMDiS {
inline
DegreeOfFreedom
mapLocalToGlobal
(
const
FiniteElemSpace
*
feSpace
,
DegreeOfFreedom
dof
)
{
FUNCNAME
(
"MeshDistributor::mapLocalToGlobal()"
);
TEST_EXIT_DBG
(
dofFeData
.
count
(
feSpace
))
(
"No DOF data for FE space at addr %p!
\n
"
,
feSpace
);
return
dofFeData
[
feSpace
].
mapLocalGlobalDofs
[
dof
];
}
...
...
@@ -202,6 +223,11 @@ namespace AMDiS {
inline
DegreeOfFreedom
mapLocalToDofIndex
(
const
FiniteElemSpace
*
feSpace
,
DegreeOfFreedom
dof
)
{
FUNCNAME
(
"MeshDistributor::mapLocalToDofIndex()"
);
TEST_EXIT_DBG
(
dofFeData
.
count
(
feSpace
))
(
"No DOF data for FE space at addr %p!
\n
"
,
feSpace
);
return
dofFeData
[
feSpace
].
mapLocalDofIndex
[
dof
];
}
...
...
AMDiS/src/parallel/PetscSolverGlobalMatrix.cc
View file @
3dc8e48f
...
...
@@ -427,7 +427,7 @@ namespace AMDiS {
{
FUNCNAME
(
"PetscSolverGlobalMatrix::setDofVector()"
);
const
FiniteElemSpace
*
feSpace
;
const
FiniteElemSpace
*
feSpace
=
meshDistributor
->
getFeSpace
(
0
)
;
// Traverse all used DOFs in the dof vector.
DOFVector
<
double
>::
Iterator
dofIt
(
vec
,
USED_DOFS
);
...
...
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