/// @file /// Test creation, action, and destruction for mass matrix operator /// \test Test creation, action, and destruction for mass matrix operator #include #include #include #include "t320-basis.h" #include "t510-operator.h" /* The mesh comprises of two rows of 3 quadralaterals followed by one row of 6 triangles: _ _ _ |_|_|_| |_|_|_| |/|/|/| */ int main(int argc, char **argv) { Ceed ceed; CeedElemRestriction ErestrictxTet, ErestrictuTet, ErestrictuiTet, ErestrictxHex, ErestrictuHex, ErestrictuiHex; CeedBasis bxTet, buTet, bxHex, buHex; CeedQFunction qf_setupTet, qf_massTet, qf_setupHex, qf_massHex; CeedOperator op_setupTet, op_massTet, op_setupHex, op_massHex, op_setup, op_mass; CeedVector qdataTet, qdataHex, X; CeedInt nelemTet = 6, PTet = 6, QTet = 4, nelemHex = 6, PHex = 3, QHex = 4, dim = 2; CeedInt nx = 3, ny = 3, nxTet = 3, nyTet = 1, nxHex = 3; CeedInt row, col, offset; CeedInt ndofs = (nx*2+1)*(ny*2+1), nqptsTet = nelemTet*QTet, nqptsHex = nelemHex*QHex*QHex; CeedInt indxTet[nelemTet*PTet], indxHex[nelemHex*PHex*PHex]; CeedScalar qref[dim*QTet], qweight[QTet]; CeedScalar interp[PTet*QTet], grad[dim*PTet*QTet]; CeedInit(argv[1], &ceed); // DoF Coordinates CeedVectorCreate(ceed, dim*ndofs, &X); // Qdata Vectors CeedVectorCreate(ceed, nqptsTet, &qdataTet); CeedVectorCreate(ceed, nqptsHex, &qdataHex); // Set up Tet Elements for (CeedInt i=0; i