xref: /libCEED/tests/t402-qfunction.c (revision 75affc3b27ef4afd9e0b71275e32fb85c1a00c79)
1*75affc3bSjeremylt /// @file
2*75affc3bSjeremylt /// Test viewing of qfunction
3*75affc3bSjeremylt /// \test Test viewing of qfunction
4*75affc3bSjeremylt #include <ceed.h>
5*75affc3bSjeremylt 
6*75affc3bSjeremylt #include "t400-qfunction.h"
7*75affc3bSjeremylt 
8*75affc3bSjeremylt int main(int argc, char **argv) {
9*75affc3bSjeremylt   Ceed ceed;
10*75affc3bSjeremylt   CeedQFunction qf_setup, qf_mass;
11*75affc3bSjeremylt 
12*75affc3bSjeremylt 
13*75affc3bSjeremylt   CeedInit(argv[1], &ceed);
14*75affc3bSjeremylt 
15*75affc3bSjeremylt   CeedQFunctionCreateInterior(ceed, 1, setup, setup_loc, &qf_setup);
16*75affc3bSjeremylt   CeedQFunctionAddInput(qf_setup, "w", 1, CEED_EVAL_INTERP);
17*75affc3bSjeremylt   CeedQFunctionAddOutput(qf_setup, "qdata", 1, CEED_EVAL_INTERP);
18*75affc3bSjeremylt 
19*75affc3bSjeremylt   CeedQFunctionCreateInterior(ceed, 1, mass, mass_loc, &qf_mass);
20*75affc3bSjeremylt   CeedQFunctionAddInput(qf_mass, "qdata", 1, CEED_EVAL_INTERP);
21*75affc3bSjeremylt   CeedQFunctionAddInput(qf_mass, "u", 1, CEED_EVAL_INTERP);
22*75affc3bSjeremylt   CeedQFunctionAddOutput(qf_mass, "v", 1, CEED_EVAL_INTERP);
23*75affc3bSjeremylt 
24*75affc3bSjeremylt   CeedQFunctionView(qf_setup, stdout);
25*75affc3bSjeremylt   CeedQFunctionView(qf_mass, stdout);
26*75affc3bSjeremylt 
27*75affc3bSjeremylt   CeedQFunctionDestroy(&qf_setup);
28*75affc3bSjeremylt   CeedQFunctionDestroy(&qf_mass);
29*75affc3bSjeremylt   CeedDestroy(&ceed);
30*75affc3bSjeremylt   return 0;
31*75affc3bSjeremylt }
32