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