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