1*3f919cbcSJeremy L Thompson // Copyright (c) 2017-2024, Lawrence Livermore National Security, LLC and other CEED contributors. 2*3f919cbcSJeremy L Thompson // All Rights Reserved. See the top-level LICENSE and NOTICE files for details. 3*3f919cbcSJeremy L Thompson // 4*3f919cbcSJeremy L Thompson // SPDX-License-Identifier: BSD-2-Clause 5*3f919cbcSJeremy L Thompson // 6*3f919cbcSJeremy L Thompson // This file is part of CEED: http://github.com/ceed 7*3f919cbcSJeremy L Thompson 8*3f919cbcSJeremy L Thompson #include <ceed/types.h> 9*3f919cbcSJeremy L Thompson 10*3f919cbcSJeremy L Thompson CEED_QFUNCTION(mass)(void *ctx, const CeedInt Q, const CeedScalar *const *in, CeedScalar *const *out) { 11*3f919cbcSJeremy L Thompson const CeedScalar *u = in[0], *rho = in[1]; 12*3f919cbcSJeremy L Thompson CeedScalar *v = out[0]; 13*3f919cbcSJeremy L Thompson 14*3f919cbcSJeremy L Thompson // Quadrature point loop 15*3f919cbcSJeremy L Thompson CeedPragmaSIMD for (CeedInt i = 0; i < Q; i++) { v[i] = rho[i] * u[i]; } 16*3f919cbcSJeremy L Thompson return 0; 17*3f919cbcSJeremy L Thompson } 18