]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Add apply_boundary_values for block matrices and vectors.
authorwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 17 May 2000 14:30:14 +0000 (14:30 +0000)
committerwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 17 May 2000 14:30:14 +0000 (14:30 +0000)
git-svn-id: https://svn.dealii.org/trunk@2879 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/deal.II/include/numerics/matrices.h

index 786a733324f788dd852f2273166b3cafa1abbffa..14aa6cdb3fe39c929a0080adf13f0ca41c40756a 100644 (file)
@@ -436,7 +436,7 @@ class MatrixCreator
  * seems to be too expensive.
  *
  * 
- * @author Wolfgang Bangerth, 1998
+ * @author Wolfgang Bangerth, 1998, 2000
  */
 template <int dim>
 class MatrixTools : public MatrixCreator<dim>
@@ -448,12 +448,30 @@ class MatrixTools : public MatrixCreator<dim>
                                      * as described in the general
                                      * documentation.
                                      */
-    static void apply_boundary_values (const map<unsigned int,double> &boundary_values,
-                                      SparseMatrix<double>  &matrix,
-                                      Vector<double>        &solution,
-                                      Vector<double>        &right_hand_side,
-                                      const bool             eliminate_columns = true);
+    static void
+    apply_boundary_values (const map<unsigned int,double> &boundary_values,
+                          SparseMatrix<double>  &matrix,
+                          Vector<double>        &solution,
+                          Vector<double>        &right_hand_side,
+                          const bool             eliminate_columns = true);
 
+                                    /**
+                                     * Apply dirichlet boundary
+                                     * conditions to the system
+                                     * matrix and vectors as
+                                     * described in the general
+                                     * documentation. This function
+                                     * works for block sparse
+                                     * matrices and block vectors
+                                     */
+    template <int blocks>
+    static void
+    apply_boundary_values (const map<unsigned int,double> &boundary_values,
+                          BlockSparseMatrix<double,blocks,blocks> &matrix,
+                          BlockVector<blocks,double> &solution,
+                          BlockVector<blocks,double> &right_hand_side,
+                          const bool                  eliminate_columns = true);
+    
                                     /**
                                      * Exception
                                      */
@@ -461,6 +479,10 @@ class MatrixTools : public MatrixCreator<dim>
                    int, int,
                    << "The dimensions " << arg1 << " and " << arg2
                    << " don't match.");
+                                    /**
+                                     * Exception
+                                     */
+    DeclException0 (ExcMatrixNotBlockSquare);
 };
 
 

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.