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