From d5d1e83e2c0fa7bec00113ad82d7bce5ad347176 Mon Sep 17 00:00:00 2001 From: guido Date: Fri, 16 May 2003 14:46:11 +0000 Subject: [PATCH] strange default values changed git-svn-id: https://svn.dealii.org/trunk@7653 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/lac/include/lac/precondition_block.h | 5 ++--- .../include/lac/precondition_block.templates.h | 5 ++--- deal.II/lac/include/lac/sparse_matrix_ez.h | 16 ++++------------ .../lac/include/lac/sparse_matrix_ez.templates.h | 11 +---------- deal.II/lac/source/precondition_block.cc | 5 +++-- 5 files changed, 12 insertions(+), 30 deletions(-) diff --git a/deal.II/lac/include/lac/precondition_block.h b/deal.II/lac/include/lac/precondition_block.h index d6c7b51e81..949b6ef8c0 100644 --- a/deal.II/lac/include/lac/precondition_block.h +++ b/deal.II/lac/include/lac/precondition_block.h @@ -1,4 +1,4 @@ -//---------------------------- precondition_block.h --------------------------- +//---------------------------------------------------------------------- // $Id$ // Version: $Name$ // @@ -9,7 +9,7 @@ // to the file deal.II/doc/license.html for the text and // further information on this license. // -//---------------------------- precondition_block.h --------------------------- +//---------------------------------------------------------------------- #ifndef __deal2__precondition_block_h #define __deal2__precondition_block_h @@ -22,7 +22,6 @@ #include template class FullMatrix; -template class SparseMatrix; template class Vector; diff --git a/deal.II/lac/include/lac/precondition_block.templates.h b/deal.II/lac/include/lac/precondition_block.templates.h index 4a5a2fbff5..f339aca3cb 100644 --- a/deal.II/lac/include/lac/precondition_block.templates.h +++ b/deal.II/lac/include/lac/precondition_block.templates.h @@ -1,4 +1,4 @@ -//---------------------------- precondition_block.templates.h --------------------------- +//---------------------------------------------------------------------- // $Id$ // Version: $Name$ // @@ -9,7 +9,7 @@ // to the file deal.II/doc/license.html for the text and // further information on this license. // -//---------------------------- precondition_block.templates.h --------------------------- +//---------------------------------------------------------------------- #ifndef __deal2__precondition_block_templates_h #define __deal2__precondition_block_templates_h @@ -21,7 +21,6 @@ #include #include #include -#include template diff --git a/deal.II/lac/include/lac/sparse_matrix_ez.h b/deal.II/lac/include/lac/sparse_matrix_ez.h index df5dc91e17..e7d6ca9d64 100644 --- a/deal.II/lac/include/lac/sparse_matrix_ez.h +++ b/deal.II/lac/include/lac/sparse_matrix_ez.h @@ -362,15 +362,11 @@ class SparseMatrixEZ : public Subscriptor * properly is essential for an * efficient assembling of the * matrix. - * - * The default values are - * @p{default_row_length=5}, - * @p{default_increment=4}. */ explicit SparseMatrixEZ (const unsigned int n_rows, const unsigned int n_columns, - const unsigned int default_row_length = Entry::invalid, - const unsigned int default_increment = Entry::invalid); + const unsigned int default_row_length = 0, + const unsigned int default_increment = 1); /** * Destructor. Free all memory, but do not @@ -398,15 +394,11 @@ class SparseMatrixEZ : public Subscriptor * properly is essential for an * efficient assembling of the * matrix. - * - * The default values are - * @p{default_row_length=5}, - * @p{default_increment=4}. */ void reinit (const unsigned int n_rows, const unsigned int n_columns, - unsigned int default_row_length = Entry::invalid, - unsigned int default_increment = Entry::invalid); + unsigned int default_row_length = 0, + unsigned int default_increment = 1); /** * Release all memory and return diff --git a/deal.II/lac/include/lac/sparse_matrix_ez.templates.h b/deal.II/lac/include/lac/sparse_matrix_ez.templates.h index c1a6dbfc99..85df27c60c 100644 --- a/deal.II/lac/include/lac/sparse_matrix_ez.templates.h +++ b/deal.II/lac/include/lac/sparse_matrix_ez.templates.h @@ -72,20 +72,11 @@ SparseMatrixEZ::reinit(const unsigned int n_rows, { clear(); - // replace (invalid) default values - // by true defaults; note that - // these defaults are also - // documented in the docs of this - // function as well as in the docs - // of the constructor! - if (default_row_length == Entry::invalid) - default_row_length = 5; - if (default_increment == Entry::invalid) - default_increment = 4; increment = default_increment; n_columns = n_cols; row_info.resize(n_rows); +//TODO:[GK] allow for flexible memory reservation in later version data.reserve(default_row_length * n_rows + n_rows * increment); data.resize(default_row_length * n_rows); diff --git a/deal.II/lac/source/precondition_block.cc b/deal.II/lac/source/precondition_block.cc index 6f7fb63607..3054d23925 100644 --- a/deal.II/lac/source/precondition_block.cc +++ b/deal.II/lac/source/precondition_block.cc @@ -1,4 +1,4 @@ -//---------------------------- precondition_block.cc --------------------------- +//---------------------------------------------------------------------- // $Id$ // Version: $Name$ // @@ -9,10 +9,11 @@ // to the file deal.II/doc/license.html for the text and // further information on this license. // -//---------------------------- precondition_block.cc --------------------------- +//---------------------------------------------------------------------- #include +#include // explicit instantiations for "float" PreconditionBlock -- 2.39.5