]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Updated to use Trilinos SparseMatrix
authorcazamias <cazamias@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 16 Nov 2012 23:01:38 +0000 (23:01 +0000)
committercazamias <cazamias@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 16 Nov 2012 23:01:38 +0000 (23:01 +0000)
git-svn-id: https://svn.dealii.org/branches/branch_unify_linear_algebra@27554 0785d39b-7218-0410-832d-ea1e28bc413d

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

index b958a72ba82379b08647e1920950e5f0ff35822f..3717d275880441140aa05163a909d33c3a21af6f 100644 (file)
@@ -429,11 +429,20 @@ namespace Step40
                                                 dof_handler.n_locally_owned_dofs_per_processor(),
                                                 mpi_communicator,
                                                 locally_relevant_dofs);
+
+#ifdef USE_PETSC_LA
     system_matrix.reinit (mpi_communicator,
                           csp,
                           dof_handler.n_locally_owned_dofs_per_processor(),
                           dof_handler.n_locally_owned_dofs_per_processor(),
                           Utilities::MPI::this_mpi_process(mpi_communicator));
+#else
+    system_matrix.reinit (locally_owned_dofs,
+                          locally_owned_dofs,
+                          csp,
+                          mpi_communicator,
+                          false);
+#endif
   }
 
 
@@ -608,8 +617,7 @@ namespace Step40
   {
     LA::MPI::Vector
       completely_distributed_solution (mpi_communicator,
-                                       dof_handler.n_dofs(),
-                                       dof_handler.n_locally_owned_dofs());
+                                       locally_owned_dofs);
 
     SolverControl solver_control (dof_handler.n_dofs(), 1e-12);
 

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.