1 // Copyright (c) 2017-2022, Lawrence Livermore National Security, LLC and other CEED contributors. 2 // All Rights Reserved. See the top-level LICENSE and NOTICE files for details. 3 // 4 // SPDX-License-Identifier: BSD-2-Clause 5 // 6 // This file is part of CEED: http://github.com/ceed 7 8 #include <ceed.h> 9 10 //------------------------------------------------------------------------------ 11 // Read from quadrature points 12 //------------------------------------------------------------------------------ 13 inline void readQuads(CeedInt N, CeedInt stride, CeedInt offset, const CeedScalar *src, CeedScalar *dest) { 14 for (CeedInt i = 0; i < N; ++i) dest[i] = src[stride * i + offset]; 15 } 16 17 //------------------------------------------------------------------------------ 18 // Write at quadrature points 19 //------------------------------------------------------------------------------ 20 inline void writeQuads(CeedInt N, CeedInt stride, CeedInt offset, const CeedScalar *src, CeedScalar *dest) { 21 for (CeedInt i = 0; i < N; ++i) dest[stride * i + offset] = src[i]; 22 } 23 24 //------------------------------------------------------------------------------ 25