/// @file /// Test creation, use, and destruction of a blocked element restriction with multiple components in the lvector, and libCEED owns ind pointer /// \test Test creation, use, and destruction of a blocked element restriction with multiple components in the lvector, and libCEED owns ind pointer #include #include int main(int argc, char **argv) { Ceed ceed; CeedVector x, y; CeedInt num_elem = 8; CeedInt blk_size = 5; CeedInt num_comp = 3; CeedInt *ind = malloc(sizeof(CeedInt)*2*num_elem); CeedScalar a[num_comp*(num_elem+1)]; CeedElemRestriction r; CeedInit(argv[1], &ceed); CeedVectorCreate(ceed, (num_elem+1)*num_comp, &x); for (CeedInt i=0; i<(num_elem+1); i++) { a[i+0*(num_elem+1)] = 10 + i; a[i+1*(num_elem+1)] = 20 + i; a[i+2*(num_elem+1)] = 30 + i; } CeedVectorSetArray(x, CEED_MEM_HOST, CEED_USE_POINTER, a); CeedVectorView(x, "%12.8f", stdout); for (CeedInt i=0; i