xref: /libCEED/tests/t310-basis.c (revision a8de75f0ba69dfecd93c7d0093c041c0285ffd21)
1*a8de75f0Sjeremylt /// @file
2*a8de75f0Sjeremylt /// Test creation and distruction of a 2D Simplex non-tensor H1 basis
3*a8de75f0Sjeremylt /// \test Test creation and distruction of a 2D Simplex non-tensor H1 basis
4*a8de75f0Sjeremylt #include <ceed.h>
5*a8de75f0Sjeremylt #include "t310-basis.h"
6*a8de75f0Sjeremylt 
7*a8de75f0Sjeremylt int main(int argc, char **argv) {
8*a8de75f0Sjeremylt   Ceed ceed;
9*a8de75f0Sjeremylt   const CeedInt P = 6, Q = 4, dim = 2;
10*a8de75f0Sjeremylt   CeedBasis b;
11*a8de75f0Sjeremylt   CeedScalar qref[dim*Q], qweight[Q];
12*a8de75f0Sjeremylt   CeedScalar interp[P*Q], grad[dim*P*Q];
13*a8de75f0Sjeremylt 
14*a8de75f0Sjeremylt   buildmats(qref, qweight, interp, grad);
15*a8de75f0Sjeremylt 
16*a8de75f0Sjeremylt   CeedInit(argv[1], &ceed);
17*a8de75f0Sjeremylt   CeedBasisCreateH1(ceed, CEED_TRIANGLE, 1, P, Q, interp, grad, qref, qweight,
18*a8de75f0Sjeremylt                     &b);
19*a8de75f0Sjeremylt   CeedBasisView(b, stdout);
20*a8de75f0Sjeremylt 
21*a8de75f0Sjeremylt   CeedBasisDestroy(&b);
22*a8de75f0Sjeremylt   CeedDestroy(&ceed);
23*a8de75f0Sjeremylt   return 0;
24*a8de75f0Sjeremylt }
25