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_HCURL_MASS_BUILD_21_QF_H
5 : #define PALACE_LIBCEED_HCURL_MASS_BUILD_21_QF_H
6 :
7 : #include "../coeff/coeff_1_qf.h"
8 : #include "../coeff/coeff_2_qf.h"
9 : #include "utils_21_qf.h"
10 :
11 0 : CEED_QFUNCTION(f_build_hcurlmass_21)(void *__restrict__ ctx, CeedInt Q,
12 : const CeedScalar *const *in, CeedScalar *const *out)
13 : {
14 0 : const CeedScalar *attr = in[0], *wdetJ = in[0] + Q, *adjJt = in[0] + 2 * Q;
15 0 : CeedScalar *__restrict__ qd1 = out[0], *__restrict__ qd2 = out[0] + Q;
16 :
17 0 : CeedPragmaSIMD for (CeedInt i = 0; i < Q; i++)
18 : {
19 : {
20 0 : const CeedScalar coeff = CoeffUnpack1((const CeedIntScalar *)ctx, (CeedInt)attr[i]);
21 :
22 0 : qd1[i + Q * 0] = coeff * wdetJ[i];
23 : }
24 : {
25 : CeedScalar coeff[4], adjJt_loc[2], qd_loc[1];
26 0 : CoeffUnpack2(CoeffPairSecond<1>((const CeedIntScalar *)ctx), (CeedInt)attr[i], coeff);
27 0 : MatUnpack21(adjJt + i, Q, adjJt_loc);
28 : MultAtBA21(adjJt_loc, coeff, qd_loc);
29 :
30 0 : qd2[i + Q * 0] = wdetJ[i] * qd_loc[0];
31 : }
32 : }
33 0 : return 0;
34 : }
35 :
36 : #endif // PALACE_LIBCEED_HCURL_MASS_BUILD_21_QF_H
|