]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Make test compile and run. It does abort now, though...
authorbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Sun, 26 Jun 2011 17:21:24 +0000 (17:21 +0000)
committerbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Sun, 26 Jun 2011 17:21:24 +0000 (17:21 +0000)
git-svn-id: https://svn.dealii.org/trunk@23864 0785d39b-7218-0410-832d-ea1e28bc413d

tests/mpi/interpolate_02.cc

index 925be131880ab86367bc687061f786fe245d9f4c..c3ef34ebad5f8bdae4f8aaf3580aacb40d7eacdb 100644 (file)
@@ -58,7 +58,7 @@ void test()
   dofh.distribute_dofs (fe);
 
   IndexSet owned_set = dofh.locally_owned_dofs();
-  PETScWrappers::MPI::Vector x (MPI_COMM_WORLD,dof.n_dofs(),owned_set.size());
+  PETScWrappers::MPI::Vector x (MPI_COMM_WORLD,dofh.n_dofs(),owned_set.n_elements());
 
   VectorTools::interpolate(dofh,
                           ConstantFunction<dim>(1),
@@ -75,12 +75,8 @@ void test()
 
 int main(int argc, char *argv[])
 {
-#ifdef DEAL_II_COMPILER_SUPPORTS_MPI
-  MPI_Init (&argc,&argv);
-#else
-  (void)argc;
-  (void)argv;
-#endif
+  PetscInitialize(&argc,&argv,0,0);
+
 
   unsigned int myid = Utilities::System::get_this_mpi_process (MPI_COMM_WORLD);
 
@@ -107,7 +103,5 @@ int main(int argc, char *argv[])
       test<3>();
     }
 
-#ifdef DEAL_II_COMPILER_SUPPORTS_MPI
-  MPI_Finalize();
-#endif
+  PetscFinalize();
 }

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.