Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Aland, Sebastian
amdis
Commits
a795bfed
Commit
a795bfed
authored
Jul 28, 2010
by
Backofen, Rainer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
set solver iteration in adaptInfo also for parallel (PetSc)
parent
9c3b4f73
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
AMDiS/src/parallel/GlobalMatrixSolver.cc
AMDiS/src/parallel/GlobalMatrixSolver.cc
+4
-4
AMDiS/src/parallel/GlobalMatrixSolver.h
AMDiS/src/parallel/GlobalMatrixSolver.h
+1
-1
No files found.
AMDiS/src/parallel/GlobalMatrixSolver.cc
View file @
a795bfed
...
...
@@ -4,7 +4,6 @@
#include "DOFVector.h"
#include "Debug.h"
#include "SystemVector.h"
#include "VtkWriter.h"
#include "petscksp.h"
...
...
@@ -47,7 +46,7 @@ namespace AMDiS {
clock_t
first
=
clock
();
fillPetscMatrix
(
systemMatrix
,
rhs
);
solvePetscMatrix
(
*
solution
);
solvePetscMatrix
(
*
solution
,
adaptInfo
);
#ifdef _OPENMP
INFO
(
info
,
8
)(
"solution of discrete system needed %.5f seconds system time / %.5f seconds wallclock time
\n
"
,
...
...
@@ -474,7 +473,7 @@ namespace AMDiS {
}
void
GlobalMatrixSolver
::
solvePetscMatrix
(
SystemVector
&
vec
)
void
GlobalMatrixSolver
::
solvePetscMatrix
(
SystemVector
&
vec
,
AdaptInfo
*
adaptInfo
)
{
FUNCNAME
(
"GlobalMatrixSolver::solvePetscMatrix()"
);
...
...
@@ -535,7 +534,8 @@ namespace AMDiS {
int
iterations
=
0
;
KSPGetIterationNumber
(
solver
,
&
iterations
);
MSG
(
" Number of iterations: %d
\n
"
,
iterations
);
adaptInfo
->
setSolverIterations
(
iterations
);
double
norm
=
0.0
;
MatMult
(
petscMatrix
,
petscSolVec
,
petscTmpVec
);
VecAXPY
(
petscTmpVec
,
-
1.0
,
petscRhsVec
);
...
...
AMDiS/src/parallel/GlobalMatrixSolver.h
View file @
a795bfed
...
...
@@ -79,7 +79,7 @@ namespace AMDiS {
void
setDofVector
(
Vec
&
petscVec
,
DOFVector
<
double
>*
vec
,
int
disMult
=
1
,
int
dispAdd
=
0
);
void
solvePetscMatrix
(
SystemVector
&
vec
);
void
solvePetscMatrix
(
SystemVector
&
vec
,
AdaptInfo
*
adaptInfo
);
protected:
MeshDistributor
*
meshDistributor
;
...
...
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