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 applying the 1D Poisson operator 10*a0154adeSJed Brown **/ 11*a0154adeSJed Brown 12*a0154adeSJed Brown #ifndef poisson1dapply_h 13*a0154adeSJed Brown #define poisson1dapply_h 14*a0154adeSJed Brown 15*a0154adeSJed Brown CEED_QFUNCTION(Poisson1DApply)(void *ctx, const CeedInt Q, 16*a0154adeSJed Brown const CeedScalar *const *in, 17*a0154adeSJed Brown CeedScalar *const *out) { 18*a0154adeSJed Brown // in[0] is gradient u, size (Q) 19*a0154adeSJed Brown // in[1] is quadrature data, size (Q) 20*a0154adeSJed Brown const CeedScalar *ug = in[0], *q_data = in[1]; 21*a0154adeSJed Brown 22*a0154adeSJed Brown // out[0] is output to multiply against gradient v, size (Q) 23*a0154adeSJed Brown CeedScalar *vg = out[0]; 24*a0154adeSJed Brown 25*a0154adeSJed Brown // Quadrature point loop 26*a0154adeSJed Brown CeedPragmaSIMD 27*a0154adeSJed Brown for (CeedInt i=0; i<Q; i++) { 28*a0154adeSJed Brown vg[i] = ug[i] * q_data[i]; 29*a0154adeSJed Brown } // End of Quadrature Point Loop 30*a0154adeSJed Brown 31*a0154adeSJed Brown return CEED_ERROR_SUCCESS; 32*a0154adeSJed Brown } 33*a0154adeSJed Brown 34*a0154adeSJed Brown #endif // poisson1dapply_h 35