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