/// @file /// Test creation, evaluation, and destruction for vector Poisson QFunction by name /// \test Test creation, evaluation, and destruction for vector Poisson QFunction by name #include #include #include int main(int argc, char **argv) { Ceed ceed; CeedVector in[16], out[16]; CeedVector Q_data, J, W, dU, dV; CeedQFunction qf_setup, qf_diff; CeedInt Q = 8; const CeedInt num_comp = 3; const CeedScalar *vv; CeedInit(argv[1], &ceed); for (CeedInt dim = 1; dim <= 3; dim++) { CeedInt num_qpts = CeedIntPow(Q, dim); CeedScalar j[num_qpts * dim * dim], w[num_qpts], du[num_qpts * dim * num_comp]; char name_setup[26] = "", name_apply[26] = ""; snprintf(name_setup, sizeof name_setup, "Poisson%dDBuild", dim); CeedQFunctionCreateInteriorByName(ceed, name_setup, &qf_setup); snprintf(name_apply, sizeof name_apply, "Vector3Poisson%dDApply", dim); CeedQFunctionCreateInteriorByName(ceed, name_apply, &qf_diff); for (CeedInt i=0; i 10*CEED_EPSILON) // LCOV_EXCL_START printf("%dD volume error in component %d: %f != %f\n", dim, c, sum, dim * (c + 1.0)); // LCOV_EXCL_STOP } CeedVectorRestoreArrayRead(dV, &vv); CeedVectorDestroy(&J); CeedVectorDestroy(&W); CeedVectorDestroy(&dU); CeedVectorDestroy(&dV); CeedVectorDestroy(&Q_data); CeedQFunctionDestroy(&qf_setup); CeedQFunctionDestroy(&qf_diff); } CeedDestroy(&ceed); return 0; }