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
cbcf61f6
Commit
cbcf61f6
authored
Aug 27, 2012
by
Thomas Witkowski
Browse files
Merge for debugging
parent
b81cf528
Changes
2
Show whitespace changes
Inline
Side-by-side
AMDiS/src/parallel/PetscSolverFeti.cc
View file @
cbcf61f6
...
...
@@ -275,6 +275,10 @@ namespace AMDiS {
it
!=
vertices
.
end
();
++
it
)
{
double
e
=
1e-8
;
if
(
meshLevel
==
0
)
{
WorldVector
<
double
>
c
;
feSpace
->
getMesh
()
->
getDofIndexCoords
(
*
it
,
feSpace
,
c
);
if
(
fabs
(
c
[
1
])
>
1
&&
fabs
(
c
[
1
])
<
19
)
primals
.
insert
(
**
it
);
}
else
{
WorldVector
<
double
>
c
;
...
...
@@ -990,6 +994,61 @@ namespace AMDiS {
{
FUNCNAME
(
"PetscSolverFeti::dbgMatrix()"
);
#if (DEBUG != 0)
PetscInt
nRow
,
nCol
;
MatGetSize
(
subdomain
->
getMatInterior
(),
&
nRow
,
&
nCol
);
mpi
::
globalAdd
(
nRow
);
mpi
::
globalAdd
(
nCol
);
MatInfo
minfo
;
MatGetInfo
(
subdomain
->
getMatInterior
(),
MAT_GLOBAL_SUM
,
&
minfo
);
int
nnz
=
static_cast
<
int
>
(
minfo
.
nz_used
);
mpi
::
globalAdd
(
nnz
);
MSG
(
"Interior matrices [%d x %d] nnz = %d
\n
"
,
nRow
,
nCol
,
nnz
);
MatGetSize
(
subdomain
->
getMatCoarse
(),
&
nRow
,
&
nCol
);
MatGetInfo
(
subdomain
->
getMatCoarse
(),
MAT_GLOBAL_SUM
,
&
minfo
);
MSG
(
"Primal matrix [%d x %d] nnz = %d
\n
"
,
nRow
,
nCol
,
static_cast
<
int
>
(
minfo
.
nz_used
));
MatGetSize
(
subdomain
->
getMatCoarseInterior
(),
&
nRow
,
&
nCol
);
MatGetInfo
(
subdomain
->
getMatCoarseInterior
(),
MAT_GLOBAL_SUM
,
&
minfo
);
MSG
(
"Primal-Interior matrix [%d x %d] nnz = %d
\n
"
,
nRow
,
nCol
,
static_cast
<
int
>
(
minfo
.
nz_used
));
MatGetSize
(
subdomain
->
getMatInteriorCoarse
(),
&
nRow
,
&
nCol
);
MatGetInfo
(
subdomain
->
getMatInteriorCoarse
(),
MAT_GLOBAL_SUM
,
&
minfo
);
MSG
(
"Interior-Primal matrix [%d x %d] nnz = %d
\n
"
,
nRow
,
nCol
,
static_cast
<
int
>
(
minfo
.
nz_used
));
if
(
enableStokesMode
)
{
MatGetSize
(
subdomain
->
getMatCoarse
(
1
,
1
),
&
nRow
,
&
nCol
);
MatGetInfo
(
subdomain
->
getMatCoarse
(
1
,
1
),
MAT_GLOBAL_SUM
,
&
minfo
);
MSG
(
"Interface matrix [%d x %d] nnz = %d
\n
"
,
nRow
,
nCol
,
static_cast
<
int
>
(
minfo
.
nz_used
));
MatGetSize
(
subdomain
->
getMatCoarseInterior
(
1
),
&
nRow
,
&
nCol
);
MatGetInfo
(
subdomain
->
getMatCoarseInterior
(
1
),
MAT_GLOBAL_SUM
,
&
minfo
);
MSG
(
"Interface-Interior matrix [%d x %d] nnz = %d
\n
"
,
nRow
,
nCol
,
static_cast
<
int
>
(
minfo
.
nz_used
));
MatGetSize
(
subdomain
->
getMatInteriorCoarse
(
1
),
&
nRow
,
&
nCol
);
MatGetInfo
(
subdomain
->
getMatInteriorCoarse
(
1
),
MAT_GLOBAL_SUM
,
&
minfo
);
MSG
(
"Interior-Interface matrix [%d x %d] nnz = %d
\n
"
,
nRow
,
nCol
,
static_cast
<
int
>
(
minfo
.
nz_used
));
MatGetSize
(
subdomain
->
getMatCoarse
(
1
,
0
),
&
nRow
,
&
nCol
);
MatGetInfo
(
subdomain
->
getMatCoarse
(
1
,
0
),
MAT_GLOBAL_SUM
,
&
minfo
);
MSG
(
"Interface-Primal matrix [%d x %d] nnz = %d
\n
"
,
nRow
,
nCol
,
static_cast
<
int
>
(
minfo
.
nz_used
));
MatGetSize
(
subdomain
->
getMatCoarse
(
0
,
1
),
&
nRow
,
&
nCol
);
MatGetInfo
(
subdomain
->
getMatCoarse
(
0
,
1
),
MAT_GLOBAL_SUM
,
&
minfo
);
MSG
(
"Primal-Interface matrix [%d x %d] nnz = %d
\n
"
,
nRow
,
nCol
,
static_cast
<
int
>
(
minfo
.
nz_used
));
}
#endif
int
writeInteriorMatrix
=
-
1
;
Parameters
::
get
(
"parallel->debug->write interior matrix"
,
writeInteriorMatrix
);
...
...
AMDiS/src/parallel/PetscSolverGlobalMatrix.cc
View file @
cbcf61f6
...
...
@@ -106,9 +106,6 @@ namespace AMDiS {
vector
<
const
FiniteElemSpace
*>
feSpaces
=
AMDiS
::
getComponentFeSpaces
(
*
seqMat
);
int
nRowsRankInterior
=
interiorMap
->
getRankDofs
();
int
nRowsOverallInterior
=
interiorMap
->
getOverallDofs
();
// === Prepare traverse of sequentially created matrices. ===
using
mtl
::
tag
::
row
;
using
mtl
::
tag
::
nz
;
using
mtl
::
begin
;
using
mtl
::
end
;
...
...
@@ -174,25 +171,19 @@ namespace AMDiS {
// === Set matrix values. ===
if
(
isRowCoarse
)
{
int
rowIndex
=
rowCoarseSpace
->
getMatIndex
(
rowComponent
,
*
cursor
);
for
(
unsigned
int
i
=
0
;
i
<
cols
.
size
();
i
++
)
cols
[
i
]
=
colCoarseSpace
->
getMatIndex
(
colComponent
,
cols
[
i
]);
int
rowIndex
=
rowCoarseSpace
->
getMatIndex
(
rowComponent
,
*
cursor
);
MatSetValues
(
getMatCoarseByComponent
(
rowComponent
,
colComponent
),
1
,
&
rowIndex
,
cols
.
size
(),
&
(
cols
[
0
]),
&
(
values
[
0
]),
ADD_VALUES
);
if
(
colsOther
.
size
())
{
if
(
subdomainLevel
==
0
)
{
for
(
unsigned
int
i
=
0
;
i
<
colsOther
.
size
();
i
++
)
colsOther
[
i
]
=
interiorMap
->
getMatIndex
(
colComponent
,
colsOther
[
i
]);
}
else
{
for
(
unsigned
int
i
=
0
;
i
<
colsOther
.
size
();
i
++
)
colsOther
[
i
]
=
interiorMap
->
getMatIndex
(
colComponent
,
colsOther
[
i
])
+
rStartInterior
;
}
MatSetValues
(
getMatCoarseInteriorByComponent
(
rowComponent
),
1
,
&
rowIndex
,
colsOther
.
size
(),
...
...
@@ -215,10 +206,8 @@ namespace AMDiS {
&
(
cols
[
0
]),
&
(
values
[
0
]),
ADD_VALUES
);
if
(
colsOther
.
size
())
{
int
globalRowIndex
=
interiorMap
->
getMatIndex
(
rowComponent
,
*
cursor
);
if
(
subdomainLevel
!=
0
)
globalRowIndex
+=
rStartInterior
;
int
globalRowIndex
=
interiorMap
->
getMatIndex
(
rowComponent
,
*
cursor
)
+
rStartInterior
;
for
(
unsigned
int
i
=
0
;
i
<
colsOther
.
size
();
i
++
)
colsOther
[
i
]
=
...
...
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