/// @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 #include "t310-basis.h" /* The mesh comprises of two rows of 3 quadralaterals followed by one row of 6 triangles: _ _ _ |_|_|_| |_|_|_| |/|/|/| */ static int setup(void *ctx, CeedInt Q, const CeedScalar *const *in, CeedScalar *const *out) { const CeedScalar *weight = in[0], *J = in[1]; CeedScalar *rho = out[0]; for (CeedInt i=0; i1e-10) printf("Computed Area: %f != True Area: 1.0\n", sum); CeedVectorRestoreArrayRead(V, &hv); // Cleanup CeedQFunctionDestroy(&qf_setupTet); CeedQFunctionDestroy(&qf_massTet); CeedOperatorDestroy(&op_setupTet); CeedOperatorDestroy(&op_massTet); CeedQFunctionDestroy(&qf_setupHex); CeedQFunctionDestroy(&qf_massHex); CeedOperatorDestroy(&op_setupHex); CeedOperatorDestroy(&op_massHex); CeedOperatorDestroy(&op_setup); CeedOperatorDestroy(&op_mass); CeedElemRestrictionDestroy(&ErestrictuTet); CeedElemRestrictionDestroy(&ErestrictxTet); CeedElemRestrictionDestroy(&ErestrictuiTet); CeedElemRestrictionDestroy(&ErestrictxiTet); CeedElemRestrictionDestroy(&ErestrictuHex); CeedElemRestrictionDestroy(&ErestrictxHex); CeedElemRestrictionDestroy(&ErestrictuiHex); CeedElemRestrictionDestroy(&ErestrictxiHex); CeedBasisDestroy(&buTet); CeedBasisDestroy(&bxTet); CeedBasisDestroy(&buHex); CeedBasisDestroy(&bxHex); CeedVectorDestroy(&X); CeedVectorDestroy(&U); CeedVectorDestroy(&V); CeedVectorDestroy(&qdataTet); CeedVectorDestroy(&qdataHex); CeedDestroy(&ceed); return 0; }