]> https://gitweb.dealii.org/ - dealii.git/commitdiff
modify step-6 to work with petsc
authorTimo Heister <timo.heister@gmail.com>
Tue, 6 Nov 2012 14:48:39 +0000 (14:48 +0000)
committerTimo Heister <timo.heister@gmail.com>
Tue, 6 Nov 2012 14:48:39 +0000 (14:48 +0000)
git-svn-id: https://svn.dealii.org/branches/branch_unify_linear_algebra@27433 0785d39b-7218-0410-832d-ea1e28bc413d

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

index b2d3f251263c747be20a5638987d26c8ead20f05..917d0537c1734afbd0c69306a73c2d7a5bdee505 100644 (file)
 
 #include <deal.II/lac/abstract_linear_algebra.h>
 
+#define USE_PETSC_LA
+
 namespace LA
 {
+#ifdef USE_PETSC_LA
+  using namespace dealii::LinearAlgebraPETSc;
+#else
   using namespace dealii::LinearAlgebraDealII;
-//  using namespace dealii::LinearAlgebraPETSc;
+#endif  
 //  using namespace dealii::LinearAlgebraTrilinos;
 }
 
@@ -622,9 +627,10 @@ void Step6<dim>::assemble_system ()
       constraints.distribute_local_to_global(cell_matrix, cell_rhs, local_dof_indices, system_matrix, system_rhs);
     }
 
-//  system_matrix.compress();
-//  system_rhs.compress();
-  
+  #ifdef USE_PETSC_LA
+  system_matrix.compress();
+  system_rhs.compress();
+  #endif
 
 // Now we are done assembling the linear
                                    // system.  The constrained nodes are still

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.