9#include <kernel/shape.hpp> 
   18      template<
typename Shape_>
 
   22      struct OtherShape<Shape::Vertex>
 
   24        typedef Shape::Vertex 
Type;
 
   28      struct OtherShape<Shape::Simplex<dim_> >
 
   30        typedef Shape::Hypercube<dim_> 
Type;
 
   34      struct OtherShape<Shape::Hypercube<dim_> >
 
   36        typedef Shape::Simplex<dim_> 
Type;
 
   42      struct ShapeConvertTraits;
 
   49      template<
int face_dim_>
 
   50      struct ShapeConvertTraits<Shape::Vertex, face_dim_>
 
   53        static_assert(face_dim_ == 0, 
"invalid face dimension");
 
   56        typedef Shape::Vertex ShapeType;
 
   59        static constexpr int cell_dim = ShapeType::dimension; 
 
   62        static constexpr int face_dim = face_dim_; 
 
   65        static constexpr int count = 1;
 
   68        static inline String name()
 
   70          return "ShapeConvertTraits<Vertex," + 
stringify(face_dim_) + 
">";
 
   80      struct ShapeConvertTraits<Shape::Hypercube<1>, 0>
 
   83        typedef Shape::Hypercube<1> ShapeType;
 
   85        typedef Shape::Vertex FaceType;
 
   87        static constexpr int cell_dim = 1;
 
   89        static constexpr int face_dim = 0;
 
   91        static constexpr int count = 0;
 
   94        static inline String name()
 
   96          return "ShapeConvertTraits<Hypercube<1>,0>";
 
  106      struct ShapeConvertTraits<Shape::Hypercube<1>, 1>
 
  109        typedef Shape::Hypercube<1> ShapeType;
 
  111        typedef Shape::Simplex<1> FaceType;
 
  113        static constexpr int cell_dim = 1;
 
  115        static constexpr int face_dim = 1;
 
  117        static constexpr int count = 1;
 
  120        static inline String name()
 
  122          return "ShapeConvertTraits<Hypercube<1>,1>";
 
  132      struct ShapeConvertTraits<Shape::Hypercube<2>, 0>
 
  135        typedef Shape::Hypercube<2> ShapeType;
 
  137        typedef Shape::Vertex FaceType;
 
  139        static constexpr int cell_dim = 2;
 
  141        static constexpr int face_dim = 0;
 
  143        static constexpr int count = 1;
 
  146        static inline String name()
 
  148          return "ShapeConvertTraits<Hypercube<2>,0>";
 
  158      struct ShapeConvertTraits<Shape::Hypercube<2>, 1>
 
  161        typedef Shape::Hypercube<2> ShapeType;
 
  163        typedef Shape::Simplex<1> FaceType;
 
  165        static constexpr int cell_dim = 2;
 
  167        static constexpr int face_dim = 1;
 
  169        static constexpr int count = 4;
 
  172        static inline String name()
 
  174          return "ShapeConvertTraits<Hypercube<2>,1>";
 
  184      struct ShapeConvertTraits<Shape::Hypercube<2>, 2>
 
  187        typedef Shape::Hypercube<2> ShapeType;
 
  189        typedef Shape::Simplex<2> FaceType;
 
  191        static constexpr int cell_dim = 2;
 
  193        static constexpr int face_dim = 2;
 
  195        static constexpr int count = 4;
 
  198        static inline String name()
 
  200          return "ShapeConvertTraits<Hypercube<2>,2>";
 
  210      struct ShapeConvertTraits<Shape::Hypercube<3>, 0>
 
  213        typedef Shape::Hypercube<3> ShapeType;
 
  215        typedef Shape::Vertex FaceType;
 
  217        static constexpr int cell_dim = 3;
 
  219        static constexpr int face_dim = 0;
 
  221        static constexpr int count = 1;
 
  224        static inline String name()
 
  226          return "ShapeConvertTraits<Hypercube<3>,0>";
 
  236      struct ShapeConvertTraits<Shape::Hypercube<3>, 1>
 
  239        typedef Shape::Hypercube<3> ShapeType;
 
  241        typedef Shape::Simplex<1> FaceType;
 
  243        static constexpr int cell_dim = 3;
 
  245        static constexpr int face_dim = 1;
 
  247        static constexpr int count = 14;
 
  250        static inline String name()
 
  252          return "ShapeConvertTraits<Hypercube<3>,1>";
 
  262      struct ShapeConvertTraits<Shape::Hypercube<3>, 2>
 
  265        typedef Shape::Hypercube<3> ShapeType;
 
  267        typedef Shape::Simplex<2> FaceType;
 
  269        static constexpr int cell_dim = 3;
 
  271        static constexpr int face_dim = 2;
 
  273        static constexpr int count = 36;
 
  276        static inline String name()
 
  278          return "ShapeConvertTraits<Hypercube<3>,2>";
 
  288      struct ShapeConvertTraits<Shape::Hypercube<3>, 3>
 
  291        typedef Shape::Hypercube<3> ShapeType;
 
  293        typedef Shape::Simplex<3> FaceType;
 
  295        static constexpr int cell_dim = 3;
 
  297        static constexpr int face_dim = 3;
 
  299        static constexpr int count = 24;
 
  302        static inline String name()
 
  304          return "ShapeConvertTraits<Hypercube<3>,3>";
 
  318      struct ShapeConvertTraits<Shape::Simplex<1>, 0>
 
  321        typedef Shape::Simplex<1> ShapeType;
 
  323        typedef Shape::Vertex FaceType;
 
  325        static constexpr int cell_dim = 1;
 
  327        static constexpr int face_dim = 0;
 
  329        static constexpr int count = 1;
 
  332        static inline String name()
 
  334          return "ShapeConvertTraits<Simplex<1>,0>";
 
  344      struct ShapeConvertTraits<Shape::Simplex<1>, 1>
 
  347        typedef Shape::Simplex<1> ShapeType;
 
  349        typedef Shape::Hypercube<1> FaceType;
 
  351        static constexpr int cell_dim = 1;
 
  353        static constexpr int face_dim = 1;
 
  355        static constexpr int count = 2;
 
  358        static inline String name()
 
  360          return "ShapeConvertTraits<Simplex<1>,1>";
 
  370      struct ShapeConvertTraits<Shape::Simplex<2>, 0>
 
  373        typedef Shape::Simplex<2> ShapeType;
 
  375        typedef Shape::Vertex FaceType;
 
  377        static constexpr int cell_dim = 2;
 
  379        static constexpr int face_dim = 0;
 
  381        static constexpr int count = 1;
 
  384        static inline String name()
 
  386          return "ShapeConvertTraits<Simplex<2>,0>";
 
  396      struct ShapeConvertTraits<Shape::Simplex<2>, 1>
 
  399        typedef Shape::Simplex<2> ShapeType;
 
  401        typedef Shape::Hypercube<1> FaceType;
 
  403        static constexpr int cell_dim = 2;
 
  405        static constexpr int face_dim = 1;
 
  407        static constexpr int count = 3;
 
  410        static inline String name()
 
  412          return "ShapeConvertTraits<Simplex<2>,1>";
 
  422      struct ShapeConvertTraits<Shape::Simplex<2>, 2>
 
  425        typedef Shape::Simplex<2> ShapeType;
 
  427        typedef Shape::Hypercube<2> FaceType;
 
  429        static constexpr int cell_dim = 2;
 
  431        static constexpr int face_dim = 2;
 
  433        static constexpr int count = 3;
 
  436        static inline String name()
 
  438          return "ShapeConvertTraits<Simplex<2>,2>";
 
  448      struct ShapeConvertTraits<Shape::Simplex<3>, 0>
 
  451        typedef Shape::Simplex<3> ShapeType;
 
  453        typedef Shape::Vertex FaceType;
 
  455        static constexpr int cell_dim = 3;
 
  457        static constexpr int face_dim = 0;
 
  459        static constexpr int count = 1;
 
  462        static inline String name()
 
  464          return "ShapeConvertTraits<Simplex<3>,0>";
 
  474      struct ShapeConvertTraits<Shape::Simplex<3>, 1>
 
  477        typedef Shape::Simplex<3> ShapeType;
 
  479        typedef Shape::Hypercube<1> FaceType;
 
  481        static constexpr int cell_dim = 3;
 
  483        static constexpr int face_dim = 1;
 
  485        static constexpr int count = 4;
 
  488        static inline String name()
 
  490          return "ShapeConvertTraits<Simplex<3>,1>";
 
  500      struct ShapeConvertTraits<Shape::Simplex<3>, 2>
 
  503        typedef Shape::Simplex<3> ShapeType;
 
  505        typedef Shape::Hypercube<2> FaceType;
 
  507        static constexpr int cell_dim = 3;
 
  509        static constexpr int face_dim = 2;
 
  511        static constexpr int count = 6;
 
  514        static inline String name()
 
  516          return "ShapeConvertTraits<Simplex<3>,2>";
 
  526      struct ShapeConvertTraits<Shape::Simplex<3>, 3>
 
  529        typedef Shape::Simplex<3> ShapeType;
 
  531        typedef Shape::Hypercube<3> FaceType;
 
  533        static constexpr int cell_dim = 3;
 
  535        static constexpr int face_dim = 3;
 
  537        static constexpr int count = 4;
 
  540        static inline String name()
 
  542          return "ShapeConvertTraits<Simplex<3>,3>";
 
Type
bitmask for zfp header
String stringify(const T_ &item)
Converts an item into a String.