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
1c145a63
Commit
1c145a63
authored
Nov 29, 2011
by
Thomas Witkowski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed problem for nnz structure with PETSc global matrix solver.
parent
6c719d35
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
4 deletions
+17
-4
AMDiS/src/parallel/ParallelDebug.cc
AMDiS/src/parallel/ParallelDebug.cc
+1
-1
AMDiS/src/parallel/PetscSolverGlobalMatrix.cc
AMDiS/src/parallel/PetscSolverGlobalMatrix.cc
+4
-2
AMDiS/src/parallel/PetscSolverGlobalMatrix.h
AMDiS/src/parallel/PetscSolverGlobalMatrix.h
+12
-1
No files found.
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
;
...
...
@@ -208,7 +210,7 @@ namespace AMDiS {
void
PetscSolverGlobalMatrix
::
setDofMatrix
(
DOFMatrix
*
mat
,
int
dispMult
,
int
dispAddRow
,
int
dispAddCol
)
int
dispAddRow
,
int
dispAddCol
)
{
FUNCNAME
(
"PetscSolverGlobalMatrix::setDofMatrix()"
);
...
...
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
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