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