/// @file /// Test creation, use, and destruction of a blocked element restriction /// \test Test creation, use, and destruction of a blocked element restriction #include #include int main(int argc, char **argv) { Ceed ceed; CeedVector x, y; CeedInt num_elem = 8; CeedInt elem_size = 2; CeedInt num_blk = 2; CeedInt blk_size = 5; CeedInt ind[elem_size*num_elem]; CeedScalar a[num_elem + 1]; const CeedScalar *xx, *yy; CeedInt layout[3]; CeedElemRestriction r; CeedInit(argv[1], &ceed); CeedVectorCreate(ceed, num_elem+1, &x); for (CeedInt i=0; i 0 && i < num_elem ? 2.0 : 1.0)) // LCOV_EXCL_START printf("Error in restricted array x[%" CeedInt_FMT "] = %f\n", i, (double)xx[i]); // LCOV_EXCL_STOP CeedVectorRestoreArrayRead(x, &xx); CeedVectorDestroy(&x); CeedVectorDestroy(&y); CeedElemRestrictionDestroy(&r); CeedDestroy(&ceed); return 0; }