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