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
Backofen, Rainer
amdis
Commits
b19c99d6
Commit
b19c99d6
authored
Mar 31, 2011
by
Thomas Witkowski
Browse files
Added switch between zero and non zero start vector for PETSc.
parent
6e0803ed
Changes
3
Hide whitespace changes
Inline
Side-by-side
AMDiS/libtool
View file @
b19c99d6
...
...
@@ -44,7 +44,7 @@ available_tags=" CXX F77"
# ### BEGIN LIBTOOL CONFIG
# Libtool was configured on host
deimos101
:
# Libtool was configured on host
p1q024
:
# Shell to use when invoking shell scripts.
SHELL
=
"/bin/sh"
...
...
@@ -6760,7 +6760,7 @@ build_old_libs=`case $build_libtool_libs in yes) $echo no;; *) $echo yes;; esac`
# End:
# ### BEGIN LIBTOOL TAG CONFIG: CXX
# Libtool was configured on host
deimos101
:
# Libtool was configured on host
p1q024
:
# Shell to use when invoking shell scripts.
SHELL
=
"/bin/sh"
...
...
@@ -7065,7 +7065,7 @@ include_expsyms=""
# ### BEGIN LIBTOOL TAG CONFIG: F77
# Libtool was configured on host
deimos101
:
# Libtool was configured on host
p1q024
:
# Shell to use when invoking shell scripts.
SHELL
=
"/bin/sh"
...
...
AMDiS/src/parallel/PetscProblemStat.cc
View file @
b19c99d6
...
...
@@ -587,14 +587,16 @@ namespace AMDiS {
FUNCNAME
(
"PetscProblemStat::solvePetscMatrix()"
);
// === Set old solution to be initiual guess for PETSc solver. ===
VecSet
(
petscSolVec
,
0.0
);
for
(
int
i
=
0
;
i
<
nComponents
;
i
++
)
setDofVector
(
petscSolVec
,
vec
.
getDOFVector
(
i
),
nComponents
,
i
,
true
);
VecAssemblyBegin
(
petscSolVec
);
VecAssemblyEnd
(
petscSolVec
);
if
(
!
zeroStartVector
)
{
VecSet
(
petscSolVec
,
0.0
);
for
(
int
i
=
0
;
i
<
nComponents
;
i
++
)
setDofVector
(
petscSolVec
,
vec
.
getDOFVector
(
i
),
nComponents
,
i
,
true
);
VecAssemblyBegin
(
petscSolVec
);
VecAssemblyEnd
(
petscSolVec
);
}
// === Init PETSc solver. ===
...
...
@@ -607,7 +609,8 @@ namespace AMDiS {
delete
petscSolver
;
// Do not delete the solution vector, use it for the initial guess.
KSPSetInitialGuessNonzero
(
solver
,
PETSC_TRUE
);
if
(
!
zeroStartVector
)
KSPSetInitialGuessNonzero
(
solver
,
PETSC_TRUE
);
// === Run PETSc. ===
...
...
AMDiS/src/parallel/PetscProblemStat.h
View file @
b19c99d6
...
...
@@ -44,8 +44,11 @@ namespace AMDiS {
:
ParallelProblemStatBase
(
nameStr
,
problemIteration
),
d_nnz
(
NULL
),
o_nnz
(
NULL
),
lastMeshNnz
(
0
)
{}
lastMeshNnz
(
0
),
zeroStartVector
(
false
)
{
GET_PARAMETER
(
0
,
"parallel->use zero start vector"
,
"%d"
,
&
zeroStartVector
);
}
~
PetscProblemStat
()
{}
...
...
@@ -97,6 +100,8 @@ namespace AMDiS {
* therefore also the assembled matrix structure.
*/
int
lastMeshNnz
;
bool
zeroStartVector
;
};
typedef
PetscProblemStat
ParallelProblemStat
;
...
...
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