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
1c145a63
Commit
1c145a63
authored
Nov 29, 2011
by
Thomas Witkowski
Browse files
Fixed problem for nnz structure with PETSc global matrix solver.
parent
6c719d35
Changes
3
Show whitespace changes
Inline
Side-by-side
AMDiS/src/parallel/ParallelDebug.cc
View file @
1c145a63
...
...
@@ -421,7 +421,7 @@ namespace AMDiS {
WorldVector
<
double
>
tmp
=
(
it
->
second
)[
i
];
tmp
-=
recvCoords
[
it
->
first
][
i
];
if
(
norm
(
tmp
)
>
1e-
13
)
{
if
(
norm
(
tmp
)
>
1e-
8
)
{
// === Print error message if the coordinates are not the same. ===
if
(
printCoords
)
{
MSG
(
"[DBG] i = %d
\n
"
,
i
);
...
...
AMDiS/src/parallel/PetscSolverGlobalMatrix.cc
View file @
1c145a63
...
...
@@ -48,7 +48,9 @@ namespace AMDiS {
meshDistributor
->
getMpiComm
().
Allreduce
(
&
sendValue
,
&
recvAllValues
,
1
,
MPI_INT
,
MPI_SUM
);
if
(
!
d_nnz
||
recvAllValues
!=
0
)
{
recvAllValues
=
1
;
if
(
!
d_nnz
||
recvAllValues
!=
0
||
alwaysCreateNnzStructure
)
{
if
(
d_nnz
)
{
delete
[]
d_nnz
;
d_nnz
=
NULL
;
...
...
AMDiS/src/parallel/PetscSolverGlobalMatrix.h
View file @
1c145a63
...
...
@@ -39,9 +39,12 @@ namespace AMDiS {
d_nnz
(
NULL
),
o_nnz
(
NULL
),
lastMeshNnz
(
0
),
zeroStartVector
(
false
)
zeroStartVector
(
false
),
alwaysCreateNnzStructure
(
false
)
{
Parameters
::
get
(
"parallel->use zero start vector"
,
zeroStartVector
);
Parameters
::
get
(
"parallel->always create nnz structure"
,
alwaysCreateNnzStructure
);
}
void
fillPetscMatrix
(
Matrix
<
DOFMatrix
*>
*
mat
);
...
...
@@ -77,6 +80,14 @@ namespace AMDiS {
int
lastMeshNnz
;
bool
zeroStartVector
;
/// If this variable is set to true, the non-zero matrix structure is
/// created each time from scratch by calling \ref createPetscNnzStrcuture.
/// This can be necessary if the number of non-zeros in the matrix varies
/// though the mesh does not change. This may happen if there are many
/// operators using DOFVectors from old timestep containing many zeros due to
/// some phase fields.
bool
alwaysCreateNnzStructure
;
};
...
...
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