]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Move some functions around from .h to .templates.h files and back or forth.
authorwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 8 May 2000 12:03:19 +0000 (12:03 +0000)
committerwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 8 May 2000 12:03:19 +0000 (12:03 +0000)
git-svn-id: https://svn.dealii.org/trunk@2825 0785d39b-7218-0410-832d-ea1e28bc413d

14 files changed:
deal.II/lac/include/lac/block_sparse_matrix.h
deal.II/lac/include/lac/block_sparse_matrix.templates.h [new file with mode: 0644]
deal.II/lac/include/lac/block_sparsity_pattern.h
deal.II/lac/include/lac/block_sparsity_pattern.templates.h [new file with mode: 0644]
deal.II/lac/include/lac/block_vector.h
deal.II/lac/include/lac/full_matrix.h
deal.II/lac/include/lac/precondition_block.h
deal.II/lac/include/lac/sparse_ilu.h
deal.II/lac/include/lac/sparse_matrix.h
deal.II/lac/include/lac/sparse_vanka.h
deal.II/lac/include/lac/swappable_vector.h
deal.II/lac/include/lac/vector.h
deal.II/lac/source/block_sparse_matrix.cc [new file with mode: 0644]
deal.II/lac/source/block_sparsity_pattern.cc [new file with mode: 0644]

index 8f8e15c53f6a7367231ae98d1bdde2b66200f092..fd17b3c2a2c0db7b6eeb777a5bb8e68a72d7c37e 100644 (file)
@@ -2,7 +2,7 @@
 //    $Id$
 //    Version: $Name$
 //
-//    Copyright (C) 1998, 1999, 2000 by the deal.II authors
+//    Copyright (C) 2000 by the deal.II authors
 //
 //    This file is subject to QPL and may not be  distributed
 //    without copyright and license information. Please refer
 
 
 
+/**
+ * Blocked sparse matrix.
+ *
+ *
+ * \section{On template instantiations}
+ *
+ * Member functions of this class are either implemented in this file
+ * or in a file of the same name with suffix ``.templates.h''. For the
+ * most common combinations of the template parameters, instantiations
+ * of this class are provided in a file with suffix ``.cc'' in the
+ * ``source'' directory. If you need an instantiation that is not
+ * listed there, you have to include this file along with the
+ * corresponding ``.templates.h'' file and instantiate the respective
+ * class yourself.
+ *
+ * @author Wolfgang Bangerth, 2000
+ */
 template <typename number, int  rows, int columns=rows>
 class BlockSparseMatrix : public Subscriptor
 {
@@ -382,60 +399,6 @@ class BlockSparseMatrix : public Subscriptor
 /* ------------------------- Template functions ---------------------- */
 
 
-template <typename number, int  rows, int columns>
-BlockSparseMatrix<number,rows,columns>::BlockSparseMatrix () :
-               sparsity_pattern (0)
-{};
-
-
-
-template <typename number, int  rows, int columns>
-BlockSparseMatrix<number,rows,columns>::
-BlockSparseMatrix (const BlockSparsityPattern<rows,columns> &sparsity)
-{
-  reinit (sparsity);
-};
-
-
-
-template <typename number, int  rows, int columns>
-BlockSparseMatrix<number,rows,columns> &
-BlockSparseMatrix<number,rows,columns>::
-operator = (const BlockSparseMatrix<number,rows,columns> &m) 
-{
-  *sparsity_pattern = *m.sparsity_pattern;
-  for (unsigned int r=0; r<rows; ++r)
-    for (unsigned int c=0; c<columns; ++c)
-      block(r,c) = m.block(r,c);
-};
-
-
-template <typename number, int  rows, int columns>
-void
-BlockSparseMatrix<number,rows,columns>::reinit ()
-{
-  for (unsigned int r=0; r<rows; ++r)
-    for (unsigned int c=0; c<columns; ++c)
-      block(r,c).reinit ();
-};
-
-
-
-template <typename number, int  rows, int columns>
-void
-BlockSparseMatrix<number,rows,columns>::reinit (const BlockSparsityPattern<rows,columns> &sparsity)
-{
-  sparsity_pattern = &sparsity;
-  
-  for (unsigned int r=0; r<rows; ++r)
-    for (unsigned int c=0; c<columns; ++c)
-      block(r,c).reinit (sparsity.block(r,c));
-};
-
-
-
-
 template <typename number, int rows, int columns>
 inline
 SparseMatrix<number> &
@@ -465,31 +428,7 @@ BlockSparseMatrix<number,rows,columns>::block (const unsigned int row,
 
 
 template <typename number, int  rows, int columns>
-void
-BlockSparseMatrix<number,rows,columns>::clear () 
-{
-  sparsity_pattern = 0;
-  for (unsigned int r=0; r<rows; ++r)
-    for (unsigned int c=0; c<columns; ++c)
-      block(r,c).clear ();
-};
-
-
-
-template <typename number, int  rows, int columns>
-bool
-BlockSparseMatrix<number,rows,columns>::empty () const
-{
-  for (unsigned int r=0; r<rows; ++r)
-    for (unsigned int c=0; c<columns; ++c)
-      if (block(r,c).empty () == false)
-       return false;
-  return true;
-};
-
-
-
-template <typename number, int  rows, int columns>
+inline
 unsigned int
 BlockSparseMatrix<number,rows,columns>::m () const
 {
@@ -499,6 +438,7 @@ BlockSparseMatrix<number,rows,columns>::m () const
 
 
 template <typename number, int  rows, int columns>
+inline
 unsigned int
 BlockSparseMatrix<number,rows,columns>::n () const
 {
@@ -508,15 +448,7 @@ BlockSparseMatrix<number,rows,columns>::n () const
 
 
 template <typename number, int  rows, int columns>
-unsigned int
-BlockSparseMatrix<number,rows,columns>::n_nonzero_elements () const
-{
-  return sparsity_pattern->n_nonzero_elements ();
-};
-
-
-
-template <typename number, int  rows, int columns>
+inline
 void
 BlockSparseMatrix<number,rows,columns>::set (const unsigned int i,
                                             const unsigned int j,
@@ -533,6 +465,7 @@ BlockSparseMatrix<number,rows,columns>::set (const unsigned int i,
 
 
 template <typename number, int  rows, int columns>
+inline
 void
 BlockSparseMatrix<number,rows,columns>::add (const unsigned int i,
                                             const unsigned int j,
@@ -548,6 +481,22 @@ BlockSparseMatrix<number,rows,columns>::add (const unsigned int i,
 
 
 
+template <typename number, int  rows, int columns>
+inline
+number
+BlockSparseMatrix<number,rows,columns>::operator () (const unsigned int i,
+                                                    const unsigned int j) const
+{
+  const pair<unsigned int,unsigned int>
+    row_index = sparsity_pattern->row_indices.global_to_local (i),
+    col_index = sparsity_pattern->column_indices.global_to_local (j);
+  return block(row_index.first,col_index.first) (row_index.second,
+                                                col_index.second);
+};
+
+
+
+
 template <typename number, int  rows, int columns>
 template <typename somenumber>
 BlockSparseMatrix<number,rows,columns> &
@@ -577,19 +526,6 @@ add_scaled (const number factor,
 
 
 
-template <typename number, int  rows, int columns>
-number
-BlockSparseMatrix<number,rows,columns>::operator () (const unsigned int i,
-                                                    const unsigned int j) const
-{
-  const pair<unsigned int,unsigned int>
-    row_index = sparsity_pattern->row_indices.global_to_local (i),
-    col_index = sparsity_pattern->column_indices.global_to_local (j);
-  return block(row_index.first,col_index.first) (row_index.second,
-                                                col_index.second);
-};
-
-
 
 template <typename number, int  rows, int columns>
 template <typename somenumber>
@@ -700,15 +636,6 @@ matrix_scalar_product (const BlockVector<rows,somenumber>    &u,
 
 
 
-template <typename number, int  rows, int columns>
-const BlockSparsityPattern<rows,columns> &
-BlockSparseMatrix<number,rows,columns>::get_sparsity_pattern () const
-{
-  return *sparsity_pattern;
-};
-
-
-
 
 
 #endif    // __deal2__block_sparse_matrix_h
diff --git a/deal.II/lac/include/lac/block_sparse_matrix.templates.h b/deal.II/lac/include/lac/block_sparse_matrix.templates.h
new file mode 100644 (file)
index 0000000..bc8b277
--- /dev/null
@@ -0,0 +1,122 @@
+//----------------------------  block_sparse_matrix.templates.h  ---------------------------
+//    $Id$
+//    Version: $Name$
+//
+//    Copyright (C) 1998, 1999, 2000 by the deal.II authors
+//
+//    This file is subject to QPL and may not be  distributed
+//    without copyright and license information. Please refer
+//    to the file deal.II/doc/license.html for the  text  and
+//    further information on this license.
+//
+//----------------------------  block_sparse_matrix.templates.h  ---------------------------
+#ifndef __deal2__block_sparse_matrix_templates_h
+#define __deal2__block_sparse_matrix_templates_h
+
+
+#include <lac/block_sparse_matrix.h>
+
+
+
+template <typename number, int  rows, int columns>
+BlockSparseMatrix<number,rows,columns>::BlockSparseMatrix () :
+               sparsity_pattern (0)
+{};
+
+
+
+template <typename number, int  rows, int columns>
+BlockSparseMatrix<number,rows,columns>::
+BlockSparseMatrix (const BlockSparsityPattern<rows,columns> &sparsity)
+{
+  reinit (sparsity);
+};
+
+
+
+template <typename number, int  rows, int columns>
+BlockSparseMatrix<number,rows,columns> &
+BlockSparseMatrix<number,rows,columns>::
+operator = (const BlockSparseMatrix<number,rows,columns> &m) 
+{
+                                  // this operator does not do
+                                  // anything except than checking
+                                  // whether the base objects want to
+                                  // do something
+  for (unsigned int r=0; r<rows; ++r)
+    for (unsigned int c=0; c<columns; ++c)
+      block(r,c) = m.block(r,c);
+  return *this;
+};
+
+
+template <typename number, int  rows, int columns>
+void
+BlockSparseMatrix<number,rows,columns>::reinit ()
+{
+  for (unsigned int r=0; r<rows; ++r)
+    for (unsigned int c=0; c<columns; ++c)
+      block(r,c).reinit ();
+};
+
+
+
+template <typename number, int  rows, int columns>
+void
+BlockSparseMatrix<number,rows,columns>::
+reinit (const BlockSparsityPattern<rows,columns> &sparsity)
+{
+  sparsity_pattern = &sparsity;
+  
+  for (unsigned int r=0; r<rows; ++r)
+    for (unsigned int c=0; c<columns; ++c)
+      block(r,c).reinit (sparsity.block(r,c));
+};
+
+
+template <typename number, int  rows, int columns>
+void
+BlockSparseMatrix<number,rows,columns>::clear () 
+{
+  sparsity_pattern = 0;
+  for (unsigned int r=0; r<rows; ++r)
+    for (unsigned int c=0; c<columns; ++c)
+      block(r,c).clear ();
+};
+
+
+
+template <typename number, int  rows, int columns>
+bool
+BlockSparseMatrix<number,rows,columns>::empty () const
+{
+  for (unsigned int r=0; r<rows; ++r)
+    for (unsigned int c=0; c<columns; ++c)
+      if (block(r,c).empty () == false)
+       return false;
+  return true;
+};
+
+
+
+
+template <typename number, int  rows, int columns>
+unsigned int
+BlockSparseMatrix<number,rows,columns>::n_nonzero_elements () const
+{
+  return sparsity_pattern->n_nonzero_elements ();
+};
+
+
+
+template <typename number, int  rows, int columns>
+const BlockSparsityPattern<rows,columns> &
+BlockSparseMatrix<number,rows,columns>::get_sparsity_pattern () const
+{
+  return *sparsity_pattern;
+};
+
+
+
+#endif // ifdef block_sparse_matrix_templates_h
index 2363c2ec54ddf6f8db288b2f639731b6a65f69b7..4ffdf16814afff3e86594c8b2078873b1e77a24a 100644 (file)
  * that all sub-matrices in a column have to have the same number of
  * columns.
  *
+ *
+ * \section{On template instantiations}
+ *
+ * Member functions of this class are either implemented in this file
+ * or in a file of the same name with suffix ``.templates.h''. For the
+ * most common combinations of the template parameters, instantiations
+ * of this class are provided in a file with suffix ``.cc'' in the
+ * ``source'' directory. If you need an instantiation that is not
+ * listed there, you have to include this file along with the
+ * corresponding ``.templates.h'' file and instantiate the respective
+ * class yourself.
+ *
  * @author Wolfgang Bangerth, 2000
  */
 template <int rows, int columns=rows>
@@ -270,68 +282,6 @@ class BlockSparsityPattern : public Subscriptor
 /*---------------------- Template functions -----------------------------------*/
 
 
-template <int rows, int columns>
-BlockSparsityPattern<rows,columns>::BlockSparsityPattern () 
-{
-  Assert (rows>0,    ExcInvalidSize (rows));
-  Assert (columns>0, ExcInvalidSize (columns));
-};
-
-  
-
-template <int rows, int columns>
-BlockSparsityPattern<rows,columns> &
-BlockSparsityPattern<rows,columns>::operator = (const BlockSparsityPattern<rows,columns> &bsp)
-{
-                                  // copy objects
-  for (unsigned int i=0; i<rows; ++i)
-    for (unsigned int j=0; j<columns; ++j)
-      sub_objects[i][j] = bsp.sub_objects[i][j];
-                                  // update index objects
-  collect_size ();
-};
-
-  
-
-
-template <int rows, int columns>
-void
-BlockSparsityPattern<rows,columns>::collect_sizes ()
-{
-  vector<unsigned int> row_sizes (rows);
-  vector<unsigned int> col_sizes (columns);
-
-                                  // first find out the row sizes
-                                  // from the first block column
-  for (unsigned int r=0; r<rows; ++r)
-    row_sizes[r] = sub_objects[r][0].n_rows();
-                                  // then check that the following
-                                  // block columns have the same
-                                  // sizes
-  for (unsigned int c=1; c<columns; ++c)
-    for (unsigned int r=0; r<rows; ++r)
-      Assert (row_sizes[r] == sub_objects[r][c].n_rows(),
-             ExcIncompatibleRowNumbers (r,0,r,c));
-
-                                  // finally initialize the row
-                                  // indices with this array
-  row_indices.reinit (row_sizes);
-  
-  
-                                  // then do the same with the columns
-  for (unsigned int c=0; c<columns; ++c)
-    col_sizes[c] = sub_objects[0][c].n_cols();
-  for (unsigned int r=1; r<rows; ++r)
-    for (unsigned int c=0; c<columns; ++c)
-      Assert (col_sizes[c] == sub_objects[r][c].n_cols(),
-             ExcIncompatibleRowNumbers (0,c,r,c));
-
-                                  // finally initialize the row
-                                  // indices with this array
-  column_indices.reinit (col_sizes);
-};
-
-
 
 template <int rows, int columns>
 inline
@@ -355,50 +305,6 @@ BlockSparsityPattern<rows,columns>::block (const unsigned int row,
 
 
 
-template <int rows, int columns>
-inline
-void
-BlockSparsityPattern<rows,columns>::compress ()
-{
-  for (unsigned int i=0; i<rows; ++i)
-    for (unsigned int j=0; j<columns; ++j)
-      sub_objects[i][j].compress ();
-};
-
-
-
-template <int rows, int columns>
-bool
-BlockSparsityPattern<rows,columns>::empty () const
-{
-  for (unsigned int i=0; i<rows; ++i)
-    for (unsigned int j=0; j<columns; ++j)
-      if (sub_objects[i][j].empty () == false)
-       return false;
-  return true;
-};
-
-
-
-template <int rows, int columns>
-unsigned int
-BlockSparsityPattern<rows,columns>::max_entries_per_row () const
-{
-  unsigned int max_entries = 0;
-  for (unsigned int block_row=0; block_row<rows; ++block_row)
-    {
-      unsigned int this_row = 0;
-      for (unsigned int c=0; c<columns; ++c)
-       this_row += sub_objects[block_row][c].max_entries_per_row ();
-
-      if (this_row > max_entries)
-       max_entries = this_row;
-    };
-  return max_entries;
-};
-
-
-
 template <int rows, int columns>
 inline
 void
@@ -417,60 +323,4 @@ BlockSparsityPattern<rows,columns>::add (const unsigned int i,
 
 
 
-template <int rows, int columns>
-unsigned int
-BlockSparsityPattern<rows,columns>::n_rows () const
-{
-                                  // only count in first column, since
-                                  // all rows should be equivalent
-  unsigned int count = 0;
-  for (unsigned int r=0; r<rows; ++r)
-    count += sub_objects[r][0].n_rows();
-  return count;
-};
-
-
-
-template <int rows, int columns>
-unsigned int
-BlockSparsityPattern<rows,columns>::n_cols () const
-{
-                                  // only count in first row, since
-                                  // all rows should be equivalent
-  unsigned int count = 0;
-  for (unsigned int c=0; c<columns; ++c)
-    count += sub_objects[0][c].n_cols();
-  return count;
-};
-
-
-
-
-
-template <int rows, int columns>
-unsigned int
-BlockSparsityPattern<rows,columns>::n_nonzero_elements () const
-{
-  unsigned int count = 0;
-  for (unsigned int i=0; i<rows; ++i)
-    for (unsigned int j=0; j<columns; ++j)
-      count += sub_objects[i][j].n_nonzero_elements ();
-  return count;
-};
-
-
-
-template <int rows, int columns>
-bool
-BlockSparsityPattern<rows,columns>::is_compressed () const
-{
-  for (unsigned int i=0; i<rows; ++i)
-    for (unsigned int j=0; j<columns; ++j)
-      if (sub_objects[i][j].is_compressed () == false)
-       return false;
-  return true;
-};
-
-
-
 #endif
diff --git a/deal.II/lac/include/lac/block_sparsity_pattern.templates.h b/deal.II/lac/include/lac/block_sparsity_pattern.templates.h
new file mode 100644 (file)
index 0000000..5448e63
--- /dev/null
@@ -0,0 +1,183 @@
+//----------------------------  block_sparsity_pattern.templates.h  ---------------------------
+//    $Id$
+//    Version: $Name$
+//
+//    Copyright (C) 1998, 1999, 2000 by the deal.II authors
+//
+//    This file is subject to QPL and may not be  distributed
+//    without copyright and license information. Please refer
+//    to the file deal.II/doc/license.html for the  text  and
+//    further information on this license.
+//
+//----------------------------  block_sparsity_pattern.templates.h  ---------------------------
+#ifndef __deal2__block_sparsity_pattern_templates_h
+#define __deal2__block_sparsity_pattern_templates_h
+
+
+#include <lac/block_sparsity_pattern.h>
+
+
+template <int rows, int columns>
+BlockSparsityPattern<rows,columns>::BlockSparsityPattern () 
+{
+  Assert (rows>0,    ExcInvalidSize (rows));
+  Assert (columns>0, ExcInvalidSize (columns));
+};
+
+  
+
+template <int rows, int columns>
+BlockSparsityPattern<rows,columns> &
+BlockSparsityPattern<rows,columns>::operator = (const BlockSparsityPattern<rows,columns> &bsp)
+{
+                                  // copy objects
+  for (unsigned int i=0; i<rows; ++i)
+    for (unsigned int j=0; j<columns; ++j)
+      sub_objects[i][j] = bsp.sub_objects[i][j];
+                                  // update index objects
+  collect_sizes ();
+
+  return *this;
+};
+
+  
+
+
+template <int rows, int columns>
+void
+BlockSparsityPattern<rows,columns>::collect_sizes ()
+{
+  vector<unsigned int> row_sizes (rows);
+  vector<unsigned int> col_sizes (columns);
+
+                                  // first find out the row sizes
+                                  // from the first block column
+  for (unsigned int r=0; r<rows; ++r)
+    row_sizes[r] = sub_objects[r][0].n_rows();
+                                  // then check that the following
+                                  // block columns have the same
+                                  // sizes
+  for (unsigned int c=1; c<columns; ++c)
+    for (unsigned int r=0; r<rows; ++r)
+      Assert (row_sizes[r] == sub_objects[r][c].n_rows(),
+             ExcIncompatibleRowNumbers (r,0,r,c));
+
+                                  // finally initialize the row
+                                  // indices with this array
+  row_indices.reinit (row_sizes);
+  
+  
+                                  // then do the same with the columns
+  for (unsigned int c=0; c<columns; ++c)
+    col_sizes[c] = sub_objects[0][c].n_cols();
+  for (unsigned int r=1; r<rows; ++r)
+    for (unsigned int c=0; c<columns; ++c)
+      Assert (col_sizes[c] == sub_objects[r][c].n_cols(),
+             ExcIncompatibleRowNumbers (0,c,r,c));
+
+                                  // finally initialize the row
+                                  // indices with this array
+  column_indices.reinit (col_sizes);
+};
+
+
+
+template <int rows, int columns>
+void
+BlockSparsityPattern<rows,columns>::compress ()
+{
+  for (unsigned int i=0; i<rows; ++i)
+    for (unsigned int j=0; j<columns; ++j)
+      sub_objects[i][j].compress ();
+};
+
+
+
+template <int rows, int columns>
+bool
+BlockSparsityPattern<rows,columns>::empty () const
+{
+  for (unsigned int i=0; i<rows; ++i)
+    for (unsigned int j=0; j<columns; ++j)
+      if (sub_objects[i][j].empty () == false)
+       return false;
+  return true;
+};
+
+
+
+template <int rows, int columns>
+unsigned int
+BlockSparsityPattern<rows,columns>::max_entries_per_row () const
+{
+  unsigned int max_entries = 0;
+  for (unsigned int block_row=0; block_row<rows; ++block_row)
+    {
+      unsigned int this_row = 0;
+      for (unsigned int c=0; c<columns; ++c)
+       this_row += sub_objects[block_row][c].max_entries_per_row ();
+
+      if (this_row > max_entries)
+       max_entries = this_row;
+    };
+  return max_entries;
+};
+
+
+template <int rows, int columns>
+unsigned int
+BlockSparsityPattern<rows,columns>::n_rows () const
+{
+                                  // only count in first column, since
+                                  // all rows should be equivalent
+  unsigned int count = 0;
+  for (unsigned int r=0; r<rows; ++r)
+    count += sub_objects[r][0].n_rows();
+  return count;
+};
+
+
+
+template <int rows, int columns>
+unsigned int
+BlockSparsityPattern<rows,columns>::n_cols () const
+{
+                                  // only count in first row, since
+                                  // all rows should be equivalent
+  unsigned int count = 0;
+  for (unsigned int c=0; c<columns; ++c)
+    count += sub_objects[0][c].n_cols();
+  return count;
+};
+
+
+
+
+
+template <int rows, int columns>
+unsigned int
+BlockSparsityPattern<rows,columns>::n_nonzero_elements () const
+{
+  unsigned int count = 0;
+  for (unsigned int i=0; i<rows; ++i)
+    for (unsigned int j=0; j<columns; ++j)
+      count += sub_objects[i][j].n_nonzero_elements ();
+  return count;
+};
+
+
+
+template <int rows, int columns>
+bool
+BlockSparsityPattern<rows,columns>::is_compressed () const
+{
+  for (unsigned int i=0; i<rows; ++i)
+    for (unsigned int j=0; j<columns; ++j)
+      if (sub_objects[i][j].is_compressed () == false)
+       return false;
+  return true;
+};
+
+
+
+#endif // ifdef block_sparsity_pattern_templates_h
index 238a7bc9f1dfabacf8931754f93f96907d96cb13..0e8ac00a1c909d4fa9d599a7a9574b113cf827c7 100644 (file)
  * can do, plus the access to a single #Vector# inside the
  * #BlockVector# by #block(i)#.
  *
+ *
+ * \section{On template instantiations}
+ *
+ * Member functions of this class are either implemented in this file
+ * or in a file of the same name with suffix ``.templates.h''. For the
+ * most common combinations of the template parameters, instantiations
+ * of this class are provided in a file with suffix ``.cc'' in the
+ * ``source'' directory. If you need an instantiation that is not
+ * listed there, you have to include this file along with the
+ * corresponding ``.templates.h'' file and instantiate the respective
+ * class yourself.
+ *
  * @author Guido Kanschat, 1999; Wolfgang Bangerth, 2000
  */
 template <int n_blocks, typename Number>
index b7747df96c586ab0fc5d7cd35af86ad4e3afe809..e44678438a89c224a1b14e25ecbfd9078734fae1 100644 (file)
@@ -45,6 +45,17 @@ template<typename number> class Vector;
  * type, the matrix number type is used.
  *
  *
+ * \section{On template instantiations}
+ *
+ * Member functions of this class are either implemented in this file
+ * or in a file of the same name with suffix ``.templates.h''. For the
+ * most common combinations of the template parameters, instantiations
+ * of this class are provided in a file with suffix ``.cc'' in the
+ * ``source'' directory. If you need an instantiation that is not
+ * listed there, you have to include this file along with the
+ * corresponding ``.templates.h'' file and instantiate the respective
+ * class yourself.
+ *
  * @author Guido Kanschat, Franz-Theo Suttmeier, Wolfgang Bangerth
  */
 template<typename number>
index 1875e3fd44460ac2d5350203fefff7324929ed2d..071d4df14b66397f38ab54d512dc4b229fefa6a9 100644 (file)
  * an exact solver, but rather as a preconditioner, you may probably want to
  * store the inverted blocks with less accuracy than the original matrix;
  * for example, #number==double, inverse_type=float# might be a viable choice.
+ *
+ *
+ * \section{On template instantiations}
+ *
+ * Member functions of this class are either implemented in this file
+ * or in a file of the same name with suffix ``.templates.h''. For the
+ * most common combinations of the template parameters, instantiations
+ * of this class are provided in a file with suffix ``.cc'' in the
+ * ``source'' directory. If you need an instantiation that is not
+ * listed there, you have to include this file along with the
+ * corresponding ``.templates.h'' file and instantiate the respective
+ * class yourself.
+ *
+ * @author Ralf Hartmann, 1999
  */
-template<typename number,
-         typename inverse_type = number>
+template<typename number, typename inverse_type = number>
 class PreconditionBlock: public Subscriptor
 {
   public:
index 0a51693e6641cc953b9d0372f81d8793fc3deb88..e092baa40a953eaa4eb23f5c2a100d420b377b62 100644 (file)
  * \end{verbatim}
  *
  *
+ * \section{On template instantiations}
+ *
+ * Member functions of this class are either implemented in this file
+ * or in a file of the same name with suffix ``.templates.h''. For the
+ * most common combinations of the template parameters, instantiations
+ * of this class are provided in a file with suffix ``.cc'' in the
+ * ``source'' directory. If you need an instantiation that is not
+ * listed there, you have to include this file along with the
+ * corresponding ``.templates.h'' file and instantiate the respective
+ * class yourself.
+ *
  * @author Wolfgang Bangerth, 1999, based on a similar implementation by Malte Braack
  */
 template <typename number>
index 7a880eab2f36657431394abc4957332d6b0a678c..c2258cc8d74db8ebf6c2a9bc8f9ffa55d9510834 100644 (file)
 /**
  * Sparse matrix.
  *
+ *
+ * \section{On template instantiations}
+ *
+ * Member functions of this class are either implemented in this file
+ * or in a file of the same name with suffix ``.templates.h''. For the
+ * most common combinations of the template parameters, instantiations
+ * of this class are provided in a file with suffix ``.cc'' in the
+ * ``source'' directory. If you need an instantiation that is not
+ * listed there, you have to include this file along with the
+ * corresponding ``.templates.h'' file and instantiate the respective
+ * class yourself.
+ *
  * @author Original version by Roland Becker, Guido Kanschat, Franz-Theo Suttmeier; lots of enhancements, reorganisation and documentation by Wolfgang Bangerth 1998
  */
 template <typename number>
index 1e894a80a392ce143cccd48cd6bb614da2db938c..74427cc2ade5d37a4773871a4bf37cdab5846e1e 100644 (file)
  * whether this might pose some problems in the inversion of the local matrices.
  * Maybe someone would like to check this.
  *
+ *
+ * \section{On template instantiations}
+ *
+ * Member functions of this class are either implemented in this file
+ * or in a file of the same name with suffix ``.templates.h''. For the
+ * most common combinations of the template parameters, instantiations
+ * of this class are provided in a file with suffix ``.cc'' in the
+ * ``source'' directory. If you need an instantiation that is not
+ * listed there, you have to include this file along with the
+ * corresponding ``.templates.h'' file and instantiate the respective
+ * class yourself.
+ *
  * @author Guido Kanschat, Wolfgang Bangerth; 1999, 2000
  */
 template<typename number>
index af2e7a348fa859cafd1784b1d70adcc0e1589b17..7b67b23f8237101e74e62e7136df68a31df59945 100644 (file)
  * #reload# is called. If it is not available, #reload# waits until
  * the detached thread has loaded the data.
  *
+ *
+ * \section{On template instantiations}
+ *
+ * Member functions of this class are either implemented in this file
+ * or in a file of the same name with suffix ``.templates.h''. For the
+ * most common combinations of the template parameters, instantiations
+ * of this class are provided in a file with suffix ``.cc'' in the
+ * ``source'' directory. If you need an instantiation that is not
+ * listed there, you have to include this file along with the
+ * corresponding ``.templates.h'' file and instantiate the respective
+ * class yourself.
+ *
  * @author Wolfgang Bangerth, 1999, 2000
  */
 template <typename number>
index 76d7c140b091506be588462a474dd1fcffb636be..6bf0f45b27a8e54d90c53b1099545a98e29b1cef 100644 (file)
  * As opposed to the array of the C++ standard library called #vector#, this class implements
  * an element of a vector space suitable for numerical computations.
  *
+ *
+ * \section{On template instantiations}
+ *
+ * Member functions of this class are either implemented in this file
+ * or in a file of the same name with suffix ``.templates.h''. For the
+ * most common combinations of the template parameters, instantiations
+ * of this class are provided in a file with suffix ``.cc'' in the
+ * ``source'' directory. If you need an instantiation that is not
+ * listed there, you have to include this file along with the
+ * corresponding ``.templates.h'' file and instantiate the respective
+ * class yourself.
+ *
  * @author Guido Kanschat, Franz-Theo Suttmeier, Wolfgang Bangerth
  */
 template <typename Number>
diff --git a/deal.II/lac/source/block_sparse_matrix.cc b/deal.II/lac/source/block_sparse_matrix.cc
new file mode 100644 (file)
index 0000000..504d7c5
--- /dev/null
@@ -0,0 +1,30 @@
+//----------------------------  block_block_sparse_matrix.cc  ---------------------------
+//    $Id$
+//    Version: $Name$
+//
+//    Copyright (C) 2000 by the deal.II authors
+//
+//    This file is subject to QPL and may not be  distributed
+//    without copyright and license information. Please refer
+//    to the file deal.II/doc/license.html for the  text  and
+//    further information on this license.
+//
+//----------------------------  block_block_sparse_matrix.cc  ---------------------------
+
+#include <lac/block_sparse_matrix.templates.h>
+
+// explicit instantiations
+template class BlockSparseMatrix<double,2,2>;
+template class BlockSparseMatrix<double,2,3>;
+
+template class BlockSparseMatrix<double,3,2>;
+template class BlockSparseMatrix<double,3,3>;
+
+
+
+template class BlockSparseMatrix<float,2,2>;
+template class BlockSparseMatrix<float,2,3>;
+
+template class BlockSparseMatrix<float,3,2>;
+template class BlockSparseMatrix<float,3,3>;
+
diff --git a/deal.II/lac/source/block_sparsity_pattern.cc b/deal.II/lac/source/block_sparsity_pattern.cc
new file mode 100644 (file)
index 0000000..e886af0
--- /dev/null
@@ -0,0 +1,21 @@
+//----------------------------  block_block_sparsity_pattern.cc  ---------------------------
+//    $Id$
+//    Version: $Name$
+//
+//    Copyright (C) 2000 by the deal.II authors
+//
+//    This file is subject to QPL and may not be  distributed
+//    without copyright and license information. Please refer
+//    to the file deal.II/doc/license.html for the  text  and
+//    further information on this license.
+//
+//----------------------------  block_block_sparsity_pattern.cc  ---------------------------
+
+#include <lac/block_sparsity_pattern.templates.h>
+
+// explicit instantiations
+template class BlockSparsityPattern<2,2>;
+template class BlockSparsityPattern<2,3>;
+
+template class BlockSparsityPattern<3,2>;
+template class BlockSparsityPattern<3,3>;

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.