// This is utility code for UFLACS unit tests. // This code is released into the public domain. // // The FEniCS Project (http://www.fenicsproject.org/) 2006-2012. #ifndef __MOCK_CELLS_H #define __MOCK_CELLS_H #include //namespace uflacs //{ struct mock_cell { // These coordinates are all that generated code should care // about, the rest is to support the tests double coordinate_dofs[8*3]; // Worst case hexahedron: 8 vertices in 3d // Dimensions needed for generic cell transformations size_t geometric_dimension; size_t topological_dimension; size_t num_vertices; // Constructor just clears everything to zero mock_cell() { init_dimensions(0,0,0); } // Utility initialization function void init_dimensions(size_t geometric_dimension, size_t topological_dimension, size_t num_vertices) { this->geometric_dimension = geometric_dimension; this->topological_dimension = topological_dimension; this->num_vertices = num_vertices; int n = int(sizeof(coordinate_dofs) / sizeof(coordinate_dofs[0])); for (int i=0; i