shards  Version of the Day
 All Classes Functions Variables Typedefs Enumerations Enumerator Groups
Shards_BasicTopologies.hpp
1 /*
2 //@HEADER
3 // ************************************************************************
4 //
5 // Shards : Shared Discretization Tools
6 // Copyright 2008 Sandia Corporation
7 //
8 // Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
9 // the U.S. Government retains certain rights in this software.
10 //
11 // Redistribution and use in source and binary forms, with or without
12 // modification, are permitted provided that the following conditions are
13 // met:
14 //
15 // 1. Redistributions of source code must retain the above copyright
16 // notice, this list of conditions and the following disclaimer.
17 //
18 // 2. Redistributions in binary form must reproduce the above copyright
19 // notice, this list of conditions and the following disclaimer in the
20 // documentation and/or other materials provided with the distribution.
21 //
22 // 3. Neither the name of the Corporation nor the names of the
23 // contributors may be used to endorse or promote products derived from
24 // this software without specific prior written permission.
25 //
26 // THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
27 // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
28 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
29 // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
30 // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
31 // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
32 // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
33 // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
34 // LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
35 // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
36 // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
37 //
38 // Questions? Contact Carter Edwards (hcedwar@sandia.gov),
39 // Pavel Bochev (pbboche@sandia.gov), or
40 // Denis Ridzal (dridzal@sandia.gov).
41 //
42 // ************************************************************************
43 //@HEADER
44 */
45 
46 #ifndef Shards_BasicTopologies_hpp
47 #define Shards_BasicTopologies_hpp
48 
49 #include <iosfwd>
50 #include <Shards_CellTopologyTraits.hpp>
51 
52 namespace shards {
53 
58 //----------------------------------------------------------------------
59 
61 struct Node : public CellTopologyTraits<0,0,0>
62 {
63 #ifndef DOXYGEN_COMPILE
64  typedef Node base ;
65 #endif /* DOXYGEN_COMPILE */
66 };
67 
70 
71 //----------------------------------------------------------------------
72 
74 struct Particle : public CellTopologyTraits<1,1,1>
75 {
76 #ifndef DOXYGEN_COMPILE
77  typedef Particle base ;
78 #endif /* DOXYGEN_COMPILE */
79 };
80 
83 
84 //----------------------------------------------------------------------
85 
91 template< unsigned NodeCount = 2 > struct Line {};
92 
94 template<> const CellTopologyData * getCellTopologyData< Line<2> >();
95 
97 template<> const CellTopologyData * getCellTopologyData< Line<3> >();
98 
99 //----------------------------------------------------------------------
100 
106 template< unsigned NodeCount = 2 > struct Beam {};
107 
109 template<> const CellTopologyData * getCellTopologyData< Beam<2> >();
110 
112 template<> const CellTopologyData * getCellTopologyData< Beam<3> >();
113 
114 //----------------------------------------------------------------------
115 
121 template< unsigned NodeCount = 2 > struct ShellLine {};
122 
124 template<> const CellTopologyData * getCellTopologyData< ShellLine<2> >();
125 
127 template<> const CellTopologyData * getCellTopologyData< ShellLine<3> >();
128 
129 //----------------------------------------------------------------------
130 
153 template< unsigned NodeCount = 3 > struct Triangle {};
154 
156 template<> const CellTopologyData * getCellTopologyData< Triangle<3> >();
157 
159 template<> const CellTopologyData * getCellTopologyData< Triangle<6> >();
160 
162 template<> const CellTopologyData * getCellTopologyData< Triangle<4> >();
163 
164 //----------------------------------------------------------------------
165 
171 template< unsigned NodeCount = 3 > struct ShellTriangle {};
172 
174 template<> const CellTopologyData * getCellTopologyData< ShellTriangle<3> >();
175 
177 template<> const CellTopologyData * getCellTopologyData< ShellTriangle<6> >();
178 
179 //----------------------------------------------------------------------
202 template< unsigned NodeCount = 4 > struct Quadrilateral {};
203 
205 template<> const CellTopologyData * getCellTopologyData< Quadrilateral<4> >();
206 
208 template<> const CellTopologyData * getCellTopologyData< Quadrilateral<8> >();
209 
211 template<> const CellTopologyData * getCellTopologyData< Quadrilateral<9> >();
212 
213 //----------------------------------------------------------------------
214 
220 template< unsigned NodeCount = 4 > struct ShellQuadrilateral {};
221 
223 template<> const CellTopologyData * getCellTopologyData< ShellQuadrilateral<4> >();
224 
226 template<> const CellTopologyData * getCellTopologyData< ShellQuadrilateral<8> >();
227 
229 template<> const CellTopologyData * getCellTopologyData< ShellQuadrilateral<9> >();
230 
231 //----------------------------------------------------------------------
232 
236 template< unsigned NodeCount = 4 > struct Tetrahedron ;
237 
239 template<> const CellTopologyData * getCellTopologyData< Tetrahedron<4> >();
240 
242 template<> const CellTopologyData * getCellTopologyData< Tetrahedron<10> >();
243 
245 template<> const CellTopologyData * getCellTopologyData< Tetrahedron<8> >();
246 
248 template<> const CellTopologyData * getCellTopologyData< Tetrahedron<11> >();
249 
250 //----------------------------------------------------------------------
251 
255 template< unsigned NodeCount = 5 > struct Pyramid {};
256 
258 template<> const CellTopologyData * getCellTopologyData< Pyramid<5> >();
259 
261 template<> const CellTopologyData * getCellTopologyData< Pyramid<13> >();
262 
264 template<> const CellTopologyData * getCellTopologyData< Pyramid<14> >();
265 
266 //----------------------------------------------------------------------
267 
271 template< unsigned NodeCount = 6 > struct Wedge {};
272 
274 template<> const CellTopologyData * getCellTopologyData< Wedge<6> >();
275 
277 template<> const CellTopologyData * getCellTopologyData< Wedge<15> >();
278 
280 template<> const CellTopologyData * getCellTopologyData< Wedge<18> >();
281 
282 //----------------------------------------------------------------------
283 
362 template< unsigned NodeCount = 8 > struct Hexahedron {};
363 
365 template<> const CellTopologyData * getCellTopologyData< Hexahedron<8> >();
366 
368 template<> const CellTopologyData * getCellTopologyData< Hexahedron<20> >();
369 
371 template<> const CellTopologyData * getCellTopologyData< Hexahedron<27> >();
372 
373 //----------------------------------------------------------------------
374 //----------------------------------------------------------------------
375 
376 #ifndef DOXYGEN_COMPILE
377 
378 //----------------------------------------------------------------------
379 //----------------------------------------------------------------------
380 // Topologies for Rank-1 cells.
381 
382 typedef IndexList< 0 , 1 , 2 > LineNodeMapIdentity ;
383 typedef IndexList< 1 , 0 , 2 > LineNodeMapReversed ;
384 
386  LineNodePermutation ;
387 
388 typedef IndexList< CELL_PERMUTATION_POLARITY_POSITIVE,
389  CELL_PERMUTATION_POLARITY_NEGATIVE >
390  LineNodePermutationPolarity;
391 
392 template<> struct Line<2> : public
393  CellTopologyTraits< 1 , 2 , 2 ,
394  TypeListEnd, TypeListEnd,
395  TypeListEnd, TypeListEnd,
396  LineNodePermutation,
397  LineNodePermutationPolarity >
398 { typedef Line<2> base ; };
399 
400 template<> struct Line<3> : public
401  CellTopologyTraits< 1 , 2 , 3 ,
402  TypeListEnd, TypeListEnd,
403  TypeListEnd, TypeListEnd,
404  LineNodePermutation,
405  LineNodePermutationPolarity >
406 { typedef Line<2> base ; };
407 
408 // Beam is a line with one edge:
409 
410 typedef
411  MakeTypeList< LineNodeMapIdentity >::type BeamEdgeNodeMap ;
412 
413 template<> struct Beam<2> : public
414  CellTopologyTraits< 2 , 2 , 2 ,
415  MakeTypeList< Line<2> >::type ,
416  BeamEdgeNodeMap >
417 { typedef Beam<2> base ; };
418 
419 template<> struct Beam<3> : public
420  CellTopologyTraits< 2 , 2 , 3 ,
421  MakeTypeList< Line<3> >::type ,
422  BeamEdgeNodeMap >
423 { typedef Beam<2> base ; };
424 
425 // Shell-line has two edges:
426 
427 typedef
428  MakeTypeList< LineNodeMapIdentity , LineNodeMapReversed >::type
429  ShellLineEdgeNodeMap ;
430 
431 template<> struct ShellLine<2> : public
432  CellTopologyTraits< 2 , 2 , 2 ,
433  MakeTypeList< Line<2> , Line<2> >::type ,
434  ShellLineEdgeNodeMap >
435 { typedef ShellLine<2> base ; };
436 
437 template<> struct ShellLine<3> : public
438  CellTopologyTraits< 2 , 2 , 3 ,
439  MakeTypeList< Line<3> , Line<3> >::type ,
440  ShellLineEdgeNodeMap >
441 { typedef ShellLine<2> base ; };
442 
443 //----------------------------------------------------------------------
444 //----------------------------------------------------------------------
445 // Topologies for Rank-2 cells.
446 
447 typedef IndexList< 0, 1, 2, 3, 4, 5 > TriangleNodeMapIdentity ;
448 typedef IndexList< 2, 0, 1, 5, 3, 4 > TriangleNodeMapPositive1 ;
449 typedef IndexList< 1, 2, 0, 4, 5, 3 > TriangleNodeMapPositive2 ;
450 typedef IndexList< 0, 2, 1, 5, 4, 3 > TriangleNodeMapReversed0 ;
451 typedef IndexList< 2, 1, 0, 4, 3, 5 > TriangleNodeMapReversed1 ;
452 typedef IndexList< 1, 0, 2, 3, 5, 4 > TriangleNodeMapReversed2 ;
453 
454 typedef MakeTypeList< TriangleNodeMapIdentity ,
455  TriangleNodeMapPositive1 ,
456  TriangleNodeMapPositive2 ,
457  TriangleNodeMapReversed0 ,
458  TriangleNodeMapReversed1 ,
459  TriangleNodeMapReversed2 >::type
460  TriangleNodePermutation ;
461 
462 typedef IndexList< CELL_PERMUTATION_POLARITY_POSITIVE,
463  CELL_PERMUTATION_POLARITY_POSITIVE,
464  CELL_PERMUTATION_POLARITY_POSITIVE,
465  CELL_PERMUTATION_POLARITY_NEGATIVE,
466  CELL_PERMUTATION_POLARITY_NEGATIVE,
467  CELL_PERMUTATION_POLARITY_NEGATIVE >
468  TriangleNodePermutationPolarity;
469 
470 typedef MakeTypeList< IndexList< 0 , 1 , 3 > ,
471  IndexList< 1 , 2 , 4 > ,
472  IndexList< 2 , 0 , 5 > >::type
473  TriangleEdgeNodeMap ;
474 
475 template<> struct Triangle<3> : public
476  CellTopologyTraits< 2 , 3 , 3 ,
477  MakeTypeList< Line<2> ,
478  Line<2> ,
479  Line<2> >::type ,
480  TriangleEdgeNodeMap ,
481  TypeListEnd , TypeListEnd ,
482  TriangleNodePermutation ,
483  TriangleNodePermutationPolarity >
484 { typedef Triangle<3> base ; };
485 
486 template<> struct Triangle<6> : public
487  CellTopologyTraits< 2 , 3 , 6 ,
488  MakeTypeList< Line<3> ,
489  Line<3> ,
490  Line<3> >::type ,
491  TriangleEdgeNodeMap ,
492  TypeListEnd , TypeListEnd ,
493  TriangleNodePermutation ,
494  TriangleNodePermutationPolarity >
495 { typedef Triangle<3> base ; };
496 
497 typedef IndexList< 0, 1, 2, 3 > Triangle4_NodeMapIdentity ;
498 typedef IndexList< 2, 0, 1, 3 > Triangle4_NodeMapPositive1 ;
499 typedef IndexList< 1, 2, 0, 3 > Triangle4_NodeMapPositive2 ;
500 typedef IndexList< 0, 2, 1, 3 > Triangle4_NodeMapReversed0 ;
501 typedef IndexList< 2, 1, 0, 3 > Triangle4_NodeMapReversed1 ;
502 typedef IndexList< 1, 0, 2, 3 > Triangle4_NodeMapReversed2 ;
503 
504 typedef MakeTypeList< Triangle4_NodeMapIdentity ,
505  Triangle4_NodeMapPositive1 ,
506  Triangle4_NodeMapPositive2 ,
507  Triangle4_NodeMapReversed0 ,
508  Triangle4_NodeMapReversed1 ,
509  Triangle4_NodeMapReversed2 >::type
510  Triangle4_NodePermutation ;
511 
512 typedef IndexList< CELL_PERMUTATION_POLARITY_POSITIVE,
513  CELL_PERMUTATION_POLARITY_POSITIVE,
514  CELL_PERMUTATION_POLARITY_POSITIVE,
515  CELL_PERMUTATION_POLARITY_NEGATIVE,
516  CELL_PERMUTATION_POLARITY_NEGATIVE,
517  CELL_PERMUTATION_POLARITY_NEGATIVE >
518  Triangle4_NodePermutationPolarity;
519 
520 template<> struct Triangle<4> : public
521  CellTopologyTraits< 2 , 3 , 4 ,
522  MakeTypeList< Line<2> ,
523  Line<2> ,
524  Line<2> >::type ,
525  TriangleEdgeNodeMap ,
526  TypeListEnd , TypeListEnd ,
527  Triangle4_NodePermutation ,
528  Triangle4_NodePermutationPolarity >
529 { typedef Triangle<3> base ; };
530 
531 //------------------------------------------------------------------------
532 
533 typedef MakeTypeList< TriangleNodeMapIdentity ,
534  TriangleNodeMapReversed0 >::type
535  ShellTriangleFaceNodeMap ;
536 
537 template<> struct ShellTriangle<3> : public
538  CellTopologyTraits< 3 , 3 , 3 ,
539  MakeTypeList< Line<2> ,
540  Line<2> ,
541  Line<2> >::type ,
542  TriangleEdgeNodeMap ,
543  MakeTypeList< Triangle<3> ,
544  Triangle<3> >::type ,
545  ShellTriangleFaceNodeMap >
546 { typedef ShellTriangle<3> base ; };
547 
548 template<> struct ShellTriangle<6> : public
549  CellTopologyTraits< 3 , 3 , 6 ,
550  MakeTypeList< Line<3> ,
551  Line<3> ,
552  Line<3> >::type ,
553  TriangleEdgeNodeMap ,
554  MakeTypeList< Triangle<6> ,
555  Triangle<6> >::type ,
556  ShellTriangleFaceNodeMap >
557 { typedef ShellTriangle<3> base ; };
558 
559 //----------------------------------------------------------------------
560 
561 // A permutation should either be the identity or reversed.
562 // Simple (non-reversed) rotations should not happen in practice.
563 
564 typedef IndexList< 0, 1, 2, 3, 4, 5, 6, 7, 8 > QuadrilateralNodeMapIdentity ;
565 typedef IndexList< 3, 0, 1, 2, 7, 4, 5, 6, 8 > QuadrilateralNodeMapPositive1 ;
566 typedef IndexList< 2, 3, 0, 1, 6, 7, 4, 5, 8 > QuadrilateralNodeMapPositive2 ;
567 typedef IndexList< 1, 2, 3, 0, 5, 6, 7, 4, 8 > QuadrilateralNodeMapPositive3 ;
568 typedef IndexList< 0, 3, 2, 1, 7, 6, 5, 4, 8 > QuadrilateralNodeMapReversed0 ;
569 typedef IndexList< 3, 2, 1, 0, 6, 5, 4, 7, 8 > QuadrilateralNodeMapReversed1 ;
570 typedef IndexList< 2, 1, 0, 3, 5, 4, 7, 6, 8 > QuadrilateralNodeMapReversed2 ;
571 typedef IndexList< 1, 0, 3, 2, 4, 7, 6, 5, 8 > QuadrilateralNodeMapReversed3 ;
572 
573 typedef MakeTypeList< QuadrilateralNodeMapIdentity ,
574  QuadrilateralNodeMapPositive1 ,
575  QuadrilateralNodeMapPositive2 ,
576  QuadrilateralNodeMapPositive3 ,
577  QuadrilateralNodeMapReversed0 ,
578  QuadrilateralNodeMapReversed1 ,
579  QuadrilateralNodeMapReversed2 ,
580  QuadrilateralNodeMapReversed3 >::type
581  QuadrilateralNodePermutation ;
582 
583 typedef IndexList< CELL_PERMUTATION_POLARITY_POSITIVE,
584  CELL_PERMUTATION_POLARITY_POSITIVE,
585  CELL_PERMUTATION_POLARITY_POSITIVE,
586  CELL_PERMUTATION_POLARITY_POSITIVE,
587  CELL_PERMUTATION_POLARITY_NEGATIVE,
588  CELL_PERMUTATION_POLARITY_NEGATIVE,
589  CELL_PERMUTATION_POLARITY_NEGATIVE,
590  CELL_PERMUTATION_POLARITY_NEGATIVE >
591  QuadrilateralNodePermutationPolarity;
592 
593 typedef MakeTypeList< IndexList< 0 , 1 , 4 > ,
594  IndexList< 1 , 2 , 5 > ,
595  IndexList< 2 , 3 , 6 > ,
596  IndexList< 3 , 0 , 7 > >::type
597  QuadrilateralEdgeNodeMap ;
598 
599 template<> struct Quadrilateral<4> : public
600  CellTopologyTraits< 2 , 4 , 4 ,
601  MakeTypeList< Line<2> ,
602  Line<2> ,
603  Line<2> ,
604  Line<2> >::type ,
605  QuadrilateralEdgeNodeMap ,
606  TypeListEnd , TypeListEnd ,
607  QuadrilateralNodePermutation ,
608  QuadrilateralNodePermutationPolarity >
609 { typedef Quadrilateral<4> base ; };
610 
611 template<> struct Quadrilateral<8> : public
612  CellTopologyTraits< 2 , 4 , 8 ,
613  MakeTypeList< Line<3> ,
614  Line<3> ,
615  Line<3> ,
616  Line<3> >::type ,
617  QuadrilateralEdgeNodeMap ,
618  TypeListEnd , TypeListEnd ,
619  QuadrilateralNodePermutation ,
620  QuadrilateralNodePermutationPolarity >
621 { typedef Quadrilateral<4> base ; };
622 
623 template<> struct Quadrilateral<9> : public
624  CellTopologyTraits< 2 , 4 , 9 ,
625  MakeTypeList< Line<3> ,
626  Line<3> ,
627  Line<3> ,
628  Line<3> >::type ,
629  QuadrilateralEdgeNodeMap ,
630  TypeListEnd , TypeListEnd ,
631  QuadrilateralNodePermutation ,
632  QuadrilateralNodePermutationPolarity >
633 { typedef Quadrilateral<4> base ; };
634 
635 //----------------------------------------------------------------------
636 
637 typedef MakeTypeList< QuadrilateralNodeMapIdentity ,
638  QuadrilateralNodeMapReversed0 >::type
639  ShellQuadrilateralFaceNodeMap ;
640 
641 template<> struct ShellQuadrilateral<4> : public
642  CellTopologyTraits< 3 , 4 , 4 ,
643  MakeTypeList< Line<2> ,
644  Line<2> ,
645  Line<2> ,
646  Line<2> >::type ,
647  QuadrilateralEdgeNodeMap ,
648  MakeTypeList< Quadrilateral<4> ,
649  Quadrilateral<4> >::type ,
650  ShellQuadrilateralFaceNodeMap >
651 { typedef ShellQuadrilateral<4> base ; };
652 
653 template<> struct ShellQuadrilateral<8> : public
654  CellTopologyTraits< 3 , 4 , 8 ,
655  MakeTypeList< Line<3> ,
656  Line<3> ,
657  Line<3> ,
658  Line<3> >::type ,
659  QuadrilateralEdgeNodeMap ,
660  MakeTypeList< Quadrilateral<8> ,
661  Quadrilateral<8> >::type ,
662  ShellQuadrilateralFaceNodeMap >
663 { typedef ShellQuadrilateral<4> base ; };
664 
665 template<> struct ShellQuadrilateral<9> : public
666  CellTopologyTraits< 3 , 4 , 9 ,
667  MakeTypeList< Line<3> ,
668  Line<3> ,
669  Line<3> ,
670  Line<3> >::type ,
671  QuadrilateralEdgeNodeMap ,
672  MakeTypeList< Quadrilateral<9> ,
673  Quadrilateral<9> >::type ,
674  ShellQuadrilateralFaceNodeMap >
675 { typedef ShellQuadrilateral<4> base ; };
676 
677 //------------------------------------------------------------------------
678 
679 typedef MakeTypeList< IndexList< 0 , 1 , 4 > ,
680  IndexList< 1 , 2 , 5 > ,
681  IndexList< 2 , 0 , 6 > ,
682  IndexList< 0 , 3 , 7 > ,
683  IndexList< 1 , 3 , 8 > ,
684  IndexList< 2 , 3 , 9 > >::type
685  TetrahedronEdgeNodeMap ;
686 
687 typedef MakeTypeList< IndexList< 0 , 1 , 3 , 4 , 8 , 7 > ,
688  IndexList< 1 , 2 , 3 , 5 , 9 , 8 > ,
689  IndexList< 0 , 3 , 2 , 7 , 9 , 6 > ,
690  IndexList< 0 , 2 , 1 , 6 , 5 , 4 > >::type
691  TetrahedronSideNodeMap ;
692 
693 template<> struct Tetrahedron<4> : public
694  CellTopologyTraits< 3 , 4 , 4 ,
695  MakeTypeList< Line<2> ,
696  Line<2> ,
697  Line<2> ,
698  Line<2> ,
699  Line<2> ,
700  Line<2> >::type ,
701  TetrahedronEdgeNodeMap ,
702  MakeTypeList< Triangle<3> ,
703  Triangle<3> ,
704  Triangle<3> ,
705  Triangle<3> >::type ,
706  TetrahedronSideNodeMap >
707 { typedef Tetrahedron<4> base ; };
708 
709 template<> struct Tetrahedron<10> : public
710  CellTopologyTraits< 3 , 4 , 10 ,
711  MakeTypeList< Line<3> ,
712  Line<3> ,
713  Line<3> ,
714  Line<3> ,
715  Line<3> ,
716  Line<3> >::type ,
717  TetrahedronEdgeNodeMap ,
718  MakeTypeList< Triangle<6> ,
719  Triangle<6> ,
720  Triangle<6> ,
721  Triangle<6> >::type ,
722  TetrahedronSideNodeMap >
723 { typedef Tetrahedron<4> base ; };
724 
725 template<> struct Tetrahedron<11> : public
726  CellTopologyTraits< 3 , 4 , 11 ,
727  MakeTypeList< Line<3> ,
728  Line<3> ,
729  Line<3> ,
730  Line<3> ,
731  Line<3> ,
732  Line<3> >::type ,
733  TetrahedronEdgeNodeMap ,
734  MakeTypeList< Triangle<6> ,
735  Triangle<6> ,
736  Triangle<6> ,
737  Triangle<6> >::type ,
738  TetrahedronSideNodeMap >
739 { typedef Tetrahedron<4> base ; };
740 
741 template<> struct Tetrahedron<8> : public
742  CellTopologyTraits< 3 , 4 , 8 ,
743  MakeTypeList< Line<2> ,
744  Line<2> ,
745  Line<2> ,
746  Line<2> ,
747  Line<2> ,
748  Line<2> >::type ,
749  TetrahedronEdgeNodeMap ,
750  MakeTypeList< Triangle<4> ,
751  Triangle<4> ,
752  Triangle<4> ,
753  Triangle<4> >::type ,
754  TetrahedronSideNodeMap >
755 { typedef Tetrahedron<4> base ; };
756 
757 //------------------------------------------------------------------------
758 
759 typedef
760  MakeTypeList< IndexList< 0 , 1 , 5 > ,
761  IndexList< 1 , 2 , 6 > ,
762  IndexList< 2 , 3 , 7 > ,
763  IndexList< 3 , 0 , 8 > ,
764  IndexList< 0 , 4 , 9 > ,
765  IndexList< 1 , 4 , 10 > ,
766  IndexList< 2 , 4 , 11 > ,
767  IndexList< 3 , 4 , 12 > >::type
768  PyramidEdgeNodeMap ;
769 
770 typedef
771  MakeTypeList< IndexList< 0, 1, 4, 5, 10, 9 > ,
772  IndexList< 1, 2, 4, 6, 11, 10 > ,
773  IndexList< 2, 3, 4, 7, 12, 11 > ,
774  IndexList< 3, 0, 4, 8, 9, 12 > ,
775  IndexList< 0, 3, 2, 1, 8, 7, 6, 5, 13 > >::type
776  PyramidFaceNodeMap ;
777 
778 template<> struct Pyramid<5> : public
779  CellTopologyTraits< 3 , 5 , 5 ,
780  MakeTypeList< Line<2> ,
781  Line<2> ,
782  Line<2> ,
783  Line<2> ,
784  Line<2> ,
785  Line<2> ,
786  Line<2> ,
787  Line<2> >::type ,
788  PyramidEdgeNodeMap ,
789  MakeTypeList< Triangle<3> ,
790  Triangle<3> ,
791  Triangle<3> ,
792  Triangle<3> ,
793  Quadrilateral<4> >::type ,
794  PyramidFaceNodeMap >
795 { typedef Pyramid<5> base ; };
796 
797 template<> struct Pyramid<13> : public
798  CellTopologyTraits< 3 , 5 , 13 ,
799  MakeTypeList< Line<3> ,
800  Line<3> ,
801  Line<3> ,
802  Line<3> ,
803  Line<3> ,
804  Line<3> ,
805  Line<3> ,
806  Line<3> >::type ,
807  PyramidEdgeNodeMap ,
808  MakeTypeList< Triangle<6> ,
809  Triangle<6> ,
810  Triangle<6> ,
811  Triangle<6> ,
812  Quadrilateral<8> >::type ,
813  PyramidFaceNodeMap >
814 { typedef Pyramid<5> base ; };
815 
816 template<> struct Pyramid<14> : public
817  CellTopologyTraits< 3 , 5 , 14 ,
818  MakeTypeList< Line<3> ,
819  Line<3> ,
820  Line<3> ,
821  Line<3> ,
822  Line<3> ,
823  Line<3> ,
824  Line<3> ,
825  Line<3> >::type ,
826  PyramidEdgeNodeMap ,
827  MakeTypeList< Triangle<6> ,
828  Triangle<6> ,
829  Triangle<6> ,
830  Triangle<6> ,
831  Quadrilateral<9> >::type ,
832  PyramidFaceNodeMap >
833 { typedef Pyramid<5> base ; };
834 
835 //------------------------------------------------------------------------
836 
837 typedef
838  MakeTypeList< IndexList< 0 , 1 , 6 > ,
839  IndexList< 1 , 2 , 7 > ,
840  IndexList< 2 , 0 , 8 > ,
841  IndexList< 3 , 4 , 12 > ,
842  IndexList< 4 , 5 , 13 > ,
843  IndexList< 5 , 3 , 14 > ,
844  IndexList< 0 , 3 , 9 > ,
845  IndexList< 1 , 4 , 10 > ,
846  IndexList< 2 , 5 , 11 >
847  >::type WedgeEdgeNodeMap ;
848 
849 typedef
850  MakeTypeList< IndexList< 0 , 1 , 4 , 3 , 6 , 10 , 12 , 9 , 15 > ,
851  IndexList< 1 , 2 , 5 , 4 , 7 , 11 , 13 , 10 , 16 > ,
852  IndexList< 0 , 3 , 5 , 2 , 9 , 14 , 11 , 8 , 17 > ,
853  IndexList< 0 , 2 , 1 , 8 , 7 , 6 > ,
854  IndexList< 3 , 4 , 5 , 12 , 13 , 14 >
855  >::type WedgeFaceNodeMap ;
856 
857 template<> struct Wedge<6> : public
858  CellTopologyTraits< 3 , 6 , 6 ,
859  MakeTypeList< Line<2> ,
860  Line<2> ,
861  Line<2> ,
862  Line<2> ,
863  Line<2> ,
864  Line<2> ,
865  Line<2> ,
866  Line<2> ,
867  Line<2> >::type ,
868  WedgeEdgeNodeMap ,
869  MakeTypeList< Quadrilateral<4> ,
870  Quadrilateral<4> ,
871  Quadrilateral<4> ,
872  Triangle<3> ,
873  Triangle<3> >::type ,
874  WedgeFaceNodeMap >
875 { typedef Wedge<6> base ; };
876 
877 template<> struct Wedge<15> : public
878  CellTopologyTraits< 3 , 6 , 15 ,
879  MakeTypeList< Line<3> ,
880  Line<3> ,
881  Line<3> ,
882  Line<3> ,
883  Line<3> ,
884  Line<3> ,
885  Line<3> ,
886  Line<3> ,
887  Line<3> >::type ,
888  WedgeEdgeNodeMap ,
889  MakeTypeList< Quadrilateral<8> ,
890  Quadrilateral<8> ,
891  Quadrilateral<8> ,
892  Triangle<6> ,
893  Triangle<6> >::type ,
894  WedgeFaceNodeMap >
895 { typedef Wedge<6> base ; };
896 
897 template<> struct Wedge<18> : public
898  CellTopologyTraits< 3 , 6 , 18 ,
899  MakeTypeList< Line<3> ,
900  Line<3> ,
901  Line<3> ,
902  Line<3> ,
903  Line<3> ,
904  Line<3> ,
905  Line<3> ,
906  Line<3> ,
907  Line<3> >::type ,
908  WedgeEdgeNodeMap ,
909  MakeTypeList< Quadrilateral<9> ,
910  Quadrilateral<9> ,
911  Quadrilateral<9> ,
912  Triangle<6> ,
913  Triangle<6> >::type ,
914  WedgeFaceNodeMap >
915 { typedef Wedge<6> base ; };
916 
917 //------------------------------------------------------------------------
918 
919 typedef
920  MakeTypeList< IndexList< 0 , 1 , 8 > ,
921  IndexList< 1 , 2 , 9 > ,
922  IndexList< 2 , 3 , 10 > ,
923  IndexList< 3 , 0 , 11 > ,
924  IndexList< 4 , 5 , 16 > ,
925  IndexList< 5 , 6 , 17 > ,
926  IndexList< 6 , 7 , 18 > ,
927  IndexList< 7 , 4 , 19 > ,
928  IndexList< 0 , 4 , 12 > ,
929  IndexList< 1 , 5 , 13 > ,
930  IndexList< 2 , 6 , 14 > ,
931  IndexList< 3 , 7 , 15 > >::type
932  HexahedronEdgeNodeMap ;
933 
934 typedef
935  MakeTypeList< IndexList< 0, 1, 5, 4, 8, 13, 16, 12, 25 > ,
936  IndexList< 1, 2, 6, 5, 9, 14, 17, 13, 24 > ,
937  IndexList< 2, 3, 7, 6, 10, 15, 18, 14, 26 > ,
938  IndexList< 0, 4, 7, 3, 12, 19, 15, 11, 23 > ,
939  IndexList< 0, 3, 2, 1, 11, 10, 9, 8, 21 > ,
940  IndexList< 4, 5, 6, 7, 16, 17, 18, 19, 22 > >::type
941  HexahedronFaceNodeMap ;
942 
943 //----------------------------------------------------------------------
944 
945 template<> struct Hexahedron<8> : public
946  CellTopologyTraits< 3 , 8 , 8 ,
947  MakeTypeList< Line<2> ,
948  Line<2> ,
949  Line<2> ,
950  Line<2> ,
951  Line<2> ,
952  Line<2> ,
953  Line<2> ,
954  Line<2> ,
955  Line<2> ,
956  Line<2> ,
957  Line<2> ,
958  Line<2> >::type ,
959  HexahedronEdgeNodeMap ,
960  MakeTypeList< Quadrilateral<4> ,
961  Quadrilateral<4> ,
962  Quadrilateral<4> ,
963  Quadrilateral<4> ,
964  Quadrilateral<4> ,
965  Quadrilateral<4> >::type ,
966  HexahedronFaceNodeMap >
967 {
968  typedef Hexahedron<8> base ;
969 };
970 
971 template<> struct Hexahedron<20> : public
972  CellTopologyTraits< 3 , 8 , 20 ,
973  MakeTypeList< Line<3> ,
974  Line<3> ,
975  Line<3> ,
976  Line<3> ,
977  Line<3> ,
978  Line<3> ,
979  Line<3> ,
980  Line<3> ,
981  Line<3> ,
982  Line<3> ,
983  Line<3> ,
984  Line<3> >::type ,
985  HexahedronEdgeNodeMap ,
986  MakeTypeList< Quadrilateral<8> ,
987  Quadrilateral<8> ,
988  Quadrilateral<8> ,
989  Quadrilateral<8> ,
990  Quadrilateral<8> ,
991  Quadrilateral<8> >::type ,
992  HexahedronFaceNodeMap >
993 {
994  typedef Hexahedron<8> base ;
995 };
996 
997 template<> struct Hexahedron<27> : public
998  CellTopologyTraits< 3 , 8 , 27 ,
999  MakeTypeList< Line<3> ,
1000  Line<3> ,
1001  Line<3> ,
1002  Line<3> ,
1003  Line<3> ,
1004  Line<3> ,
1005  Line<3> ,
1006  Line<3> ,
1007  Line<3> ,
1008  Line<3> ,
1009  Line<3> ,
1010  Line<3> >::type ,
1011  HexahedronEdgeNodeMap ,
1012  MakeTypeList< Quadrilateral<9> ,
1013  Quadrilateral<9> ,
1014  Quadrilateral<9> ,
1015  Quadrilateral<9> ,
1016  Quadrilateral<9> ,
1017  Quadrilateral<9> >::type ,
1018  HexahedronFaceNodeMap >
1019 {
1020  typedef Hexahedron<8> base ;
1021 };
1022 
1023 //----------------------------------------------------------------------
1024 // Polygons
1025 //----------------------------------------------------------------------
1026 
1031 template< unsigned NodeCount = 5 > struct Pentagon {};
1032 
1035 template<> const CellTopologyData * getCellTopologyData< Pentagon<5> >();
1036 
1037 // Describe vertex to edge connectivity
1038 typedef
1039 MakeTypeList< IndexList< 0 , 1 > ,
1040  IndexList< 1 , 2 > ,
1041  IndexList< 2 , 3 > ,
1042  IndexList< 3 , 4 > ,
1043  IndexList< 4 , 0 > >::type PentagonEdgeNodeMap ;
1044 
1045 template<> struct Pentagon<5> : public
1046 CellTopologyTraits< 2 , 5 , 5 ,
1047  MakeTypeList< Line<2> ,
1048  Line<2> ,
1049  Line<2> ,
1050  Line<2> ,
1051  Line<2> >::type ,
1052  PentagonEdgeNodeMap >
1053 {
1054  typedef Pentagon<5> base ;
1055 };
1056 
1057 //----------------------------------------------------------------------
1058 
1063 template< unsigned NodeCount = 6 > struct Hexagon {};
1064 
1067 template<> const CellTopologyData * getCellTopologyData< Hexagon<6> >();
1068 
1069 // Describe vertex to edge connectivity
1070 typedef
1071 MakeTypeList< IndexList< 0 , 1 > ,
1072  IndexList< 1 , 2 > ,
1073  IndexList< 2 , 3 > ,
1074  IndexList< 3 , 4 > ,
1075  IndexList< 4 , 5 > ,
1076  IndexList< 5 , 0> >::type HexagonEdgeNodeMap ;
1077 
1078 template<> struct Hexagon<6> : public
1079 CellTopologyTraits< 2 , 6 , 6 ,
1080  MakeTypeList< Line<2> ,
1081  Line<2> ,
1082  Line<2> ,
1083  Line<2> ,
1084  Line<2> ,
1085  Line<2> >::type ,
1086  HexagonEdgeNodeMap >
1087 {
1088  typedef Hexagon<6> base ;
1089 };
1090 
1091 //------------------------------------------------------------------------
1093 template< class Traits > struct BasicTopologyOf ;
1094 
1096 template<> struct BasicTopologyOf< Node::Traits >
1097 { typedef Node type ; };
1098 
1100 template<> struct BasicTopologyOf< Particle::Traits >
1101 { typedef Particle type ; };
1102 
1104 template<> struct BasicTopologyOf< Line<2>::Traits >
1105 { typedef Line<2> type ; };
1106 
1108 template<> struct BasicTopologyOf< Line<3>::Traits >
1109 { typedef Line<3> type ; };
1110 
1112 template<> struct BasicTopologyOf< Beam<2>::Traits >
1113 { typedef Beam<2> type ; };
1114 
1116 template<> struct BasicTopologyOf< Beam<3>::Traits >
1117 { typedef Beam<3> type ; };
1118 
1120 template<> struct BasicTopologyOf< ShellLine<2>::Traits >
1121 { typedef ShellLine<2> type ; };
1122 
1124 template<> struct BasicTopologyOf< ShellLine<3>::Traits >
1125 { typedef ShellLine<3> type ; };
1126 
1128 template<> struct BasicTopologyOf< Triangle<3>::Traits >
1129 { typedef Triangle<3> type ; };
1130 
1132 template<> struct BasicTopologyOf< Triangle<6>::Traits >
1133 { typedef Triangle<6> type ; };
1134 
1136 template<> struct BasicTopologyOf< Triangle<4>::Traits >
1137 { typedef Triangle<4> type ; };
1138 
1140 template<> struct BasicTopologyOf< Quadrilateral<4>::Traits >
1141 { typedef Quadrilateral<4> type ; };
1142 
1144 template<> struct BasicTopologyOf< Quadrilateral<8>::Traits >
1145 { typedef Quadrilateral<8> type ; };
1146 
1148 template<> struct BasicTopologyOf< Quadrilateral<9>::Traits >
1149 { typedef Quadrilateral<9> type ; };
1150 
1152 template<> struct BasicTopologyOf< Pentagon<5>::Traits >
1153 { typedef Pentagon<5> type ; };
1154 
1156 template<> struct BasicTopologyOf< Hexagon<6>::Traits >
1157 { typedef Hexagon<6> type ; };
1158 
1160 template<> struct BasicTopologyOf< Tetrahedron<4>::Traits >
1161 { typedef Tetrahedron<4> type ; };
1162 
1164 template<> struct BasicTopologyOf< Tetrahedron<10>::Traits >
1165 { typedef Tetrahedron<10> type ; };
1166 
1168 template<> struct BasicTopologyOf< Tetrahedron<11>::Traits >
1169 { typedef Tetrahedron<11> type ; };
1170 
1172 template<> struct BasicTopologyOf< Tetrahedron<8>::Traits >
1173 { typedef Tetrahedron<8> type ; };
1174 
1176 template<> struct BasicTopologyOf< Pyramid<5>::Traits >
1177 { typedef Tetrahedron<5> type ; };
1178 
1180 template<> struct BasicTopologyOf< Pyramid<13>::Traits >
1181 { typedef Tetrahedron<13> type ; };
1182 
1184 template<> struct BasicTopologyOf< Pyramid<14>::Traits >
1185 { typedef Tetrahedron<14> type ; };
1186 
1188 template<> struct BasicTopologyOf< Wedge<6>::Traits >
1189 { typedef Wedge<6> type ; };
1190 
1192 template<> struct BasicTopologyOf< Wedge<15>::Traits >
1193 { typedef Wedge<15> type ; };
1194 
1196 template<> struct BasicTopologyOf< Wedge<18>::Traits >
1197 { typedef Wedge<18> type ; };
1198 
1200 template<> struct BasicTopologyOf< Hexahedron<8>::Traits >
1201 { typedef Hexahedron<8> type ; };
1202 
1204 template<> struct BasicTopologyOf< Hexahedron<20>::Traits >
1205 { typedef Hexahedron<20> type ; };
1206 
1208 template<> struct BasicTopologyOf< Hexahedron<27>::Traits >
1209 { typedef Hexahedron<27> type ; };
1210 
1211 //------------------------------------------------------------------------
1215 const unsigned * index_identity_array();
1216 
1217 
1226 const struct CellTopologyData_Subcell * subcell_nodes_array();
1227 
1230 std::ostream & operator << ( std::ostream &, const CellTopologyData &);
1231 
1232 #endif /* DOXYGEN_COMPILE */
1233 
1235 } // namespace shards
1236 
1237 #endif // Shards_BasicTopologies_hpp
1238 
TypeListClean< dirty_type >::type type
The constructed type list.
Topological traits: Dimension = 3, Sides = 5, Edges = 8, Vertices = 5, and Nodes = 5...
Topological traits: Dimension = 3, Sides = 5, Edges = 9, Vertices = 6, and Nodes = 6...
const CellTopologyData * getCellTopologyData< Particle >()
Singleton for Particle topology.
Topological traits: Dimension = 1, Vertices = 2, Nodes = 2 or 3.
Topological traits: Dimension = 3, Sides = 6, Edges = 12, Vertices = 8, and Nodes = 8...
Topological traits: Dimension = 2, Edges = 1, Vertices = 2, and Nodes = 2 or 3.
Compile-time traits for a cell topology.
Compile-time list of indices.
Topological traits: Dimension = 2, Edges = 3, Vertices = 3, and Nodes = 3 or 6.
Topological traits: Dimension = 0, Vertices = 0, Nodes = 0.
Topological traits: Dimension = 1, Vertices = 1, Nodes = 1.
Topological traits: Dimension = 2, Edges = 2, Vertices = 2, and Nodes = 2 or 3.
A simple &#39;C&#39; struct of cell topology attributes.
const CellTopologyData * getCellTopologyData< Node >()
Singleton for Node topology.
Topological traits: Dimension = 2, Sides = 2, Edges = 4, Vertices = 4, and Nodes = 4...
Topological traits: Dimension = 3, Sides = 4, Edges = 6, Vertices = 4, and Nodes = 4 or 10...
Topological traits: Dimension = 2, Edges = 4, Vertices = 4, and Nodes = 4, 8, or 9.
std::ostream & operator<<(std::ostream &, const CellTopology &)
Overloaded &lt;&lt; operator for CellTopologyData objects.
Topological traits: Dimension = 3, Sides = 2, Edges = 3, Vertices = 3, and Nodes = 3 or 6...