1 /// @file 2 /// Test creation and destruction of a H^1 Lagrange basis 3 /// \test Test creation and destruction of a H^1 Lagrange basis 4 #include <ceed.h> 5 6 int main(int argc, char **argv) { 7 Ceed ceed; 8 CeedBasis basis; 9 10 CeedInit(argv[1], &ceed); 11 12 // Test skipped if using single precision 13 if (CEED_SCALAR_TYPE == CEED_SCALAR_FP32) return CeedError(ceed, CEED_ERROR_UNSUPPORTED, "Test not implemented in single precision\n"); 14 15 CeedBasisCreateTensorH1Lagrange(ceed, 1, 1, 4, 4, CEED_GAUSS_LOBATTO, &basis); 16 CeedBasisView(basis, stdout); 17 CeedBasisDestroy(&basis); 18 19 CeedBasisCreateTensorH1Lagrange(ceed, 1, 1, 4, 4, CEED_GAUSS, &basis); 20 CeedBasisView(basis, stdout); 21 22 // Check tabs and CeedObject functionality 23 { 24 CeedBasis basis_copy = NULL; 25 26 CeedBasisReferenceCopy(basis, &basis_copy); 27 CeedBasisSetNumViewTabs(basis_copy, 1); 28 CeedObjectView((CeedObject)basis_copy, stdout); 29 CeedObjectDestroy((CeedObject *)&basis_copy); 30 } 31 32 CeedBasisDestroy(&basis); 33 CeedDestroy(&ceed); 34 return 0; 35 } 36