1 // SPDX-FileCopyrightText: Copyright (c) 2017-2024, HONEE contributors. 2 // SPDX-License-Identifier: Apache-2.0 OR BSD-2-Clause 3 #include <ceed/types.h> 4 5 #include "setupgeo_helpers.h" 6 7 CEED_QFUNCTION(SetupStrongBC)(void *ctx, CeedInt Q, const CeedScalar *const *in, CeedScalar *const *out) { 8 const CeedScalar(*coords)[CEED_Q_VLA] = (const CeedScalar(*)[CEED_Q_VLA])in[0]; 9 const CeedScalar(*dxdX_q)[3][CEED_Q_VLA] = (const CeedScalar(*)[3][CEED_Q_VLA])in[1]; 10 const CeedScalar(*multiplicity)[CEED_Q_VLA] = (const CeedScalar(*)[CEED_Q_VLA])in[2]; 11 CeedScalar(*coords_stored)[CEED_Q_VLA] = (CeedScalar(*)[CEED_Q_VLA])out[0]; 12 CeedScalar(*scale_stored) = out[1]; 13 CeedScalar *dXdx_q = out[2]; 14 15 CeedPragmaSIMD for (CeedInt i = 0; i < Q; i++) { 16 for (int j = 0; j < 3; j++) coords_stored[j][i] = coords[j][i]; 17 scale_stored[i] = 1.0 / multiplicity[0][i]; 18 CeedScalar dXdx[3][3]; 19 InvertMappingJacobian_3D(Q, i, dxdX_q, dXdx, NULL); 20 21 StoredValuesPack(Q, i, 0, 9, (CeedScalar *)dXdx, dXdx_q); 22 } 23 return 0; 24 } 25