xref: /libCEED/tests/t306-basis.c (revision 4fee36f0a30516a0b5ad51bf7eb3b32d83efd623)
1144df584Sjeremylt /// @file
2144df584Sjeremylt /// Test GetNumNodes and GetNumQuadraturePoints for basis
3144df584Sjeremylt /// \test Test GetNumNodes and GetNumQuadraturePoints for basis
4144df584Sjeremylt #include <ceed.h>
5144df584Sjeremylt 
6144df584Sjeremylt int main(int argc, char **argv) {
7144df584Sjeremylt   Ceed      ceed;
8*4fee36f0SJeremy L Thompson   CeedBasis basis;
9*4fee36f0SJeremy L Thompson   CeedInt   p, q;
10144df584Sjeremylt 
11144df584Sjeremylt   CeedInit(argv[1], &ceed);
12144df584Sjeremylt 
13*4fee36f0SJeremy L Thompson   CeedBasisCreateTensorH1Lagrange(ceed, 3, 1, 4, 5, CEED_GAUSS_LOBATTO, &basis);
14144df584Sjeremylt 
15*4fee36f0SJeremy L Thompson   CeedBasisGetNumNodes(basis, &p);
16*4fee36f0SJeremy L Thompson   CeedBasisGetNumQuadraturePoints(basis, &q);
17144df584Sjeremylt 
18*4fee36f0SJeremy L Thompson   if (p != 64) printf("%" CeedInt_FMT " != 64\n", p);
19*4fee36f0SJeremy L Thompson   if (q != 125) printf("%" CeedInt_FMT " != 125\n", q);
20144df584Sjeremylt 
21*4fee36f0SJeremy L Thompson   CeedBasisDestroy(&basis);
22144df584Sjeremylt   CeedDestroy(&ceed);
23144df584Sjeremylt   return 0;
24144df584Sjeremylt }
25