14411cf47Sjeremylt /// @file
2ac5aa7bcSJeremy L Thompson /// Test creation and destruction of a H^1 Lagrange basis
3ac5aa7bcSJeremy L Thompson /// \test Test creation and destruction of a H^1 Lagrange basis
457c64913Sjeremylt #include <ceed.h>
557c64913Sjeremylt
main(int argc,char ** argv)657c64913Sjeremylt int main(int argc, char **argv) {
757c64913Sjeremylt Ceed ceed;
84fee36f0SJeremy L Thompson CeedBasis basis;
957c64913Sjeremylt
1057c64913Sjeremylt CeedInit(argv[1], &ceed);
11288c0443SJeremy L Thompson
1280a9ef05SNatalie Beams // Test skipped if using single precision
136574a04fSJeremy L Thompson if (CEED_SCALAR_TYPE == CEED_SCALAR_FP32) return CeedError(ceed, CEED_ERROR_UNSUPPORTED, "Test not implemented in single precision\n");
1480a9ef05SNatalie Beams
154fee36f0SJeremy L Thompson CeedBasisCreateTensorH1Lagrange(ceed, 1, 1, 4, 4, CEED_GAUSS_LOBATTO, &basis);
164fee36f0SJeremy L Thompson CeedBasisView(basis, stdout);
174fee36f0SJeremy L Thompson CeedBasisDestroy(&basis);
18288c0443SJeremy L Thompson
194fee36f0SJeremy L Thompson CeedBasisCreateTensorH1Lagrange(ceed, 1, 1, 4, 4, CEED_GAUSS, &basis);
204fee36f0SJeremy L Thompson CeedBasisView(basis, stdout);
21288c0443SJeremy L Thompson
22*82a9f6a5SJeremy L Thompson // Check tabs and CeedObject functionality
23*82a9f6a5SJeremy L Thompson {
24*82a9f6a5SJeremy L Thompson CeedBasis basis_copy = NULL;
25*82a9f6a5SJeremy L Thompson
26*82a9f6a5SJeremy L Thompson CeedBasisReferenceCopy(basis, &basis_copy);
27*82a9f6a5SJeremy L Thompson CeedBasisSetNumViewTabs(basis_copy, 1);
28*82a9f6a5SJeremy L Thompson CeedObjectView((CeedObject)basis_copy, stdout);
29*82a9f6a5SJeremy L Thompson CeedObjectDestroy((CeedObject *)&basis_copy);
30*82a9f6a5SJeremy L Thompson }
31*82a9f6a5SJeremy L Thompson
32*82a9f6a5SJeremy L Thompson CeedBasisDestroy(&basis);
3357c64913Sjeremylt CeedDestroy(&ceed);
3457c64913Sjeremylt return 0;
3557c64913Sjeremylt }
36