]> https://gitweb.dealii.org/ - dealii.git/commitdiff
change step-6 tp use abstract algebra
authorTimo Heister <timo.heister@gmail.com>
Fri, 2 Nov 2012 21:32:22 +0000 (21:32 +0000)
committerTimo Heister <timo.heister@gmail.com>
Fri, 2 Nov 2012 21:32:22 +0000 (21:32 +0000)
git-svn-id: https://svn.dealii.org/branches/branch_unify_linear_algebra@27323 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/examples/step-6/step-6.cc

index caf09197cd07c12e7a57e54d4b2af369b018fc54..04902efdf76f60e6efc259153c5efbed7e3160a4 100644 (file)
 #include <deal.II/numerics/matrix_tools.h>
 #include <deal.II/numerics/data_out.h>
 
+#include <deal.II/lac/parallel_linear_algebra.h>
+
+namespace LA
+{
+  using namespace dealii::LinearAlgebraDealII;
+//  using namespace dealii::LinearAlgebraPETSc;
+//  using namespace dealii::LinearAlgebraTrilinos;
+}
+
 #include <fstream>
 #include <iostream>
 
@@ -149,10 +158,10 @@ class Step6
     ConstraintMatrix     hanging_node_constraints;
 
     SparsityPattern      sparsity_pattern;
-    SparseMatrix<double> system_matrix;
+    LA::SparseMatrix system_matrix;
 
-    Vector<double>       solution;
-    Vector<double>       system_rhs;
+    LA::Vector       solution;
+    LA::Vector       system_rhs;
 };
 
 
@@ -561,7 +570,7 @@ void Step6<dim>::assemble_system ()
   const unsigned int   n_q_points    = quadrature_formula.size();
 
   FullMatrix<double>   cell_matrix (dofs_per_cell, dofs_per_cell);
-  Vector<double>       cell_rhs (dofs_per_cell);
+  LA::Vector       cell_rhs (dofs_per_cell);
 
   std::vector<unsigned int> local_dof_indices (dofs_per_cell);
 

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.