1 // Copyright (c) 2017-2024, Lawrence Livermore National Security, LLC and other CEED contributors. 2 // All Rights Reserved. See the top-level LICENSE and NOTICE files for details. 3 // 4 // SPDX-License-Identifier: BSD-2-Clause 5 // 6 // This file is part of CEED: http://github.com/ceed 7 #include <ceed.h> 8 9 #include "setupgeo_helpers.h" 10 11 CEED_QFUNCTION(SetupStrongBC)(void *ctx, CeedInt Q, const CeedScalar *const *in, CeedScalar *const *out) { 12 const CeedScalar(*coords)[CEED_Q_VLA] = (const CeedScalar(*)[CEED_Q_VLA])in[0]; 13 const CeedScalar(*dxdX_q)[3][CEED_Q_VLA] = (const CeedScalar(*)[3][CEED_Q_VLA])in[1]; 14 const CeedScalar(*multiplicity)[CEED_Q_VLA] = (const CeedScalar(*)[CEED_Q_VLA])in[2]; 15 CeedScalar(*coords_stored)[CEED_Q_VLA] = (CeedScalar(*)[CEED_Q_VLA])out[0]; 16 CeedScalar(*scale_stored) = out[1]; 17 CeedScalar *dXdx_q = out[2]; 18 19 CeedPragmaSIMD for (CeedInt i = 0; i < Q; i++) { 20 for (int j = 0; j < 3; j++) coords_stored[j][i] = coords[j][i]; 21 scale_stored[i] = 1.0 / multiplicity[0][i]; 22 CeedScalar dXdx[3][3]; 23 InvertMappingJacobian_3D(Q, i, dxdX_q, dXdx, NULL); 24 25 StoredValuesPack(Q, i, 0, 9, (CeedScalar *)dXdx, dXdx_q); 26 } 27 return 0; 28 } 29