From: Peter Munch Date: Fri, 27 Sep 2019 05:06:51 +0000 (+0200) Subject: Update step-64 X-Git-Tag: v9.2.0-rc1~1005^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F8871%2Fhead;p=dealii.git Update step-64 --- diff --git a/examples/step-64/step-64.cu b/examples/step-64/step-64.cu index abc67f1696..cb22c35a64 100644 --- a/examples/step-64/step-64.cu +++ b/examples/step-64/step-64.cu @@ -120,7 +120,9 @@ namespace Step64 // The class `HelmholtzOperatorQuad` implements the evaluation of // the Helmholtz operator at each quadrature point. It uses a // similar mechanism as the MatrixFree framework introduced in - // step-37. As before, the functions of this class need to run on + // step-37. In contrast to there, the actual quadrature point + // index is treated implicitly by converting the current thread + // index. As before, the functions of this class need to run on // the device, so need to be marked as `__device__` for the // compiler. template @@ -132,8 +134,7 @@ namespace Step64 {} __device__ void - operator()(CUDAWrappers::FEEvaluation *fe_eval, - const unsigned int q) const; + operator()(CUDAWrappers::FEEvaluation *fe_eval) const; private: double coef; @@ -149,11 +150,10 @@ namespace Step64 // here: template __device__ void HelmholtzOperatorQuad:: - operator()(CUDAWrappers::FEEvaluation *fe_eval, - const unsigned int q) const + operator()(CUDAWrappers::FEEvaluation *fe_eval) const { - fe_eval->submit_value(coef * fe_eval->get_value(q), q); - fe_eval->submit_gradient(fe_eval->get_gradient(q), q); + fe_eval->submit_value(coef * fe_eval->get_value()); + fe_eval->submit_gradient(fe_eval->get_gradient()); } @@ -209,7 +209,7 @@ namespace Step64 fe_eval(cell, gpu_data, shared_data); fe_eval.read_dof_values(src); fe_eval.evaluate(true, true); - fe_eval.apply_quad_point_operations( + fe_eval.apply_for_each_quad_point( HelmholtzOperatorQuad(coef[pos])); fe_eval.integrate(true, true); fe_eval.distribute_local_to_global(dst);