1 /// @file 2 /// Test element restriction state counter 3 /// \test Test element restriction state counter 4 #include <ceed-backend.h> 5 6 int main(int argc, char **argv) { 7 Ceed ceed; 8 CeedInt ne = 3; 9 CeedInt ind[2*ne]; 10 const CeedInt *offsets; 11 CeedElemRestriction r; 12 13 CeedInit(argv[1], &ceed); 14 15 for (CeedInt i=0; i<ne; i++) { 16 ind[2*i+0] = i; 17 ind[2*i+1] = i+1; 18 } 19 CeedElemRestrictionCreate(ceed, ne, 2, 1, 1, ne+1, CEED_MEM_HOST, 20 CEED_USE_POINTER, ind, &r); 21 22 // Get offsets and fail to restore them 23 CeedElemRestrictionGetOffsets(r, CEED_MEM_HOST, &offsets); 24 25 CeedElemRestrictionDestroy(&r); 26 // LCOV_EXCL_START 27 CeedDestroy(&ceed); 28 // LCOV_EXCL_STOP 29 return 0; 30 } 31