LCOV - code coverage report
Current view: top level - fem/qfunctions/33 - l2mass_33_qf.h (source / functions) Coverage Total Hit
Test: Palace Coverage Report Lines: 100.0 % 14 14
Test Date: 2025-10-23 22:45:05 Functions: 100.0 % 1 1
Legend: Lines: hit not hit

            Line data    Source code
       1              : // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
       2              : // SPDX-License-Identifier: Apache-2.0
       3              : 
       4              : #ifndef PALACE_LIBCEED_L2_MASS_33_QF_H
       5              : #define PALACE_LIBCEED_L2_MASS_33_QF_H
       6              : 
       7              : #include "../coeff/coeff_1_qf.h"
       8              : #include "../coeff/coeff_3_qf.h"
       9              : #include "utils_33_qf.h"
      10              : 
      11           88 : CEED_QFUNCTION(f_apply_l2mass_33)(void *__restrict__ ctx, CeedInt Q,
      12              :                                   const CeedScalar *const *in, CeedScalar *const *out)
      13              : {
      14           88 :   const CeedScalar *attr = in[0], *wdetJ = in[0] + Q, *adjJt = in[0] + 2 * Q, *qw = in[1],
      15           88 :                    *u = in[2], *divu = in[3];
      16           88 :   CeedScalar *__restrict__ v = out[0], *__restrict__ divv = out[1];
      17              : 
      18        46104 :   CeedPragmaSIMD for (CeedInt i = 0; i < Q; i++)
      19              :   {
      20              :     {
      21        46016 :       const CeedScalar u_loc[3] = {u[i + Q * 0], u[i + Q * 1], u[i + Q * 2]};
      22              :       CeedScalar coeff[9], adjJt_loc[9], J_loc[9], v_loc[3];
      23        46016 :       CoeffUnpack3((const CeedIntScalar *)ctx, (CeedInt)attr[i], coeff);
      24        46016 :       MatUnpack33(adjJt + i, Q, adjJt_loc);
      25              :       AdjJt33(adjJt_loc, J_loc);
      26              :       MultAtBCx33(J_loc, coeff, J_loc, u_loc, v_loc);
      27              : 
      28        46016 :       v[i + Q * 0] = wdetJ[i] * v_loc[0];
      29        46016 :       v[i + Q * 1] = wdetJ[i] * v_loc[1];
      30        46016 :       v[i + Q * 2] = wdetJ[i] * v_loc[2];
      31              :     }
      32              :     {
      33              :       const CeedScalar coeff =
      34        46016 :           CoeffUnpack1(CoeffPairSecond<3>((const CeedIntScalar *)ctx), (CeedInt)attr[i]);
      35              : 
      36        46016 :       divv[i] = (coeff * qw[i] * qw[i] / wdetJ[i]) * divu[i];
      37              :     }
      38              :   }
      39           88 :   return 0;
      40              : }
      41              : 
      42              : #endif  // PALACE_LIBCEED_L2_MASS_33_QF_H
        

Generated by: LCOV version 2.0-1