1 /// @file 2 /// Test that length of BasisApply input/output vectors is incompatible with basis dimensions 3 /// \test Test that topological and geometric dimensions of basis match 4 #include <ceed.h> 5 #include <math.h> 6 7 int main(int argc, char **argv) { 8 Ceed ceed; 9 CeedBasis b; 10 CeedVector U, V; 11 CeedInt Q = 8, P = 2, ncomp = 1, dim = 3, 12 len = pow((double)(Q), dim); 13 14 CeedInit(argv[1], &ceed); 15 16 CeedVectorCreate(ceed, len, &U); 17 CeedVectorCreate(ceed, len+1, &V); 18 19 CeedBasisCreateTensorH1Lagrange(ceed, dim, ncomp, P, Q, CEED_GAUSS, &b); 20 21 // Basis apply will error because dimensions don't agree 22 CeedBasisApply(b, 1, CEED_NOTRANSPOSE, CEED_EVAL_INTERP, U, V); 23 24 // LCOV_EXCL_START 25 CeedBasisDestroy(&b); 26 CeedVectorDestroy(&U); 27 CeedVectorDestroy(&V); 28 CeedDestroy(&ceed); 29 return 0; 30 // LCOV_EXCL_STOP 31 } 32