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_1_QF_H
5 : #define PALACE_LIBCEED_L2_1_QF_H
6 :
7 : #include "../coeff/coeff_1_qf.h"
8 :
9 16759 : CEED_QFUNCTION(f_apply_l2_1)(void *__restrict__ ctx, CeedInt Q, const CeedScalar *const *in,
10 : CeedScalar *const *out)
11 : {
12 16759 : const CeedScalar *attr = in[0], *wdetJ = in[0] + Q, *qw = in[1], *u = in[2];
13 16759 : CeedScalar *v = out[0];
14 :
15 819687 : CeedPragmaSIMD for (CeedInt i = 0; i < Q; i++)
16 : {
17 802928 : const CeedScalar coeff = CoeffUnpack1((const CeedIntScalar *)ctx, (CeedInt)attr[i]);
18 :
19 802928 : v[i] = (coeff * qw[i] * qw[i] / wdetJ[i]) * u[i];
20 : }
21 16759 : return 0;
22 : }
23 :
24 : #endif // PALACE_LIBCEED_L2_1_QF_H
|