/// @file /// Test creation creation, action, and destruction for mass matrix operator /// \test Test creation creation, action, and destruction for mass matrix operator #include #include #include static int setup(void *ctx, CeedInt Q, const CeedScalar *const *in, CeedScalar *const *out) { const CeedScalar *weight = in[0], *dxdX = in[1]; CeedScalar *rho = out[0]; for (CeedInt i=0; i1e-10) printf("Computed Area: %f != True Area: 1.0\n", sum1); if (fabs(sum2-2.)>1e-10) printf("Computed Area: %f != True Area: 2.0\n", sum2); CeedVectorRestoreArrayRead(V, &hv); CeedQFunctionDestroy(&qf_setup); CeedQFunctionDestroy(&qf_mass); CeedOperatorDestroy(&op_setup); CeedOperatorDestroy(&op_mass); CeedElemRestrictionDestroy(&Erestrictu); CeedElemRestrictionDestroy(&Erestrictx); CeedElemRestrictionDestroy(&Erestrictui); CeedElemRestrictionDestroy(&Erestrictxi); CeedBasisDestroy(&bu); CeedBasisDestroy(&bx); CeedVectorDestroy(&X); CeedVectorDestroy(&U); CeedVectorDestroy(&V); CeedVectorDestroy(&qdata); CeedDestroy(&ceed); return 0; }