Skip to content
GitLab
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
c2460445
Commit
c2460445
authored
Jul 20, 2010
by
Thomas Witkowski
Browse files
Fixed parallel dirichlet boundary conditions problem.
parent
9a40446c
Changes
3
Hide whitespace changes
Inline
Side-by-side
AMDiS/src/DOFMatrix.cc
View file @
c2460445
...
...
@@ -210,8 +210,8 @@ namespace AMDiS {
if
(
condition
&&
condition
->
isDirichlet
())
{
if
(
condition
->
applyBoundaryCondition
())
{
#ifdef HAVE_PARALLEL_DOMAIN_AMDIS
if
((
*
rankDofs
)[
rowIndices
[
i
]])
applyDBCs
.
insert
(
static_cast
<
int
>
(
row
));
if
((
*
rankDofs
)[
rowIndices
[
i
]])
applyDBCs
.
insert
(
static_cast
<
int
>
(
row
));
#else
applyDBCs
.
insert
(
static_cast
<
int
>
(
row
));
#endif
...
...
@@ -219,11 +219,6 @@ namespace AMDiS {
}
else
{
for
(
int
j
=
0
;
j
<
nCol
;
j
++
)
{
DegreeOfFreedom
col
=
colIndices
[
j
];
// if (MPI::COMM_WORLD.Get_rank() == 0 && row <= 10 && col <= 10) {
// MSG("%d/%d entry: %e\n", row, col, elMat[i][j]);
// }
ins
[
row
][
col
]
+=
elMat
[
i
][
j
];
}
}
...
...
AMDiS/src/parallel/GlobalMatrixSolver.cc
View file @
c2460445
...
...
@@ -247,6 +247,15 @@ namespace AMDiS {
// owner of the row DOFs.
std
::
map
<
int
,
MatrixNnzEntry
>
sendMatrixEntry
;
// First, create for all ranks we send data to MatrixNnzEntry object with 0 entries.
typedef
std
::
map
<
int
,
DofContainer
>
RankToDofContainer
;
RankToDofContainer
&
recvDofs
=
meshDistributor
->
getRecvDofs
();
for
(
RankToDofContainer
::
iterator
it
=
recvDofs
.
begin
();
it
!=
recvDofs
.
end
();
++
it
)
sendMatrixEntry
[
it
->
first
].
resize
(
0
);
for
(
int
i
=
0
;
i
<
nComponents
;
i
++
)
{
for
(
int
j
=
0
;
j
<
nComponents
;
j
++
)
{
if
((
*
mat
)[
i
][
j
])
{
...
...
@@ -347,6 +356,7 @@ namespace AMDiS {
stdMpi
.
recv
(
meshDistributor
->
getSendDofs
());
stdMpi
.
startCommunication
<
int
>
(
MPI_INT
);
// === Evaluate the nnz structure this rank got from other ranks and add it to ===
// === the PETSc nnz data structure. ===
...
...
@@ -412,10 +422,12 @@ namespace AMDiS {
lastMeshNnz
=
meshDistributor
->
getLastMeshChangeIndex
();
}
// === Create PETSc matrix with the computed nnz data structure. ===
MatCreateMPIAIJ
(
PETSC_COMM_WORLD
,
nRankRows
,
nRankRows
,
nOverallRows
,
nOverallRows
,
0
,
d_nnz
,
0
,
o_nnz
,
&
petscMatrix
);
// 0, PETSC_NULL, 0, PETSC_NULL, &petscMatrix);
0
,
d_nnz
,
0
,
o_nnz
,
&
petscMatrix
);
#if (DEBUG != 0)
INFO
(
info
,
8
)(
"Fill petsc matrix 1 needed %.5f seconds
\n
"
,
TIME_USED
(
first
,
clock
()));
...
...
AMDiS/src/parallel/MeshDistributor.cc
View file @
c2460445
...
...
@@ -432,7 +432,7 @@ namespace AMDiS {
for
(
int
k
=
0
;
k
<
nComponents
;
k
++
)
{
DOFMatrix
*
mat
=
probStat
[
i
]
->
getSystemMatrix
(
j
,
k
);
if
(
mat
&&
mat
->
getBoundaryManager
())
removePeriodicBoundaryConditions
(
const_cast
<
BoundaryIndexMap
&>
(
mat
->
getBoundaryManager
()
->
getBoundaryConditionMap
()));
removePeriodicBoundaryConditions
(
const_cast
<
BoundaryIndexMap
&>
(
mat
->
getBoundaryManager
()
->
getBoundaryConditionMap
()));
}
if
(
probStat
[
i
]
->
getSolution
()
->
getDOFVector
(
j
)
->
getBoundaryManager
())
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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