diff --git a/AMDiS/libtool b/AMDiS/libtool index 2144386149ea400cd8a80c98a6795840876d592b..a502627cc5fcea9f02887151005647e097261138 100755 --- a/AMDiS/libtool +++ b/AMDiS/libtool @@ -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" diff --git a/AMDiS/src/parallel/PetscProblemStat.cc b/AMDiS/src/parallel/PetscProblemStat.cc index 0d8a279f7efdbef440c1875aa491357f50985620..ea6b54372d7b90922f65bb753199e2d375da18e4 100644 --- a/AMDiS/src/parallel/PetscProblemStat.cc +++ b/AMDiS/src/parallel/PetscProblemStat.cc @@ -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. === diff --git a/AMDiS/src/parallel/PetscProblemStat.h b/AMDiS/src/parallel/PetscProblemStat.h index d2163c55890fc175ae9b7dc931ee76375f15fe13..77278bec6fcd20084b28d7470bf58b5713afb7da 100644 --- a/AMDiS/src/parallel/PetscProblemStat.h +++ b/AMDiS/src/parallel/PetscProblemStat.h @@ -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;