-//---------------------------- precondition_block.h ---------------------------
+//----------------------------------------------------------------------
// $Id$
// Version: $Name$
//
// 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
#include <vector>
template <typename number> class FullMatrix;
-template <typename number> class SparseMatrix;
template <typename number> class Vector;
-//---------------------------- precondition_block.templates.h ---------------------------
+//----------------------------------------------------------------------
// $Id$
// Version: $Name$
//
// 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
#include <lac/precondition_block.h>
#include <lac/vector.h>
#include <lac/full_matrix.h>
-#include <lac/sparse_matrix.h>
template <class MATRIX, typename inverse_type>
* 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
* 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
{
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);
-//---------------------------- precondition_block.cc ---------------------------
+//----------------------------------------------------------------------
// $Id$
// Version: $Name$
//
// to the file deal.II/doc/license.html for the text and
// further information on this license.
//
-//---------------------------- precondition_block.cc ---------------------------
+//----------------------------------------------------------------------
#include <lac/precondition_block.templates.h>
+#include <lac/sparse_matrix.h>
// explicit instantiations for "float" PreconditionBlock