xref: /libCEED/tests/t300-basis.c (revision 6574a04ff2135c3834f1b6ef9a4ec7566c4782db)
14411cf47Sjeremylt /// @file
24fee36f0SJeremy L Thompson /// Test creation and destruction of a H1Lagrange basis
34fee36f0SJeremy L Thompson /// \test Test creation and destruction of a H1Lagrange basis
457c64913Sjeremylt #include <ceed.h>
557c64913Sjeremylt 
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
13*6574a04fSJeremy 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);
214fee36f0SJeremy L Thompson   CeedBasisDestroy(&basis);
22288c0443SJeremy L Thompson 
2357c64913Sjeremylt   CeedDestroy(&ceed);
2457c64913Sjeremylt   return 0;
2557c64913Sjeremylt }
26