]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Add range_partitioner and domain_partitioner member functions
authorMatthias Maier <tamiko@43-1.org>
Wed, 8 Apr 2015 10:11:54 +0000 (12:11 +0200)
committerMatthias Maier <tamiko@43-1.org>
Sun, 19 Apr 2015 20:55:05 +0000 (22:55 +0200)
TrilinosWrappers::BlockSparseMatrix now has member functions returning an
std::vector of the underlying, blockwise Epetra_Map object

doc/news/changes.h
include/deal.II/lac/trilinos_block_sparse_matrix.h

index 71e426b3b1a417d4cbf3ea1aa6d3328f99d25bb4..916737a1eda6d882be5bab7d89dbcf209a4a5da5 100644 (file)
@@ -450,6 +450,14 @@ inconvenience this causes.
 <h3>Specific improvements</h3>
 
 <ol>
+  <li> New: TrilinosWrappers::BlockSparseMatrix now has member functions
+  TrilinosWrappers::BlockSparseMatrix::domain_paritioner() and
+  TrilinosWrappers::BlockSparseMatrix::range_partitioner() that return a
+  vector of the underlying block Epetra_Map.
+  <br>
+  (Matthias Maier, 2015/04/08)
+
+  </li>
   <li> Fixed: The class SymmetricTensor<2,dim> is now usable also for dim>3.
   <br>
   (Martin Kronbichler, 2015/04/14)
index 179411b0612fb2478aa0f1cf012c2a04a8ad3815..5c055f17b41cd46ffcd3e0096044f70aaf8cb24d 100644 (file)
@@ -1,6 +1,6 @@
 // ---------------------------------------------------------------------
 //
-// Copyright (C) 2008 - 2014 by the deal.II authors
+// Copyright (C) 2008 - 2015 by the deal.II authors
 //
 // This file is part of the deal.II library.
 //
@@ -223,6 +223,23 @@ namespace TrilinosWrappers
      */
     size_type n_nonzero_elements () const;
 
+    /**
+     * Return a vector of the underlying Trilinos Epetra_Map that sets the
+     * partitioning of the domain space of this block matrix, i.e., the
+     * partitioning of the individual block vectors this matrix has to be
+     * multiplied with.
+     */
+    std::vector<Epetra_Map> domain_partitioner () const;
+
+    /**
+     * Return a vector of the underlying Trilinos Epetra_Map that sets the
+     * partitioning of the range space of this block matrix, i.e., the
+     * partitioning of the individual block vectors that are the result
+     * from matrix-vector products.
+     */
+    std::vector<Epetra_Map> range_partitioner () const;
+
+
     /**
      * Matrix-vector multiplication: let $dst = M*src$ with $M$ being this
      * matrix. The vector types can be block vectors or non-block vectors
@@ -413,6 +430,38 @@ namespace TrilinosWrappers
 
 
 
+  inline
+  std::vector<Epetra_Map>
+  BlockSparseMatrix::domain_partitioner () const
+  {
+    Assert (this->n_block_cols() != 0, ExcNotInitialized());
+    Assert (this->n_block_rows() != 0, ExcNotInitialized());
+
+    std::vector<Epetra_Map> domain_partitioner;
+    for (size_type c = 0; c < this->n_block_cols(); ++c)
+      domain_partitioner.push_back(this->sub_objects[0][c]->domain_partitioner());
+
+    return domain_partitioner;
+  }
+
+
+
+  inline
+  std::vector<Epetra_Map>
+  BlockSparseMatrix::range_partitioner () const
+  {
+    Assert (this->n_block_cols() != 0, ExcNotInitialized());
+    Assert (this->n_block_rows() != 0, ExcNotInitialized());
+
+    std::vector<Epetra_Map> range_partitioner;
+    for (size_type r = 0; r < this->n_block_rows(); ++r)
+      range_partitioner.push_back(this->sub_objects[r][0]->range_partitioner());
+
+    return range_partitioner;
+  }
+
+
+
   inline
   BlockSparseMatrix &
   BlockSparseMatrix::operator = (const double d)

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.