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
Aland, Sebastian
amdis
Commits
efa50b10
Commit
efa50b10
authored
Aug 22, 2012
by
Thomas Witkowski
Browse files
Removed output
parent
cdb4ba50
Changes
4
Hide whitespace changes
Inline
Side-by-side
AMDiS/src/parallel/MatrixNnzStructure.cc
View file @
efa50b10
...
@@ -48,8 +48,6 @@ namespace AMDiS {
...
@@ -48,8 +48,6 @@ namespace AMDiS {
int
nRankCols
=
colDofMap
.
getRankDofs
();
int
nRankCols
=
colDofMap
.
getRankDofs
();
int
rankStartColIndex
=
colDofMap
.
getStartDofs
();
int
rankStartColIndex
=
colDofMap
.
getStartDofs
();
MSG
(
"RANK DOFS FOR NNZ = %d %d
\n
"
,
nRankRows
,
(
!
localMatrix
?
nRankRows
:
-
1
));
create
(
nRankRows
,
(
!
localMatrix
?
nRankRows
:
-
1
));
create
(
nRankRows
,
(
!
localMatrix
?
nRankRows
:
-
1
));
using
mtl
::
tag
::
row
;
using
mtl
::
tag
::
nz
;
using
mtl
::
begin
;
using
mtl
::
end
;
using
mtl
::
tag
::
row
;
using
mtl
::
tag
::
nz
;
using
mtl
::
begin
;
using
mtl
::
end
;
...
@@ -251,11 +249,9 @@ namespace AMDiS {
...
@@ -251,11 +249,9 @@ namespace AMDiS {
if
(
colDofMap
[
colFeSpace
].
find
(
col
(
*
icursor
),
colDofIndex
)
==
false
)
if
(
colDofMap
[
colFeSpace
].
find
(
col
(
*
icursor
),
colDofIndex
)
==
false
)
continue
;
continue
;
MSG
(
"GET COL INDEX: %d
\n
"
,
colComp
);
int
petscColIdx
=
(
colDofMap
.
isMatIndexFromGlobal
()
?
int
petscColIdx
=
(
colDofMap
.
isMatIndexFromGlobal
()
?
colDofMap
.
getMatIndex
(
colComp
,
colDofIndex
.
global
)
:
colDofMap
.
getMatIndex
(
colComp
,
colDofIndex
.
global
)
:
colDofMap
.
getMatIndex
(
colComp
,
col
(
*
icursor
)));
colDofMap
.
getMatIndex
(
colComp
,
col
(
*
icursor
)));
MSG
(
"GOT
\n
"
);
sendMatrixEntry
[
sendToRank
].
sendMatrixEntry
[
sendToRank
].
push_back
(
make_pair
(
petscRowIdx
,
petscColIdx
));
push_back
(
make_pair
(
petscRowIdx
,
petscColIdx
));
...
...
AMDiS/src/parallel/ParallelCoarseSpaceMatVec.cc
View file @
efa50b10
...
@@ -100,9 +100,6 @@ namespace AMDiS {
...
@@ -100,9 +100,6 @@ namespace AMDiS {
TEST_EXIT_DBG
(
found
)(
"Should not happen!
\n
"
);
TEST_EXIT_DBG
(
found
)(
"Should not happen!
\n
"
);
}
}
for
(
int
i
=
0
;
i
<
componentIthCoarseMap
.
size
();
i
++
)
MSG
(
"COMP %d -> %d
\n
"
,
i
,
componentIthCoarseMap
[
i
]);
}
}
...
@@ -138,7 +135,6 @@ namespace AMDiS {
...
@@ -138,7 +135,6 @@ namespace AMDiS {
nnz
[
i
][
j
].
clear
();
nnz
[
i
][
j
].
clear
();
}
}
MSG
(
"CREATE MAT NNZ 0 - 0
\n
"
);
nnz
[
0
][
0
].
create
(
seqMat
,
mpiCommGlobal
,
*
interiorMap
,
nnz
[
0
][
0
].
create
(
seqMat
,
mpiCommGlobal
,
*
interiorMap
,
(
coarseSpaceMap
.
size
()
==
0
?
&
(
meshDistributor
->
getPeriodicMap
())
:
NULL
),
(
coarseSpaceMap
.
size
()
==
0
?
&
(
meshDistributor
->
getPeriodicMap
())
:
NULL
),
meshDistributor
->
getElementObjectDb
(),
meshDistributor
->
getElementObjectDb
(),
...
@@ -154,8 +150,6 @@ namespace AMDiS {
...
@@ -154,8 +150,6 @@ namespace AMDiS {
ParallelDofMapping
&
colMap
=
ParallelDofMapping
&
colMap
=
(
j
==
0
?
*
interiorMap
:
*
(
uniqueCoarseMap
[
j
-
1
]));
(
j
==
0
?
*
interiorMap
:
*
(
uniqueCoarseMap
[
j
-
1
]));
MSG
(
"CREATE MAT NNZ %d - %d WITH ROWS %d
\n
"
,
i
,
j
,
rowMap
.
getRankDofs
());
nnz
[
i
][
j
].
create
(
seqMat
,
mpiCommGlobal
,
rowMap
,
colMap
,
NULL
,
nnz
[
i
][
j
].
create
(
seqMat
,
mpiCommGlobal
,
rowMap
,
colMap
,
NULL
,
meshDistributor
->
getElementObjectDb
());
meshDistributor
->
getElementObjectDb
());
}
}
...
@@ -169,8 +163,6 @@ namespace AMDiS {
...
@@ -169,8 +163,6 @@ namespace AMDiS {
int
nRankInteriorRows
=
interiorMap
->
getRankDofs
();
int
nRankInteriorRows
=
interiorMap
->
getRankDofs
();
int
nOverallInteriorRows
=
interiorMap
->
getOverallDofs
();
int
nOverallInteriorRows
=
interiorMap
->
getOverallDofs
();
MSG
(
"CREATE INTERIOR MAT!
\n
"
);
if
(
localMatrix
)
{
if
(
localMatrix
)
{
MatCreateSeqAIJ
(
mpiCommLocal
,
nRankInteriorRows
,
nRankInteriorRows
,
MatCreateSeqAIJ
(
mpiCommLocal
,
nRankInteriorRows
,
nRankInteriorRows
,
0
,
nnz
[
0
][
0
].
dnnz
,
0
,
nnz
[
0
][
0
].
dnnz
,
...
@@ -187,9 +179,6 @@ namespace AMDiS {
...
@@ -187,9 +179,6 @@ namespace AMDiS {
VecCreateMPI
(
mpiCommGlobal
,
nRankInteriorRows
,
nOverallInteriorRows
,
&
vecSol
[
0
]);
VecCreateMPI
(
mpiCommGlobal
,
nRankInteriorRows
,
nOverallInteriorRows
,
&
vecSol
[
0
]);
VecCreateMPI
(
mpiCommGlobal
,
nRankInteriorRows
,
nOverallInteriorRows
,
&
vecRhs
[
0
]);
VecCreateMPI
(
mpiCommGlobal
,
nRankInteriorRows
,
nOverallInteriorRows
,
&
vecRhs
[
0
]);
MSG
(
"DONE!
\n
"
);
int
nCoarseMap
=
uniqueCoarseMap
.
size
();
int
nCoarseMap
=
uniqueCoarseMap
.
size
();
for
(
int
i
=
0
;
i
<
nCoarseMap
;
i
++
)
{
for
(
int
i
=
0
;
i
<
nCoarseMap
;
i
++
)
{
ParallelDofMapping
*
cMap
=
uniqueCoarseMap
[
i
];
ParallelDofMapping
*
cMap
=
uniqueCoarseMap
[
i
];
...
@@ -197,14 +186,13 @@ namespace AMDiS {
...
@@ -197,14 +186,13 @@ namespace AMDiS {
int
nRankCoarseRows
=
cMap
->
getRankDofs
();
int
nRankCoarseRows
=
cMap
->
getRankDofs
();
int
nOverallCoarseRows
=
cMap
->
getOverallDofs
();
int
nOverallCoarseRows
=
cMap
->
getOverallDofs
();
MSG
(
"CREATE MAT COARSE %d OF SIZE %d %d
\n
"
,
i
+
1
,
nRankCoarseRows
,
nOverallCoarseRows
);
MatCreateAIJ
(
mpiCommGlobal
,
MatCreateAIJ
(
mpiCommGlobal
,
nRankCoarseRows
,
nRankCoarseRows
,
nRankCoarseRows
,
nRankCoarseRows
,
nOverallCoarseRows
,
nOverallCoarseRows
,
nOverallCoarseRows
,
nOverallCoarseRows
,
0
,
nnz
[
i
+
1
][
i
+
1
].
dnnz
,
0
,
nnz
[
i
+
1
][
i
+
1
].
onnz
,
0
,
nnz
[
i
+
1
][
i
+
1
].
dnnz
,
0
,
nnz
[
i
+
1
][
i
+
1
].
onnz
,
&
mat
[
i
+
1
][
i
+
1
]);
&
mat
[
i
+
1
][
i
+
1
]);
MSG
(
"REMOVE THIS!
\n
"
);
M
SG
(
"DONE!
\n
"
);
M
atSetOption
(
mat
[
i
+
1
][
i
+
1
],
MAT_NEW_NONZERO_ALLOCATION_ERR
,
PETSC_FALSE
);
VecCreateMPI
(
mpiCommGlobal
,
nRankCoarseRows
,
nOverallCoarseRows
,
VecCreateMPI
(
mpiCommGlobal
,
nRankCoarseRows
,
nOverallCoarseRows
,
&
vecSol
[
i
+
1
]);
&
vecSol
[
i
+
1
]);
...
@@ -212,35 +200,34 @@ namespace AMDiS {
...
@@ -212,35 +200,34 @@ namespace AMDiS {
&
vecRhs
[
i
+
1
]);
&
vecRhs
[
i
+
1
]);
}
}
MSG
(
"NCOARSEMAP = %d
\n
"
,
nCoarseMap
);
for
(
int
i
=
0
;
i
<
nCoarseMap
+
1
;
i
++
)
{
for
(
int
i
=
0
;
i
<
nCoarseMap
+
1
;
i
++
)
{
for
(
int
j
=
0
;
j
<
nCoarseMap
+
1
;
j
++
)
{
for
(
int
j
=
0
;
j
<
nCoarseMap
+
1
;
j
++
)
{
if
(
i
==
j
)
if
(
i
==
j
)
continue
;
continue
;
MSG
(
"CHECK FOR %d %d
\n
"
,
i
,
j
);
int
nRowsRankMat
=
(
i
==
0
?
nRankInteriorRows
:
uniqueCoarseMap
[
i
-
1
]
->
getRankDofs
());
int
nRowsRankMat
=
(
i
==
0
?
nRankInteriorRows
:
uniqueCoarseMap
[
i
-
1
]
->
getRankDofs
());
int
nRowsOverallMat
=
(
i
==
0
?
nOverallInteriorRows
:
uniqueCoarseMap
[
i
-
1
]
->
getOverallDofs
());
int
nRowsOverallMat
=
(
i
==
0
?
nOverallInteriorRows
:
uniqueCoarseMap
[
i
-
1
]
->
getOverallDofs
());
int
nColsRankMat
=
(
j
==
0
?
nRankInteriorRows
:
uniqueCoarseMap
[
j
-
1
]
->
getRankDofs
());
int
nColsRankMat
=
(
j
==
0
?
nRankInteriorRows
:
uniqueCoarseMap
[
j
-
1
]
->
getRankDofs
());
int
nColsOverallMat
=
(
j
==
0
?
nOverallInteriorRows
:
uniqueCoarseMap
[
j
-
1
]
->
getOverallDofs
());
int
nColsOverallMat
=
(
j
==
0
?
nOverallInteriorRows
:
uniqueCoarseMap
[
j
-
1
]
->
getOverallDofs
());
MSG
(
"CREATE-A MAT %d %d
\n
"
,
i
,
j
);
MatCreateAIJ
(
mpiCommGlobal
,
MatCreateAIJ
(
mpiCommGlobal
,
nRowsRankMat
,
nColsRankMat
,
nRowsRankMat
,
nColsRankMat
,
nRowsOverallMat
,
nColsOverallMat
,
nRowsOverallMat
,
nColsOverallMat
,
0
,
nnz
[
i
][
j
].
dnnz
,
0
,
nnz
[
i
][
j
].
onnz
,
0
,
nnz
[
i
][
j
].
dnnz
,
0
,
nnz
[
i
][
j
].
onnz
,
&
mat
[
i
][
j
]);
&
mat
[
i
][
j
]);
MSG
(
"DONE!
\n
"
);
MSG
(
"REMOVE THIS!
\n
"
);
MatSetOption
(
mat
[
i
][
j
],
MAT_NEW_NONZERO_ALLOCATION_ERR
,
PETSC_FALSE
);
MSG
(
"CREATE-B MAT %d %d WITH SIZE ...
\n
"
,
j
,
i
);
MatCreateAIJ
(
mpiCommGlobal
,
MatCreateAIJ
(
mpiCommGlobal
,
nColsRankMat
,
nRowsRankMat
,
nColsRankMat
,
nRowsRankMat
,
nColsOverallMat
,
nRowsOverallMat
,
nColsOverallMat
,
nRowsOverallMat
,
0
,
nnz
[
j
][
i
].
dnnz
,
0
,
nnz
[
j
][
i
].
onnz
,
0
,
nnz
[
j
][
i
].
dnnz
,
0
,
nnz
[
j
][
i
].
onnz
,
&
mat
[
j
][
i
]);
&
mat
[
j
][
i
]);
MSG
(
"DONE!
\n
"
);
MSG
(
"REMOVE THIS!
\n
"
);
MatSetOption
(
mat
[
j
][
i
],
MAT_NEW_NONZERO_ALLOCATION_ERR
,
PETSC_FALSE
);
}
}
}
}
}
}
...
...
AMDiS/src/parallel/PetscSolverFeti.cc
View file @
efa50b10
...
@@ -691,10 +691,18 @@ namespace AMDiS {
...
@@ -691,10 +691,18 @@ namespace AMDiS {
int
nLocalInterior
=
0
;
int
nLocalInterior
=
0
;
for
(
int
i
=
0
;
i
<
admin
->
getUsedSize
();
i
++
)
{
for
(
int
i
=
0
;
i
<
admin
->
getUsedSize
();
i
++
)
{
if
(
i
==
0
)
{
MSG
(
"JETZT: %d %d %d %d
\n
"
,
admin
->
isDofFree
(
i
),
isPrimal
(
feSpace
,
i
),
isDual
(
feSpace
,
i
),
isInterface
(
feSpace
,
i
));
}
if
(
admin
->
isDofFree
(
i
)
==
false
&&
if
(
admin
->
isDofFree
(
i
)
==
false
&&
isPrimal
(
feSpace
,
i
)
==
false
&&
isPrimal
(
feSpace
,
i
)
==
false
&&
isDual
(
feSpace
,
i
)
==
false
&&
isDual
(
feSpace
,
i
)
==
false
&&
isInterface
(
feSpace
,
i
)
==
false
)
{
isInterface
(
feSpace
,
i
)
==
false
)
{
if
(
i
==
0
)
{
MSG
(
"DRIN
\n
"
);
}
if
(
meshLevel
==
0
)
{
if
(
meshLevel
==
0
)
{
localDofMap
[
feSpace
].
insertRankDof
(
i
,
nLocalInterior
);
localDofMap
[
feSpace
].
insertRankDof
(
i
,
nLocalInterior
);
...
...
AMDiS/src/parallel/PetscSolverGlobalMatrix.cc
View file @
efa50b10
...
@@ -147,7 +147,7 @@ namespace AMDiS {
...
@@ -147,7 +147,7 @@ namespace AMDiS {
cend
=
end
<
row
>
(
dofMat
->
getBaseMatrix
());
cursor
!=
cend
;
++
cursor
)
{
cend
=
end
<
row
>
(
dofMat
->
getBaseMatrix
());
cursor
!=
cend
;
++
cursor
)
{
bool
isRowCoarse
=
bool
isRowCoarse
=
isCoarseSpace
(
rowComponent
,
feSpaces
[
col
Component
],
*
cursor
);
isCoarseSpace
(
rowComponent
,
feSpaces
[
row
Component
],
*
cursor
);
cols
.
clear
();
cols
.
clear
();
colsOther
.
clear
();
colsOther
.
clear
();
...
...
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