Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Backofen, Rainer
amdis
Commits
eecb3b56
Commit
eecb3b56
authored
Jun 27, 2012
by
Thomas Witkowski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed the last nnz structure problem. Now go on to make it fast.
parent
2bbf10f7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
13 deletions
+12
-13
AMDiS/src/parallel/PetscSolverGlobalMatrix.cc
AMDiS/src/parallel/PetscSolverGlobalMatrix.cc
+12
-13
No files found.
AMDiS/src/parallel/PetscSolverGlobalMatrix.cc
View file @
eecb3b56
...
...
@@ -145,6 +145,7 @@ namespace AMDiS {
*
coarseSpaceMap
,
*
coarseSpaceMap
,
nnzCoarse
);
createPetscNnzStructureWithCoarseSpace
(
mat
,
*
coarseSpaceMap
,
*
interiorMap
,
...
...
@@ -185,18 +186,18 @@ namespace AMDiS {
MatCreateAIJ
(
mpiCommGlobal
,
nRowsRankCoarse
,
nRowsRankInterior
,
nRowsOverallCoarse
,
nGlobalOverallInterior
,
100
,
PETSC_NULL
,
100
,
PETSC_NULL
,
//
0, nnzCoarseInt.dnnz, 0, nnzCoarseInt.onnz,
//
100, PETSC_NULL, 100, PETSC_NULL,
0
,
nnzCoarseInt
.
dnnz
,
0
,
nnzCoarseInt
.
onnz
,
&
matCoarseInt
);
MatSetOption
(
matCoarseInt
,
MAT_NEW_NONZERO_ALLOCATION_ERR
,
PETSC_FALSE
);
//
MatSetOption(matCoarseInt, MAT_NEW_NONZERO_ALLOCATION_ERR, PETSC_FALSE);
MatCreateAIJ
(
mpiCommGlobal
,
nRowsRankInterior
,
nRowsRankCoarse
,
nGlobalOverallInterior
,
nRowsOverallCoarse
,
100
,
PETSC_NULL
,
100
,
PETSC_NULL
,
//
0, nnzIntCoarse.dnnz, 0, nnzIntCoarse.onnz,
//
100, PETSC_NULL, 100, PETSC_NULL,
0
,
nnzIntCoarse
.
dnnz
,
0
,
nnzIntCoarse
.
onnz
,
&
matIntCoarse
);
MatSetOption
(
matIntCoarse
,
MAT_NEW_NONZERO_ALLOCATION_ERR
,
PETSC_FALSE
);
//
MatSetOption(matIntCoarse, MAT_NEW_NONZERO_ALLOCATION_ERR, PETSC_FALSE);
}
// === Prepare traverse of sequentially created matrices. ===
...
...
@@ -340,9 +341,6 @@ namespace AMDiS {
MatAssemblyEnd
(
matCoarseInt
,
MAT_FINAL_ASSEMBLY
);
}
AMDiS
::
finalize
();
exit
(
0
);
// === Remove Dirichlet BC DOFs. ===
// removeDirichletBcDofs(mat);
...
...
@@ -1443,9 +1441,9 @@ namespace AMDiS {
// matrices, the problem may arise, that the result is larger than the
// number of elements in a row. This is fixed in the following.
//
if (nRankRows < 100)
//
for (int i = 0; i < nRankRows; i++)
//
nnz
Interior
.dnnz[i] = std::min(nnz
Interior
.dnnz[i], nRankCols);
if
(
nRankRows
<
100
)
for
(
int
i
=
0
;
i
<
nRankRows
;
i
++
)
nnz
.
dnnz
[
i
]
=
std
::
min
(
nnz
.
dnnz
[
i
],
nRankCols
);
#if (DEBUG != 0)
int
nMax
=
0
;
...
...
@@ -1470,6 +1468,7 @@ namespace AMDiS {
MSG
(
"NNZ in offdiag block: max = %d, avrg = %.0f
\n
"
,
nMax
,
(
nSum
>
0
?
(
static_cast
<
double
>
(
nSum
)
/
nRankRows
)
:
0
));
}
}
#endif
}
}
Write
Preview
Markdown
is supported
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