1 // Copyright (c) 2017-2022, 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 8 #ifndef strong_boundary_conditions_h 9 #define strong_boundary_conditions_h 10 11 #include <ceed.h> 12 13 CEED_QFUNCTION(SetupStrongBC)(void *ctx, CeedInt Q, const CeedScalar *const *in, CeedScalar *const *out) { 14 // Inputs 15 const CeedScalar(*coords)[CEED_Q_VLA] = (const CeedScalar(*)[CEED_Q_VLA])in[0]; 16 const CeedScalar(*multiplicity)[CEED_Q_VLA] = (const CeedScalar(*)[CEED_Q_VLA])in[1]; 17 18 // Outputs 19 CeedScalar(*coords_stored)[CEED_Q_VLA] = (CeedScalar(*)[CEED_Q_VLA])out[0]; 20 CeedScalar(*scale_stored) = (CeedScalar(*))out[1]; 21 22 CeedPragmaSIMD for (CeedInt i = 0; i < Q; i++) { 23 for (int j = 0; j < 3; j++) coords_stored[j][i] = coords[j][i]; 24 scale_stored[i] = 1.0 / multiplicity[0][i]; 25 } 26 return 0; 27 } 28 29 #endif // strong_boundary_conditions_h 30