From 2bf34d3488a1991de68bc6b12973dab52bd12f06 Mon Sep 17 00:00:00 2001 From: Ralf Hartmann Date: Tue, 18 Feb 2003 11:42:37 +0000 Subject: [PATCH] Clearify exception. Identing region. git-svn-id: https://svn.dealii.org/trunk@7146 0785d39b-7218-0410-832d-ea1e28bc413d --- .../lac/include/lac/sparse_mic.templates.h | 64 ++++++++++--------- 1 file changed, 33 insertions(+), 31 deletions(-) diff --git a/deal.II/lac/include/lac/sparse_mic.templates.h b/deal.II/lac/include/lac/sparse_mic.templates.h index 8d19b39233..a60b9944fb 100644 --- a/deal.II/lac/include/lac/sparse_mic.templates.h +++ b/deal.II/lac/include/lac/sparse_mic.templates.h @@ -19,18 +19,18 @@ template SparseMIC::SparseMIC () - : - diag(0), - inv_diag(0), - inner_sums(0) + : + diag(0), + inv_diag(0), + inner_sums(0) {} template SparseMIC::SparseMIC (const SparsityPattern &sparsity) - : - SparseLUDecomposition (sparsity), + : + SparseLUDecomposition (sparsity), diag(0), inv_diag(0), inner_sums(0) @@ -57,7 +57,7 @@ SparseMIC::reinit () std::vector tmp; tmp.swap (inner_sums); }; - + SparseLUDecomposition::reinit (); } @@ -103,20 +103,20 @@ void SparseMIC::decompose (const SparseMatrix &matrix, if (strengthen_diagonal > 0) this->strengthen_diagonal_impl (); - // MIC implementation: (S. Margenov lectures) - // x[i] = a[i][i] - sum(k=1, i-1, - // a[i][k]/x[k]*sum(j=k+1, N, a[k][j])) - - // TODO: for sake of simplicity, - // those are placed here A better - // implementation would store this - // values in the underlying sparse - // matrix itself. + // MIC implementation: (S. Margenov lectures) + // x[i] = a[i][i] - sum(k=1, i-1, + // a[i][k]/x[k]*sum(j=k+1, N, a[k][j])) + + // TODO: for sake of simplicity, + // those are placed here. A better + // implementation would store this + // values in the underlying sparse + // matrix itself. diag.resize (this->m()); inv_diag.resize (this->m()); inner_sums.resize (this->m()); - // precalc sum(j=k+1, N, a[k][j])) + // precalc sum(j=k+1, N, a[k][j])) for(unsigned int row=0; rowm(); row++) { inner_sums[row] = get_rowsum(row); } @@ -124,20 +124,22 @@ void SparseMIC::decompose (const SparseMatrix &matrix, const unsigned int* const col_nums = this->get_sparsity_pattern().get_column_numbers(); const unsigned int* const rowstarts = this->get_sparsity_pattern().get_rowstart_indices(); - for(unsigned int row=0; rowm(); row++) { - number temp = this->diag_element(row); - number temp1 = 0; - const unsigned int * const first_after_diagonal = this->prebuilt_lower_bound[row]; - - unsigned int k = 0; - for (const unsigned int * col=&col_nums[rowstarts[row]+1]; - col0, ExcInternal()); - } + for(unsigned int row=0; rowm(); row++) + { + number temp = this->diag_element(row); + number temp1 = 0; + const unsigned int * const first_after_diagonal = this->prebuilt_lower_bound[row]; + + unsigned int k = 0; + for (const unsigned int * col=&col_nums[rowstarts[row]+1]; + col0, ExcStrengthenDiagonalTooSmall()); + } } -- 2.39.5