1*21617c04Sjeremylt // Copyright (c) 2017-2018, Lawrence Livermore National Security, LLC. 2*21617c04Sjeremylt // Produced at the Lawrence Livermore National Laboratory. LLNL-CODE-734707. 3*21617c04Sjeremylt // All Rights reserved. See files LICENSE and NOTICE for details. 4*21617c04Sjeremylt // 5*21617c04Sjeremylt // This file is part of CEED, a collection of benchmarks, miniapps, software 6*21617c04Sjeremylt // libraries and APIs for efficient high-order finite element and spectral 7*21617c04Sjeremylt // element discretizations for exascale applications. For more information and 8*21617c04Sjeremylt // source code availability see http://github.com/ceed. 9*21617c04Sjeremylt // 10*21617c04Sjeremylt // The CEED research is supported by the Exascale Computing Project 17-SC-20-SC, 11*21617c04Sjeremylt // a collaborative effort of two U.S. Department of Energy organizations (Office 12*21617c04Sjeremylt // of Science and the National Nuclear Security Administration) responsible for 13*21617c04Sjeremylt // the planning and preparation of a capable exascale ecosystem, including 14*21617c04Sjeremylt // software, applications, hardware, advanced system engineering and early 15*21617c04Sjeremylt // testbed platforms, in support of the nation's exascale computing imperative. 16*21617c04Sjeremylt 17*21617c04Sjeremylt #include <ceed-impl.h> 18*21617c04Sjeremylt #include <string.h> 19*21617c04Sjeremylt #include "ceed-ref.h" 20*21617c04Sjeremylt 21*21617c04Sjeremylt static int CeedQFunctionApply_Ref(CeedQFunction qf, void *qdata, CeedInt Q, 22*21617c04Sjeremylt const CeedScalar *const *u, 23*21617c04Sjeremylt CeedScalar *const *v) { 24*21617c04Sjeremylt int ierr; 25*21617c04Sjeremylt ierr = qf->function(qf->ctx, qdata, Q, u, v); CeedChk(ierr); 26*21617c04Sjeremylt return 0; 27*21617c04Sjeremylt } 28*21617c04Sjeremylt 29*21617c04Sjeremylt static int CeedQFunctionDestroy_Ref(CeedQFunction qf) { 30*21617c04Sjeremylt return 0; 31*21617c04Sjeremylt } 32*21617c04Sjeremylt 33*21617c04Sjeremylt int CeedQFunctionCreate_Ref(CeedQFunction qf) { 34*21617c04Sjeremylt qf->Apply = CeedQFunctionApply_Ref; 35*21617c04Sjeremylt qf->Destroy = CeedQFunctionDestroy_Ref; 36*21617c04Sjeremylt return 0; 37*21617c04Sjeremylt } 38