]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Use proper partitioner in step-64
authorMartin Kronbichler <kronbichler@lnm.mw.tum.de>
Fri, 27 Sep 2019 14:11:39 +0000 (16:11 +0200)
committerMartin Kronbichler <kronbichler@lnm.mw.tum.de>
Fri, 27 Sep 2019 14:11:39 +0000 (16:11 +0200)
examples/step-64/step-64.cu

index abc67f1696ea8ca5b86d2c711f6e17c2991166ca..1ec73ef854b84d5aa2e00408e915de943f949421 100644 (file)
@@ -236,6 +236,9 @@ namespace Step64
           const LinearAlgebra::distributed::Vector<double, MemorySpace::CUDA>
             &src) const;
 
+    void initialize_dof_vector(
+      LinearAlgebra::distributed::Vector<double, MemorySpace::CUDA> &vec) const;
+
   private:
     CUDAWrappers::MatrixFree<dim, double>       mf_data;
     LinearAlgebra::CUDAWrappers::Vector<double> coef;
@@ -304,6 +307,15 @@ namespace Step64
   }
 
 
+
+  template <int dim, int fe_degree>
+  void HelmholtzOperator<dim, fe_degree>::initialize_dof_vector(
+    LinearAlgebra::distributed::Vector<double, MemorySpace::CUDA> &vec) const
+  {
+    mf_data.initialize_dof_vector(vec);
+  }
+
+
   // @sect3{Class <code>HelmholtzProblem</code>}
 
   // This is the main class of this program. It defines the usual
@@ -401,8 +413,8 @@ namespace Step64
     ghost_solution_host.reinit(locally_owned_dofs,
                                locally_relevant_dofs,
                                mpi_communicator);
-    solution_dev.reinit(locally_owned_dofs, mpi_communicator);
-    system_rhs_dev.reinit(locally_owned_dofs, mpi_communicator);
+    system_matrix_dev->initialize_dof_vector(solution_dev);
+    system_rhs_dev.reinit(solution_dev);
   }
 
 

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.