]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Rename some functions in CUDAWrappers::EvaluatorTensorProduct 16424/head
authorPeter Munch <peterrmuench@gmail.com>
Sun, 7 Jan 2024 13:06:29 +0000 (14:06 +0100)
committerPeter Munch <peterrmuench@gmail.com>
Sun, 7 Jan 2024 13:06:29 +0000 (14:06 +0100)
include/deal.II/matrix_free/cuda_fe_evaluation.h
include/deal.II/matrix_free/cuda_tensor_product_kernels.h

index 282fcaf298d74f926b6776b1efa96fde1a565cf9..a5f26290fa25968845c0f66a31297e0b17ffe6f6 100644 (file)
@@ -357,19 +357,19 @@ namespace CUDAWrappers
     if ((evaluate_flag & EvaluationFlags::values) &&
         (evaluate_flag & EvaluationFlags::gradients))
       {
-        evaluator_tensor_product.value_and_gradient_at_quad_pts(
+        evaluator_tensor_product.evaluate_values_and_gradients(
           shared_data->values, shared_data->gradients);
         shared_data->team_member.team_barrier();
       }
     else if (evaluate_flag & EvaluationFlags::gradients)
       {
-        evaluator_tensor_product.gradient_at_quad_pts(shared_data->values,
-                                                      shared_data->gradients);
+        evaluator_tensor_product.evaluate_gradients(shared_data->values,
+                                                    shared_data->gradients);
         shared_data->team_member.team_barrier();
       }
     else if (evaluate_flag & EvaluationFlags::values)
       {
-        evaluator_tensor_product.value_at_quad_pts(shared_data->values);
+        evaluator_tensor_product.evaluate_values(shared_data->values);
         shared_data->team_member.team_barrier();
       }
   }
@@ -416,17 +416,17 @@ namespace CUDAWrappers
     if ((integration_flag & EvaluationFlags::values) &&
         (integration_flag & EvaluationFlags::gradients))
       {
-        evaluator_tensor_product.integrate_value_and_gradient(
+        evaluator_tensor_product.integrate_values_and_gradients(
           shared_data->values, shared_data->gradients);
       }
     else if (integration_flag & EvaluationFlags::values)
       {
-        evaluator_tensor_product.integrate_value(shared_data->values);
+        evaluator_tensor_product.integrate_values(shared_data->values);
         shared_data->team_member.team_barrier();
       }
     else if (integration_flag & EvaluationFlags::gradients)
       {
-        evaluator_tensor_product.template integrate_gradient<false>(
+        evaluator_tensor_product.template integrate_gradients<false>(
           shared_data->values, shared_data->gradients);
         shared_data->team_member.team_barrier();
       }
index 2a614281cc82833d78813e45ba96efb044cae106..8f9f678edf95b3942df327199bfdb646d275034a 100644 (file)
@@ -357,6 +357,7 @@ namespace CUDAWrappers
                                   n_q_points_1d,
                                   Number>
     {
+    public:
       using TeamHandle = Kokkos::TeamPolicy<
         MemorySpace::Default::kokkos_space::execution_space>::member_type;
 
@@ -370,89 +371,90 @@ namespace CUDAWrappers
           co_shape_gradients);
 
       /**
-       * Evaluate the values of a finite element function at the quadrature
-       * points.
+       * Evaluate the finite element function at the quadrature points.
        */
-      template <int  direction,
-                bool dof_to_quad,
-                bool add,
-                bool in_place,
-                typename ViewTypeIn,
-                typename ViewTypeOut>
+      template <typename ViewType>
       DEAL_II_HOST_DEVICE void
-      values(const ViewTypeIn in, ViewTypeOut out) const;
+      evaluate_values(ViewType u);
 
       /**
-       * Evaluate the gradient of a finite element function at the quadrature
-       * points for a given @p direction.
+       * Evaluate the gradients of the finite element function at the quadrature
+       * points.
        */
-      template <int  direction,
-                bool dof_to_quad,
-                bool add,
-                bool in_place,
-                typename ViewTypeIn,
-                typename ViewTypeOut>
+      template <typename ViewTypeIn, typename ViewTypeOut>
       DEAL_II_HOST_DEVICE void
-      gradients(const ViewTypeIn in, ViewTypeOut out) const;
+      evaluate_gradients(const ViewTypeIn u, ViewTypeOut grad_u);
 
       /**
-       * Evaluate the gradient of a finite element function at the quadrature
-       * points for a given @p direction for collocation methods.
+       * Evaluate the values and the gradients of the finite element function at
+       * the quadrature points.
        */
-      template <int  direction,
-                bool dof_to_quad,
-                bool add,
-                bool in_place,
-                typename ViewTypeIn,
-                typename ViewTypeOut>
+      template <typename ViewType1, typename ViewType2>
       DEAL_II_HOST_DEVICE void
-      co_gradients(const ViewTypeIn in, ViewTypeOut out) const;
+      evaluate_values_and_gradients(ViewType1 u, ViewType2 grad_u);
 
       /**
-       * Evaluate the finite element function at the quadrature points.
+       * Helper function for integrate(). Integrate the finite element function.
        */
       template <typename ViewType>
       DEAL_II_HOST_DEVICE void
-      value_at_quad_pts(ViewType u);
+      integrate_values(ViewType u);
 
       /**
-       * Helper function for integrate(). Integrate the finite element function.
+       * Helper function for integrate(). Integrate the gradients of the finite
+       * element function.
        */
-      template <typename ViewType>
+      template <bool add, typename ViewType1, typename ViewType2>
       DEAL_II_HOST_DEVICE void
-      integrate_value(ViewType u);
+      integrate_gradients(ViewType1 u, ViewType2 grad_u);
 
       /**
-       * Evaluate the gradients of the finite element function at the quadrature
-       * points.
+       * Helper function for integrate(). Integrate the values and the gradients
+       * of the finite element function.
        */
-      template <typename ViewTypeIn, typename ViewTypeOut>
+      template <typename ViewType1, typename ViewType2>
       DEAL_II_HOST_DEVICE void
-      gradient_at_quad_pts(const ViewTypeIn u, ViewTypeOut grad_u);
+      integrate_values_and_gradients(ViewType1 u, ViewType2 grad_u);
 
       /**
-       * Evaluate the values and the gradients of the finite element function at
-       * the quadrature points.
+       * Evaluate/integrate the values of a finite element function at the
+       * quadrature points for a given @p direction.
        */
-      template <typename ViewType1, typename ViewType2>
+      template <int  direction,
+                bool dof_to_quad,
+                bool add,
+                bool in_place,
+                typename ViewTypeIn,
+                typename ViewTypeOut>
       DEAL_II_HOST_DEVICE void
-      value_and_gradient_at_quad_pts(ViewType1 u, ViewType2 grad_u);
+      values(const ViewTypeIn in, ViewTypeOut out) const;
 
       /**
-       * Helper function for integrate(). Integrate the gradients of the finite
-       * element function.
+       * Evaluate/integrate the gradient of a finite element function at the
+       * quadrature points for a given @p direction.
        */
-      template <bool add, typename ViewType1, typename ViewType2>
+      template <int  direction,
+                bool dof_to_quad,
+                bool add,
+                bool in_place,
+                typename ViewTypeIn,
+                typename ViewTypeOut>
       DEAL_II_HOST_DEVICE void
-      integrate_gradient(ViewType1 u, ViewType2 grad_u);
+      gradients(const ViewTypeIn in, ViewTypeOut out) const;
 
+    public:
       /**
-       * Helper function for integrate(). Integrate the values and the gradients
-       * of the finite element function.
+       * Evaluate the gradient of a finite element function at the quadrature
+       * points for a given @p direction for collocation methods.
        */
-      template <typename ViewType1, typename ViewType2>
+      template <int  direction,
+                bool dof_to_quad,
+                bool add,
+                bool in_place,
+                typename ViewTypeIn,
+                typename ViewTypeOut>
       DEAL_II_HOST_DEVICE void
-      integrate_value_and_gradient(ViewType1 u, ViewType2 grad_u);
+      co_gradients(const ViewTypeIn in, ViewTypeOut out) const;
 
       /**
        * TeamPolicy handle.
@@ -571,7 +573,7 @@ namespace CUDAWrappers
                            dim,
                            fe_degree,
                            n_q_points_1d,
-                           Number>::value_at_quad_pts(ViewType u)
+                           Number>::evaluate_values(ViewType u)
     {
       if constexpr (dim == 1)
         values<0, true, false, true>(u, u);
@@ -602,7 +604,7 @@ namespace CUDAWrappers
                            dim,
                            fe_degree,
                            n_q_points_1d,
-                           Number>::integrate_value(ViewType u)
+                           Number>::integrate_values(ViewType u)
     {
       if constexpr (dim == 1)
         values<0, false, false, true>(u, u);
@@ -633,8 +635,8 @@ namespace CUDAWrappers
                            dim,
                            fe_degree,
                            n_q_points_1d,
-                           Number>::gradient_at_quad_pts(const ViewTypeIn u,
-                                                         ViewTypeOut grad_u)
+                           Number>::evaluate_gradients(const ViewTypeIn u,
+                                                       ViewTypeOut      grad_u)
     {
       if constexpr (dim == 1)
         {
@@ -698,9 +700,9 @@ namespace CUDAWrappers
                            dim,
                            fe_degree,
                            n_q_points_1d,
-                           Number>::value_and_gradient_at_quad_pts(ViewType1 u,
-                                                                   ViewType2
-                                                                     grad_u)
+                           Number>::evaluate_values_and_gradients(ViewType1 u,
+                                                                  ViewType2
+                                                                    grad_u)
     {
       if constexpr (dim == 1)
         {
@@ -751,8 +753,8 @@ namespace CUDAWrappers
                            dim,
                            fe_degree,
                            n_q_points_1d,
-                           Number>::integrate_gradient(ViewType1 u,
-                                                       ViewType2 grad_u)
+                           Number>::integrate_gradients(ViewType1 u,
+                                                        ViewType2 grad_u)
     {
       if constexpr (dim == 1)
         {
@@ -829,9 +831,9 @@ namespace CUDAWrappers
                            dim,
                            fe_degree,
                            n_q_points_1d,
-                           Number>::integrate_value_and_gradient(ViewType1 u,
-                                                                 ViewType2
-                                                                   grad_u)
+                           Number>::integrate_values_and_gradients(ViewType1 u,
+                                                                   ViewType2
+                                                                     grad_u)
     {
       if constexpr (dim == 1)
         {

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.