1ae2b091fSJames Wright // SPDX-FileCopyrightText: Copyright (c) 2017-2024, HONEE contributors.
2ae2b091fSJames Wright // SPDX-License-Identifier: Apache-2.0 OR BSD-2-Clause
3*3e17a7a1SJames Wright #include <ceed/types.h>
42eb7bf1fSJames Wright
56f188493SJames Wright #include "setupgeo_helpers.h"
66f188493SJames Wright
SetupStrongBC(void * ctx,CeedInt Q,const CeedScalar * const * in,CeedScalar * const * out)72eb7bf1fSJames Wright CEED_QFUNCTION(SetupStrongBC)(void *ctx, CeedInt Q, const CeedScalar *const *in, CeedScalar *const *out) {
82eb7bf1fSJames Wright const CeedScalar(*coords)[CEED_Q_VLA] = (const CeedScalar(*)[CEED_Q_VLA])in[0];
96f188493SJames Wright const CeedScalar(*dxdX_q)[3][CEED_Q_VLA] = (const CeedScalar(*)[3][CEED_Q_VLA])in[1];
106f188493SJames Wright const CeedScalar(*multiplicity)[CEED_Q_VLA] = (const CeedScalar(*)[CEED_Q_VLA])in[2];
112eb7bf1fSJames Wright CeedScalar(*coords_stored)[CEED_Q_VLA] = (CeedScalar(*)[CEED_Q_VLA])out[0];
126f188493SJames Wright CeedScalar(*scale_stored) = out[1];
1321ba7ba4SJames Wright CeedScalar *dXdx_q = out[2];
142eb7bf1fSJames Wright
152eb7bf1fSJames Wright CeedPragmaSIMD for (CeedInt i = 0; i < Q; i++) {
162eb7bf1fSJames Wright for (int j = 0; j < 3; j++) coords_stored[j][i] = coords[j][i];
172eb7bf1fSJames Wright scale_stored[i] = 1.0 / multiplicity[0][i];
1821ba7ba4SJames Wright CeedScalar dXdx[3][3];
1921ba7ba4SJames Wright InvertMappingJacobian_3D(Q, i, dxdX_q, dXdx, NULL);
2021ba7ba4SJames Wright
2121ba7ba4SJames Wright StoredValuesPack(Q, i, 0, 9, (CeedScalar *)dXdx, dXdx_q);
222eb7bf1fSJames Wright }
232eb7bf1fSJames Wright return 0;
242eb7bf1fSJames Wright }
25