1 /// @file 2 /// Test creation and destruction of a 2D Quad non-tensor Hdiv basis 3 /// \test Test creation and destruction of a 2D Quad non-tensor Hdiv basis 4 #include "t330-basis.h" 5 6 #include <ceed.h> 7 8 int main(int argc, char **argv) { 9 Ceed ceed; 10 const CeedInt q = 3, dim = 2, num_qpts = q * q, elem_nodes = 4; 11 CeedInt num_comp = 1; 12 CeedInt p = dim * elem_nodes; // DoF per element, DoF are vector in H(div) 13 CeedBasis basis; 14 CeedScalar q_ref[dim * num_qpts], q_weights[num_qpts]; 15 CeedScalar interp[dim * p * num_qpts], div[p * num_qpts]; 16 17 CeedInit(argv[1], &ceed); 18 19 // Test skipped if using single precision 20 if (CEED_SCALAR_TYPE == CEED_SCALAR_FP32) 21 // LCOV_EXCL_START 22 return CeedError(ceed, CEED_ERROR_UNSUPPORTED, "Test not implemented in single precision"); 23 // LCOV_EXCL_STOP 24 25 BuildHdivQuadrilateral(q, q_ref, q_weights, interp, div, CEED_GAUSS); 26 CeedBasisCreateHdiv(ceed, CEED_TOPOLOGY_QUAD, num_comp, p, num_qpts, interp, div, q_ref, q_weights, &basis); 27 // interp[0]--.interp[num_qpts-1] ==> basis in x-direction 28 // interp[num_qpts]--.interp[dim*num_qpts-1] ==> basis in y-direction 29 CeedBasisView(basis, stdout); 30 31 CeedBasisDestroy(&basis); 32 CeedDestroy(&ceed); 33 return 0; 34 } 35