1 /// @file 2 /// Test creation and destruction of a 2D Simplex non-tensor H1 basis 3 /// \test Test creation and distruction of a 2D Simplex non-tensor H1 basis 4 #include <ceed.h> 5 #include "t320-basis.h" 6 7 int main(int argc, char **argv) { 8 Ceed ceed; 9 const CeedInt P = 6, Q = 4, dim = 2; 10 CeedBasis b; 11 CeedScalar q_ref[dim*Q], q_weight[Q]; 12 CeedScalar interp[P*Q], grad[dim*P*Q]; 13 14 CeedInit(argv[1], &ceed); 15 16 // Test skipped if using single precision 17 if (CEED_SCALAR_TYPE == CEED_SCALAR_FP32) { 18 return CeedError(ceed, CEED_ERROR_UNSUPPORTED, 19 "Test not implemented in single precision"); 20 } 21 22 buildmats(q_ref, q_weight, interp, grad); 23 24 CeedBasisCreateH1(ceed, CEED_TRIANGLE, 1, P, Q, interp, grad, q_ref, 25 q_weight, &b); 26 CeedBasisView(b, stdout); 27 28 CeedBasisDestroy(&b); 29 CeedDestroy(&ceed); 30 return 0; 31 } 32