1*a0154adeSJed Brown // Copyright (c) 2017-2022, Lawrence Livermore National Security, LLC and other CEED contributors. 2*a0154adeSJed Brown // All Rights Reserved. See the top-level LICENSE and NOTICE files for details. 3*a0154adeSJed Brown // 4*a0154adeSJed Brown // SPDX-License-Identifier: BSD-2-Clause 5*a0154adeSJed Brown // 6*a0154adeSJed Brown // This file is part of CEED: http://github.com/ceed 7*a0154adeSJed Brown 8*a0154adeSJed Brown /** 9*a0154adeSJed Brown @brief Ceed QFunction for building the geometric data for the 1D mass matrix 10*a0154adeSJed Brown **/ 11*a0154adeSJed Brown 12*a0154adeSJed Brown #ifndef mass1dbuild_h 13*a0154adeSJed Brown #define mass1dbuild_h 14*a0154adeSJed Brown 15*a0154adeSJed Brown CEED_QFUNCTION(Mass1DBuild)(void *ctx, const CeedInt Q, 16*a0154adeSJed Brown const CeedScalar *const *in, CeedScalar *const *out) { 17*a0154adeSJed Brown // in[0] is Jacobians, size (Q) 18*a0154adeSJed Brown // in[1] is quadrature weights, size (Q) 19*a0154adeSJed Brown const CeedScalar *J = in[0], *w = in[1]; 20*a0154adeSJed Brown // out[0] is quadrature data, size (Q) 21*a0154adeSJed Brown CeedScalar *q_data = out[0]; 22*a0154adeSJed Brown 23*a0154adeSJed Brown // Quadrature point loop 24*a0154adeSJed Brown CeedPragmaSIMD 25*a0154adeSJed Brown for (CeedInt i=0; i<Q; i++) { 26*a0154adeSJed Brown q_data[i] = J[i] * w[i]; 27*a0154adeSJed Brown } // End of Quadrature Point Loop 28*a0154adeSJed Brown 29*a0154adeSJed Brown return CEED_ERROR_SUCCESS; 30*a0154adeSJed Brown } 31*a0154adeSJed Brown 32*a0154adeSJed Brown #endif // mass1dbuild_h 33