diff --git a/dumux/common/eigenvalues.hh b/dumux/common/eigenvalues.hh index e3bcd75019fbcafc30c6116f20ac85e4014992e7..91733bf6ae7d72fa23ce84d360f96c4cda9a4b60 100644 --- a/dumux/common/eigenvalues.hh +++ b/dumux/common/eigenvalues.hh @@ -61,9 +61,10 @@ double calcOffDiagonalNorm(Matrix& matrix) /* * \param eigVel Vector for storing the eigenvalues * \param matrix n x n matrices for which eigenvalues have to be calculated + * \param relativeTolerance tolerance for the relative convergence criterion (default: 0.01) */ template<int dim, class EVVectorType, class MatrixType> -bool calculateEigenValues(EVVectorType &eigVel, MatrixType& matrix) +bool calculateEigenValues(EVVectorType &eigVel, MatrixType& matrix, double relativeTolerance = 0.01) { if (dim == 2) { @@ -92,7 +93,7 @@ bool calculateEigenValues(EVVectorType &eigVel, MatrixType& matrix) MatrixType rotationMatrix(0.0); MatrixType evMatrix(matrix); - while ((iter < maxIter && offDiagonalNorm > 0.01 * matrixNorm) || iter < 1) + while (iter < maxIter && offDiagonalNorm > relativeTolerance * matrixNorm) { for (int i = 0; i < dim - 1; i++) { @@ -143,9 +144,10 @@ bool calculateEigenValues(EVVectorType &eigVel, MatrixType& matrix) * \param eigVel Vector for storing the eigenvalues * \param eigVec n x n for storing the eigenvectors * \param matrix n x n matrices for which eigenvalues have to be calculated + * \param relativeTolerance tolerance for the relative convergence criterion (default: 0.01) */ template<int dim, class EVVectorType, class MatrixType> -bool calculateEigenValues(EVVectorType &eigVel, MatrixType& eigVec, MatrixType& matrix) +bool calculateEigenValues(EVVectorType &eigVel, MatrixType& eigVec, MatrixType& matrix, double relativeTolerance = 0.01) { int maxIter = 100; int iter = 0; @@ -156,7 +158,7 @@ bool calculateEigenValues(EVVectorType &eigVel, MatrixType& eigVec, MatrixType& MatrixType evecMatrix(matrix); identityMatrix<dim>(evecMatrix); - while ((iter < maxIter && offDiagonalNorm > 0.01 * matrixNorm) || iter < 1) + while (iter < maxIter && offDiagonalNorm > relativeTolerance * matrixNorm) { for (int i = 0; i < dim - 1; i++) { diff --git a/dumux/decoupled/2p/celldata2p.hh b/dumux/decoupled/2p/celldata2p.hh index 969639d93d2f94c49580d1185ba6fd599869a2aa..0465e9a75bc640e2c27c6ac3a11d0643b9ab3494 100644 --- a/dumux/decoupled/2p/celldata2p.hh +++ b/dumux/decoupled/2p/celldata2p.hh @@ -209,7 +209,7 @@ public: /*!\brief Sets the cell phase potential * * \param phaseIdx Index of a fluid phase - * \param press Phase potential which is stored + * \param pot Phase potential which is stored */ void setPotential(int phaseIdx, Scalar pot) { @@ -502,11 +502,11 @@ public: /*!\brief Sets the cell phase potential * * \param phaseIdx Index of a fluid phase - * \param press Phase potential which is stored + * \param pot Phase potential which is stored */ - void setPotential(int phaseIdx, Scalar press) + void setPotential(int phaseIdx, Scalar pot) { - potential_[phaseIdx] = press; + potential_[phaseIdx] = pot; } //! \cond \private