]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Added PETSc instantiation and preprocessor checks 1039/head
authorMaien Hamed <maien@maien.uct.ac.za>
Sat, 27 Jun 2015 19:32:55 +0000 (21:32 +0200)
committerMaien Hamed <maien@maien.uct.ac.za>
Sat, 27 Jun 2015 19:32:55 +0000 (21:32 +0200)
include/deal.II/lac/block_matrix_array.h
source/lac/block_matrix_array.cc

index 640d0e9921d8b878706d17fb1f432b2c24248467..74054bdda9e3c3c06f595b2d5f617a7ea469d6ca 100644 (file)
@@ -189,8 +189,8 @@ public:
   /**
    * Matrix-vector multiplication adding to <tt>dst</tt>.
    */
-       void vmult_add(BLOCK_VECTOR &dst,
-                  const BLOCK_VECTOR &src) const;
+  void vmult_add(BLOCK_VECTOR &dst,
+                 const BLOCK_VECTOR &src) const;
 
   /**
    * Transposed matrix-vector multiplication.
@@ -461,20 +461,20 @@ public:
   /**
    * Make function of base class available.
    */
-  using BlockMatrixArray<number>::print_latex;
+  using BlockMatrixArray<number,BLOCK_VECTOR>::print_latex;
 
   /**
    * Make function of base class available.
    */
-  using BlockMatrixArray<number>::n_block_rows;
+  using BlockMatrixArray<number,BLOCK_VECTOR>::n_block_rows;
 
   /**
    * Make function of base class available.
    */
-  using BlockMatrixArray<number>::n_block_cols;
-  using BlockMatrixArray<number>::clear;
-  using BlockMatrixArray<number>::Subscriptor::subscribe;
-  using BlockMatrixArray<number>::Subscriptor::unsubscribe;
+  using BlockMatrixArray<number,BLOCK_VECTOR>::n_block_cols;
+  using BlockMatrixArray<number,BLOCK_VECTOR>::clear;
+  using BlockMatrixArray<number,BLOCK_VECTOR>::Subscriptor::subscribe;
+  using BlockMatrixArray<number,BLOCK_VECTOR>::Subscriptor::unsubscribe;
 
   /**
    * @addtogroup Exceptions
@@ -620,8 +620,8 @@ template <class MATRIX>
 inline
 void
 BlockTrianglePrecondition<number, BLOCK_VECTOR>::enter (const MATRIX &matrix,
-                                          size_type row, size_type col,
-                                          number prefix, bool transpose)
+                                                        size_type row, size_type col,
+                                                        number prefix, bool transpose)
 {
   BlockMatrixArray<number, BLOCK_VECTOR>::enter(matrix, row, col, prefix, transpose);
 }
index edfe73058c0de15283050e7d82a070181a85f398..af2a0590a1f1c1b5f8cfd98b393907e405d006cc 100644 (file)
@@ -98,7 +98,7 @@ BlockMatrixArray<number,BLOCK_VECTOR>::clear ()
 template <typename number, typename BLOCK_VECTOR>
 void
 BlockMatrixArray<number,BLOCK_VECTOR>::vmult_add (BLOCK_VECTOR &dst,
-                                     const BLOCK_VECTOR &src) const
+                                                  const BLOCK_VECTOR &src) const
 {
   GrowingVectorMemory<typename BLOCK_VECTOR::BlockType > mem;
   Assert (dst.n_blocks() == block_rows,
@@ -129,7 +129,7 @@ BlockMatrixArray<number,BLOCK_VECTOR>::vmult_add (BLOCK_VECTOR &dst,
 template <typename number, typename BLOCK_VECTOR>
 void
 BlockMatrixArray<number,BLOCK_VECTOR>::vmult (BLOCK_VECTOR &dst,
-                                 const BLOCK_VECTOR &src) const
+                                              const BLOCK_VECTOR &src) const
 {
   dst = 0.;
   vmult_add (dst, src);
@@ -141,7 +141,7 @@ BlockMatrixArray<number,BLOCK_VECTOR>::vmult (BLOCK_VECTOR &dst,
 template <typename number, typename BLOCK_VECTOR>
 void
 BlockMatrixArray<number,BLOCK_VECTOR>::Tvmult_add (BLOCK_VECTOR &dst,
-                                      const BLOCK_VECTOR &src) const
+                                                   const BLOCK_VECTOR &src) const
 {
   GrowingVectorMemory<typename BLOCK_VECTOR::BlockType > mem;
   Assert (dst.n_blocks() == block_cols,
@@ -171,7 +171,7 @@ BlockMatrixArray<number,BLOCK_VECTOR>::Tvmult_add (BLOCK_VECTOR &dst,
 template <typename number, typename BLOCK_VECTOR>
 void
 BlockMatrixArray<number,BLOCK_VECTOR>::Tvmult (BLOCK_VECTOR &dst,
-                                  const BLOCK_VECTOR &src) const
+                                               const BLOCK_VECTOR &src) const
 {
   dst = 0.;
   Tvmult_add (dst, src);
@@ -426,7 +426,18 @@ template class BlockMatrixArray<double>;
 template class BlockTrianglePrecondition<float>;
 template class BlockTrianglePrecondition<double>;
 
-template class BlockMatrixArray<double, TrilinosWrappers::MPI::BlockVector>;
+#ifdef DEAL_II_WITH_TRILINOS
 template class BlockMatrixArray<float, TrilinosWrappers::MPI::BlockVector>;
+template class BlockMatrixArray<double, TrilinosWrappers::MPI::BlockVector>;
+template class BlockTrianglePrecondition<float, TrilinosWrappers::MPI::BlockVector>;
+template class BlockTrianglePrecondition<double, TrilinosWrappers::MPI::BlockVector>;
+#endif
+
+#ifdef DEAL_II_WITH_PETSC
+template class BlockMatrixArray<float, PETScWrappers::MPI::BlockVector>;
+template class BlockMatrixArray<double, PETScWrappers::MPI::BlockVector>;
+template class BlockTrianglePrecondition<float, PETScWrappers::MPI::BlockVector>;
+template class BlockTrianglePrecondition<double, PETScWrappers::MPI::BlockVector>;
+#endif
 
 DEAL_II_NAMESPACE_CLOSE

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.