shards  Version of the Day
 All Classes Functions Variables Typedefs Enumerations Enumerator Groups
Shards_BasicTopologies.hpp
1 // @HEADER
2 // *****************************************************************************
3 // Shards : Shared Discretization Tools
4 //
5 // Copyright 2008-2011 NTESS and the Shards contributors.
6 // SPDX-License-Identifier: BSD-3-Clause
7 // *****************************************************************************
8 // @HEADER
9 
10 #ifndef Shards_BasicTopologies_hpp
11 #define Shards_BasicTopologies_hpp
12 
13 #include <iosfwd>
14 #include <Shards_CellTopologyTraits.hpp>
15 
16 namespace shards {
17 
22 //----------------------------------------------------------------------
23 
25 struct Node : public CellTopologyTraits<0,0,0>
26 {
27 #ifndef DOXYGEN_COMPILE
28  typedef Node base ;
29 #endif /* DOXYGEN_COMPILE */
30 };
31 
34 
35 //----------------------------------------------------------------------
36 
38 struct Particle : public CellTopologyTraits<0,1,1>
39 {
40 #ifndef DOXYGEN_COMPILE
41  typedef Particle base ;
42 #endif /* DOXYGEN_COMPILE */
43 };
44 
47 
48 //----------------------------------------------------------------------
49 
55 template< unsigned NodeCount = 2 > struct Line {};
56 
58 template<> const CellTopologyData * getCellTopologyData< Line<2> >();
59 
61 template<> const CellTopologyData * getCellTopologyData< Line<3> >();
62 
63 //----------------------------------------------------------------------
64 
70 template< unsigned NodeCount = 2 > struct Beam {};
71 
73 template<> const CellTopologyData * getCellTopologyData< Beam<2> >();
74 
76 template<> const CellTopologyData * getCellTopologyData< Beam<3> >();
77 
78 //----------------------------------------------------------------------
79 
85 template< unsigned NodeCount = 2 > struct ShellLine {};
86 
88 template<> const CellTopologyData * getCellTopologyData< ShellLine<2> >();
89 
91 template<> const CellTopologyData * getCellTopologyData< ShellLine<3> >();
92 
93 //----------------------------------------------------------------------
94 
117 template< unsigned NodeCount = 3 > struct Triangle {};
118 
120 template<> const CellTopologyData * getCellTopologyData< Triangle<3> >();
121 
123 template<> const CellTopologyData * getCellTopologyData< Triangle<6> >();
124 
126 template<> const CellTopologyData * getCellTopologyData< Triangle<4> >();
127 
128 //----------------------------------------------------------------------
129 
135 template< unsigned NodeCount = 3 > struct ShellTriangle {};
136 
138 template<> const CellTopologyData * getCellTopologyData< ShellTriangle<3> >();
139 
141 template<> const CellTopologyData * getCellTopologyData< ShellTriangle<6> >();
142 
143 //----------------------------------------------------------------------
166 template< unsigned NodeCount = 4 > struct Quadrilateral {};
167 
169 template<> const CellTopologyData * getCellTopologyData< Quadrilateral<4> >();
170 
172 template<> const CellTopologyData * getCellTopologyData< Quadrilateral<8> >();
173 
175 template<> const CellTopologyData * getCellTopologyData< Quadrilateral<9> >();
176 
177 //----------------------------------------------------------------------
178 
184 template< unsigned NodeCount = 4 > struct ShellQuadrilateral {};
185 
187 template<> const CellTopologyData * getCellTopologyData< ShellQuadrilateral<4> >();
188 
190 template<> const CellTopologyData * getCellTopologyData< ShellQuadrilateral<8> >();
191 
193 template<> const CellTopologyData * getCellTopologyData< ShellQuadrilateral<9> >();
194 
195 //----------------------------------------------------------------------
196 
200 template< unsigned NodeCount = 4 > struct Tetrahedron ;
201 
203 template<> const CellTopologyData * getCellTopologyData< Tetrahedron<4> >();
204 
206 template<> const CellTopologyData * getCellTopologyData< Tetrahedron<10> >();
207 
209 template<> const CellTopologyData * getCellTopologyData< Tetrahedron<8> >();
210 
212 template<> const CellTopologyData * getCellTopologyData< Tetrahedron<11> >();
213 
214 //----------------------------------------------------------------------
215 
219 template< unsigned NodeCount = 5 > struct Pyramid {};
220 
222 template<> const CellTopologyData * getCellTopologyData< Pyramid<5> >();
223 
225 template<> const CellTopologyData * getCellTopologyData< Pyramid<13> >();
226 
228 template<> const CellTopologyData * getCellTopologyData< Pyramid<14> >();
229 
230 //----------------------------------------------------------------------
231 
235 template< unsigned NodeCount = 6 > struct Wedge {};
236 
238 template<> const CellTopologyData * getCellTopologyData< Wedge<6> >();
239 
241 template<> const CellTopologyData * getCellTopologyData< Wedge<15> >();
242 
244 template<> const CellTopologyData * getCellTopologyData< Wedge<18> >();
245 
246 //----------------------------------------------------------------------
247 
326 template< unsigned NodeCount = 8 > struct Hexahedron {};
327 
329 template<> const CellTopologyData * getCellTopologyData< Hexahedron<8> >();
330 
332 template<> const CellTopologyData * getCellTopologyData< Hexahedron<20> >();
333 
335 template<> const CellTopologyData * getCellTopologyData< Hexahedron<27> >();
336 
337 //----------------------------------------------------------------------
338 //----------------------------------------------------------------------
339 
340 #ifndef DOXYGEN_COMPILE
341 
342 //----------------------------------------------------------------------
343 //----------------------------------------------------------------------
344 // Topologies for Rank-1 cells.
345 
346 typedef IndexList< 0 , 1 , 2 > LineNodeMapIdentity ;
347 typedef IndexList< 1 , 0 , 2 > LineNodeMapReversed ;
348 
350  LineNodePermutation ;
351 
352 typedef IndexList< CELL_PERMUTATION_POLARITY_POSITIVE,
353  CELL_PERMUTATION_POLARITY_NEGATIVE >
354  LineNodePermutationPolarity;
355 
356 template<> struct Line<2> : public
357  CellTopologyTraits< 1 , 2 , 2 ,
358  TypeListEnd, TypeListEnd,
359  TypeListEnd, TypeListEnd,
360  LineNodePermutation,
361  LineNodePermutationPolarity >
362 { typedef Line<2> base ; };
363 
364 template<> struct Line<3> : public
365  CellTopologyTraits< 1 , 2 , 3 ,
366  TypeListEnd, TypeListEnd,
367  TypeListEnd, TypeListEnd,
368  LineNodePermutation,
369  LineNodePermutationPolarity >
370 { typedef Line<2> base ; };
371 
372 // Beam is a line with one edge:
373 
374 typedef
375  MakeTypeList< LineNodeMapIdentity >::type BeamEdgeNodeMap ;
376 
377 template<> struct Beam<2> : public
378  CellTopologyTraits< 2 , 2 , 2 ,
379  MakeTypeList< Line<2> >::type ,
380  BeamEdgeNodeMap >
381 { typedef Beam<2> base ; };
382 
383 template<> struct Beam<3> : public
384  CellTopologyTraits< 2 , 2 , 3 ,
385  MakeTypeList< Line<3> >::type ,
386  BeamEdgeNodeMap >
387 { typedef Beam<2> base ; };
388 
389 // Shell-line has two edges:
390 
391 typedef
392  MakeTypeList< LineNodeMapIdentity , LineNodeMapReversed >::type
393  ShellLineEdgeNodeMap ;
394 
395 template<> struct ShellLine<2> : public
396  CellTopologyTraits< 2 , 2 , 2 ,
397  MakeTypeList< Line<2> , Line<2> >::type ,
398  ShellLineEdgeNodeMap >
399 { typedef ShellLine<2> base ; };
400 
401 template<> struct ShellLine<3> : public
402  CellTopologyTraits< 2 , 2 , 3 ,
403  MakeTypeList< Line<3> , Line<3> >::type ,
404  ShellLineEdgeNodeMap >
405 { typedef ShellLine<2> base ; };
406 
407 //----------------------------------------------------------------------
408 //----------------------------------------------------------------------
409 // Topologies for Rank-2 cells.
410 
411 typedef IndexList< 0, 1, 2, 3, 4, 5 > TriangleNodeMapIdentity ;
412 typedef IndexList< 2, 0, 1, 5, 3, 4 > TriangleNodeMapPositive1 ;
413 typedef IndexList< 1, 2, 0, 4, 5, 3 > TriangleNodeMapPositive2 ;
414 typedef IndexList< 0, 2, 1, 5, 4, 3 > TriangleNodeMapReversed0 ;
415 typedef IndexList< 2, 1, 0, 4, 3, 5 > TriangleNodeMapReversed1 ;
416 typedef IndexList< 1, 0, 2, 3, 5, 4 > TriangleNodeMapReversed2 ;
417 
418 typedef MakeTypeList< TriangleNodeMapIdentity ,
419  TriangleNodeMapPositive1 ,
420  TriangleNodeMapPositive2 ,
421  TriangleNodeMapReversed0 ,
422  TriangleNodeMapReversed1 ,
423  TriangleNodeMapReversed2 >::type
424  TriangleNodePermutation ;
425 
426 typedef IndexList< CELL_PERMUTATION_POLARITY_POSITIVE,
427  CELL_PERMUTATION_POLARITY_POSITIVE,
428  CELL_PERMUTATION_POLARITY_POSITIVE,
429  CELL_PERMUTATION_POLARITY_NEGATIVE,
430  CELL_PERMUTATION_POLARITY_NEGATIVE,
431  CELL_PERMUTATION_POLARITY_NEGATIVE >
432  TriangleNodePermutationPolarity;
433 
434 typedef MakeTypeList< IndexList< 0 , 1 , 3 > ,
435  IndexList< 1 , 2 , 4 > ,
436  IndexList< 2 , 0 , 5 > >::type
437  TriangleEdgeNodeMap ;
438 
439 template<> struct Triangle<3> : public
440  CellTopologyTraits< 2 , 3 , 3 ,
441  MakeTypeList< Line<2> ,
442  Line<2> ,
443  Line<2> >::type ,
444  TriangleEdgeNodeMap ,
445  TypeListEnd , TypeListEnd ,
446  TriangleNodePermutation ,
447  TriangleNodePermutationPolarity >
448 { typedef Triangle<3> base ; };
449 
450 template<> struct Triangle<6> : public
451  CellTopologyTraits< 2 , 3 , 6 ,
452  MakeTypeList< Line<3> ,
453  Line<3> ,
454  Line<3> >::type ,
455  TriangleEdgeNodeMap ,
456  TypeListEnd , TypeListEnd ,
457  TriangleNodePermutation ,
458  TriangleNodePermutationPolarity >
459 { typedef Triangle<3> base ; };
460 
461 typedef IndexList< 0, 1, 2, 3 > Triangle4_NodeMapIdentity ;
462 typedef IndexList< 2, 0, 1, 3 > Triangle4_NodeMapPositive1 ;
463 typedef IndexList< 1, 2, 0, 3 > Triangle4_NodeMapPositive2 ;
464 typedef IndexList< 0, 2, 1, 3 > Triangle4_NodeMapReversed0 ;
465 typedef IndexList< 2, 1, 0, 3 > Triangle4_NodeMapReversed1 ;
466 typedef IndexList< 1, 0, 2, 3 > Triangle4_NodeMapReversed2 ;
467 
468 typedef MakeTypeList< Triangle4_NodeMapIdentity ,
469  Triangle4_NodeMapPositive1 ,
470  Triangle4_NodeMapPositive2 ,
471  Triangle4_NodeMapReversed0 ,
472  Triangle4_NodeMapReversed1 ,
473  Triangle4_NodeMapReversed2 >::type
474  Triangle4_NodePermutation ;
475 
476 typedef IndexList< CELL_PERMUTATION_POLARITY_POSITIVE,
477  CELL_PERMUTATION_POLARITY_POSITIVE,
478  CELL_PERMUTATION_POLARITY_POSITIVE,
479  CELL_PERMUTATION_POLARITY_NEGATIVE,
480  CELL_PERMUTATION_POLARITY_NEGATIVE,
481  CELL_PERMUTATION_POLARITY_NEGATIVE >
482  Triangle4_NodePermutationPolarity;
483 
484 template<> struct Triangle<4> : public
485  CellTopologyTraits< 2 , 3 , 4 ,
486  MakeTypeList< Line<2> ,
487  Line<2> ,
488  Line<2> >::type ,
489  TriangleEdgeNodeMap ,
490  TypeListEnd , TypeListEnd ,
491  Triangle4_NodePermutation ,
492  Triangle4_NodePermutationPolarity >
493 { typedef Triangle<3> base ; };
494 
495 //------------------------------------------------------------------------
496 
497 typedef MakeTypeList< TriangleNodeMapIdentity ,
498  TriangleNodeMapReversed0 >::type
499  ShellTriangleFaceNodeMap ;
500 
501 template<> struct ShellTriangle<3> : public
502  CellTopologyTraits< 3 , 3 , 3 ,
503  MakeTypeList< Line<2> ,
504  Line<2> ,
505  Line<2> >::type ,
506  TriangleEdgeNodeMap ,
507  MakeTypeList< Triangle<3> ,
508  Triangle<3> >::type ,
509  ShellTriangleFaceNodeMap >
510 { typedef ShellTriangle<3> base ; };
511 
512 template<> struct ShellTriangle<6> : public
513  CellTopologyTraits< 3 , 3 , 6 ,
514  MakeTypeList< Line<3> ,
515  Line<3> ,
516  Line<3> >::type ,
517  TriangleEdgeNodeMap ,
518  MakeTypeList< Triangle<6> ,
519  Triangle<6> >::type ,
520  ShellTriangleFaceNodeMap >
521 { typedef ShellTriangle<3> base ; };
522 
523 //----------------------------------------------------------------------
524 
525 // A permutation should either be the identity or reversed.
526 // Simple (non-reversed) rotations should not happen in practice.
527 
528 typedef IndexList< 0, 1, 2, 3, 4, 5, 6, 7, 8 > QuadrilateralNodeMapIdentity ;
529 typedef IndexList< 3, 0, 1, 2, 7, 4, 5, 6, 8 > QuadrilateralNodeMapPositive1 ;
530 typedef IndexList< 2, 3, 0, 1, 6, 7, 4, 5, 8 > QuadrilateralNodeMapPositive2 ;
531 typedef IndexList< 1, 2, 3, 0, 5, 6, 7, 4, 8 > QuadrilateralNodeMapPositive3 ;
532 typedef IndexList< 0, 3, 2, 1, 7, 6, 5, 4, 8 > QuadrilateralNodeMapReversed0 ;
533 typedef IndexList< 3, 2, 1, 0, 6, 5, 4, 7, 8 > QuadrilateralNodeMapReversed1 ;
534 typedef IndexList< 2, 1, 0, 3, 5, 4, 7, 6, 8 > QuadrilateralNodeMapReversed2 ;
535 typedef IndexList< 1, 0, 3, 2, 4, 7, 6, 5, 8 > QuadrilateralNodeMapReversed3 ;
536 
537 typedef MakeTypeList< QuadrilateralNodeMapIdentity ,
538  QuadrilateralNodeMapPositive1 ,
539  QuadrilateralNodeMapPositive2 ,
540  QuadrilateralNodeMapPositive3 ,
541  QuadrilateralNodeMapReversed0 ,
542  QuadrilateralNodeMapReversed1 ,
543  QuadrilateralNodeMapReversed2 ,
544  QuadrilateralNodeMapReversed3 >::type
545  QuadrilateralNodePermutation ;
546 
547 typedef IndexList< CELL_PERMUTATION_POLARITY_POSITIVE,
548  CELL_PERMUTATION_POLARITY_POSITIVE,
549  CELL_PERMUTATION_POLARITY_POSITIVE,
550  CELL_PERMUTATION_POLARITY_POSITIVE,
551  CELL_PERMUTATION_POLARITY_NEGATIVE,
552  CELL_PERMUTATION_POLARITY_NEGATIVE,
553  CELL_PERMUTATION_POLARITY_NEGATIVE,
554  CELL_PERMUTATION_POLARITY_NEGATIVE >
555  QuadrilateralNodePermutationPolarity;
556 
557 typedef MakeTypeList< IndexList< 0 , 1 , 4 > ,
558  IndexList< 1 , 2 , 5 > ,
559  IndexList< 2 , 3 , 6 > ,
560  IndexList< 3 , 0 , 7 > >::type
561  QuadrilateralEdgeNodeMap ;
562 
563 template<> struct Quadrilateral<4> : public
564  CellTopologyTraits< 2 , 4 , 4 ,
565  MakeTypeList< Line<2> ,
566  Line<2> ,
567  Line<2> ,
568  Line<2> >::type ,
569  QuadrilateralEdgeNodeMap ,
570  TypeListEnd , TypeListEnd ,
571  QuadrilateralNodePermutation ,
572  QuadrilateralNodePermutationPolarity >
573 { typedef Quadrilateral<4> base ; };
574 
575 template<> struct Quadrilateral<8> : public
576  CellTopologyTraits< 2 , 4 , 8 ,
577  MakeTypeList< Line<3> ,
578  Line<3> ,
579  Line<3> ,
580  Line<3> >::type ,
581  QuadrilateralEdgeNodeMap ,
582  TypeListEnd , TypeListEnd ,
583  QuadrilateralNodePermutation ,
584  QuadrilateralNodePermutationPolarity >
585 { typedef Quadrilateral<4> base ; };
586 
587 template<> struct Quadrilateral<9> : public
588  CellTopologyTraits< 2 , 4 , 9 ,
589  MakeTypeList< Line<3> ,
590  Line<3> ,
591  Line<3> ,
592  Line<3> >::type ,
593  QuadrilateralEdgeNodeMap ,
594  TypeListEnd , TypeListEnd ,
595  QuadrilateralNodePermutation ,
596  QuadrilateralNodePermutationPolarity >
597 { typedef Quadrilateral<4> base ; };
598 
599 //----------------------------------------------------------------------
600 
601 typedef MakeTypeList< QuadrilateralNodeMapIdentity ,
602  QuadrilateralNodeMapReversed0 >::type
603  ShellQuadrilateralFaceNodeMap ;
604 
605 template<> struct ShellQuadrilateral<4> : public
606  CellTopologyTraits< 3 , 4 , 4 ,
607  MakeTypeList< Line<2> ,
608  Line<2> ,
609  Line<2> ,
610  Line<2> >::type ,
611  QuadrilateralEdgeNodeMap ,
612  MakeTypeList< Quadrilateral<4> ,
613  Quadrilateral<4> >::type ,
614  ShellQuadrilateralFaceNodeMap >
615 { typedef ShellQuadrilateral<4> base ; };
616 
617 template<> struct ShellQuadrilateral<8> : public
618  CellTopologyTraits< 3 , 4 , 8 ,
619  MakeTypeList< Line<3> ,
620  Line<3> ,
621  Line<3> ,
622  Line<3> >::type ,
623  QuadrilateralEdgeNodeMap ,
624  MakeTypeList< Quadrilateral<8> ,
625  Quadrilateral<8> >::type ,
626  ShellQuadrilateralFaceNodeMap >
627 { typedef ShellQuadrilateral<4> base ; };
628 
629 template<> struct ShellQuadrilateral<9> : public
630  CellTopologyTraits< 3 , 4 , 9 ,
631  MakeTypeList< Line<3> ,
632  Line<3> ,
633  Line<3> ,
634  Line<3> >::type ,
635  QuadrilateralEdgeNodeMap ,
636  MakeTypeList< Quadrilateral<9> ,
637  Quadrilateral<9> >::type ,
638  ShellQuadrilateralFaceNodeMap >
639 { typedef ShellQuadrilateral<4> base ; };
640 
641 //------------------------------------------------------------------------
642 
643 typedef MakeTypeList< IndexList< 0 , 1 , 4 > ,
644  IndexList< 1 , 2 , 5 > ,
645  IndexList< 2 , 0 , 6 > ,
646  IndexList< 0 , 3 , 7 > ,
647  IndexList< 1 , 3 , 8 > ,
648  IndexList< 2 , 3 , 9 > >::type
649  TetrahedronEdgeNodeMap ;
650 
651 typedef MakeTypeList< IndexList< 0 , 1 , 3 , 4 , 8 , 7 > ,
652  IndexList< 1 , 2 , 3 , 5 , 9 , 8 > ,
653  IndexList< 0 , 3 , 2 , 7 , 9 , 6 > ,
654  IndexList< 0 , 2 , 1 , 6 , 5 , 4 > >::type
655  TetrahedronSideNodeMap ;
656 
657 template<> struct Tetrahedron<4> : public
658  CellTopologyTraits< 3 , 4 , 4 ,
659  MakeTypeList< Line<2> ,
660  Line<2> ,
661  Line<2> ,
662  Line<2> ,
663  Line<2> ,
664  Line<2> >::type ,
665  TetrahedronEdgeNodeMap ,
666  MakeTypeList< Triangle<3> ,
667  Triangle<3> ,
668  Triangle<3> ,
669  Triangle<3> >::type ,
670  TetrahedronSideNodeMap >
671 { typedef Tetrahedron<4> base ; };
672 
673 template<> struct Tetrahedron<10> : public
674  CellTopologyTraits< 3 , 4 , 10 ,
675  MakeTypeList< Line<3> ,
676  Line<3> ,
677  Line<3> ,
678  Line<3> ,
679  Line<3> ,
680  Line<3> >::type ,
681  TetrahedronEdgeNodeMap ,
682  MakeTypeList< Triangle<6> ,
683  Triangle<6> ,
684  Triangle<6> ,
685  Triangle<6> >::type ,
686  TetrahedronSideNodeMap >
687 { typedef Tetrahedron<4> base ; };
688 
689 template<> struct Tetrahedron<11> : public
690  CellTopologyTraits< 3 , 4 , 11 ,
691  MakeTypeList< Line<3> ,
692  Line<3> ,
693  Line<3> ,
694  Line<3> ,
695  Line<3> ,
696  Line<3> >::type ,
697  TetrahedronEdgeNodeMap ,
698  MakeTypeList< Triangle<6> ,
699  Triangle<6> ,
700  Triangle<6> ,
701  Triangle<6> >::type ,
702  TetrahedronSideNodeMap >
703 { typedef Tetrahedron<4> base ; };
704 
705 template<> struct Tetrahedron<8> : public
706  CellTopologyTraits< 3 , 4 , 8 ,
707  MakeTypeList< Line<2> ,
708  Line<2> ,
709  Line<2> ,
710  Line<2> ,
711  Line<2> ,
712  Line<2> >::type ,
713  TetrahedronEdgeNodeMap ,
714  MakeTypeList< Triangle<4> ,
715  Triangle<4> ,
716  Triangle<4> ,
717  Triangle<4> >::type ,
718  TetrahedronSideNodeMap >
719 { typedef Tetrahedron<4> base ; };
720 
721 //------------------------------------------------------------------------
722 
723 typedef
724  MakeTypeList< IndexList< 0 , 1 , 5 > ,
725  IndexList< 1 , 2 , 6 > ,
726  IndexList< 2 , 3 , 7 > ,
727  IndexList< 3 , 0 , 8 > ,
728  IndexList< 0 , 4 , 9 > ,
729  IndexList< 1 , 4 , 10 > ,
730  IndexList< 2 , 4 , 11 > ,
731  IndexList< 3 , 4 , 12 > >::type
732  PyramidEdgeNodeMap ;
733 
734 typedef
735  MakeTypeList< IndexList< 0, 1, 4, 5, 10, 9 > ,
736  IndexList< 1, 2, 4, 6, 11, 10 > ,
737  IndexList< 2, 3, 4, 7, 12, 11 > ,
738  IndexList< 3, 0, 4, 8, 9, 12 > ,
739  IndexList< 0, 3, 2, 1, 8, 7, 6, 5, 13 > >::type
740  PyramidFaceNodeMap ;
741 
742 template<> struct Pyramid<5> : public
743  CellTopologyTraits< 3 , 5 , 5 ,
744  MakeTypeList< Line<2> ,
745  Line<2> ,
746  Line<2> ,
747  Line<2> ,
748  Line<2> ,
749  Line<2> ,
750  Line<2> ,
751  Line<2> >::type ,
752  PyramidEdgeNodeMap ,
753  MakeTypeList< Triangle<3> ,
754  Triangle<3> ,
755  Triangle<3> ,
756  Triangle<3> ,
757  Quadrilateral<4> >::type ,
758  PyramidFaceNodeMap >
759 { typedef Pyramid<5> base ; };
760 
761 template<> struct Pyramid<13> : public
762  CellTopologyTraits< 3 , 5 , 13 ,
763  MakeTypeList< Line<3> ,
764  Line<3> ,
765  Line<3> ,
766  Line<3> ,
767  Line<3> ,
768  Line<3> ,
769  Line<3> ,
770  Line<3> >::type ,
771  PyramidEdgeNodeMap ,
772  MakeTypeList< Triangle<6> ,
773  Triangle<6> ,
774  Triangle<6> ,
775  Triangle<6> ,
776  Quadrilateral<8> >::type ,
777  PyramidFaceNodeMap >
778 { typedef Pyramid<5> base ; };
779 
780 template<> struct Pyramid<14> : public
781  CellTopologyTraits< 3 , 5 , 14 ,
782  MakeTypeList< Line<3> ,
783  Line<3> ,
784  Line<3> ,
785  Line<3> ,
786  Line<3> ,
787  Line<3> ,
788  Line<3> ,
789  Line<3> >::type ,
790  PyramidEdgeNodeMap ,
791  MakeTypeList< Triangle<6> ,
792  Triangle<6> ,
793  Triangle<6> ,
794  Triangle<6> ,
795  Quadrilateral<9> >::type ,
796  PyramidFaceNodeMap >
797 { typedef Pyramid<5> base ; };
798 
799 //------------------------------------------------------------------------
800 
801 typedef
802  MakeTypeList< IndexList< 0 , 1 , 6 > ,
803  IndexList< 1 , 2 , 7 > ,
804  IndexList< 2 , 0 , 8 > ,
805  IndexList< 3 , 4 , 12 > ,
806  IndexList< 4 , 5 , 13 > ,
807  IndexList< 5 , 3 , 14 > ,
808  IndexList< 0 , 3 , 9 > ,
809  IndexList< 1 , 4 , 10 > ,
810  IndexList< 2 , 5 , 11 >
811  >::type WedgeEdgeNodeMap ;
812 
813 typedef
814  MakeTypeList< IndexList< 0 , 1 , 4 , 3 , 6 , 10 , 12 , 9 , 15 > ,
815  IndexList< 1 , 2 , 5 , 4 , 7 , 11 , 13 , 10 , 16 > ,
816  IndexList< 0 , 3 , 5 , 2 , 9 , 14 , 11 , 8 , 17 > ,
817  IndexList< 0 , 2 , 1 , 8 , 7 , 6 > ,
818  IndexList< 3 , 4 , 5 , 12 , 13 , 14 >
819  >::type WedgeFaceNodeMap ;
820 
821 template<> struct Wedge<6> : public
822  CellTopologyTraits< 3 , 6 , 6 ,
823  MakeTypeList< Line<2> ,
824  Line<2> ,
825  Line<2> ,
826  Line<2> ,
827  Line<2> ,
828  Line<2> ,
829  Line<2> ,
830  Line<2> ,
831  Line<2> >::type ,
832  WedgeEdgeNodeMap ,
833  MakeTypeList< Quadrilateral<4> ,
834  Quadrilateral<4> ,
835  Quadrilateral<4> ,
836  Triangle<3> ,
837  Triangle<3> >::type ,
838  WedgeFaceNodeMap >
839 { typedef Wedge<6> base ; };
840 
841 template<> struct Wedge<15> : public
842  CellTopologyTraits< 3 , 6 , 15 ,
843  MakeTypeList< Line<3> ,
844  Line<3> ,
845  Line<3> ,
846  Line<3> ,
847  Line<3> ,
848  Line<3> ,
849  Line<3> ,
850  Line<3> ,
851  Line<3> >::type ,
852  WedgeEdgeNodeMap ,
853  MakeTypeList< Quadrilateral<8> ,
854  Quadrilateral<8> ,
855  Quadrilateral<8> ,
856  Triangle<6> ,
857  Triangle<6> >::type ,
858  WedgeFaceNodeMap >
859 { typedef Wedge<6> base ; };
860 
861 template<> struct Wedge<18> : public
862  CellTopologyTraits< 3 , 6 , 18 ,
863  MakeTypeList< Line<3> ,
864  Line<3> ,
865  Line<3> ,
866  Line<3> ,
867  Line<3> ,
868  Line<3> ,
869  Line<3> ,
870  Line<3> ,
871  Line<3> >::type ,
872  WedgeEdgeNodeMap ,
873  MakeTypeList< Quadrilateral<9> ,
874  Quadrilateral<9> ,
875  Quadrilateral<9> ,
876  Triangle<6> ,
877  Triangle<6> >::type ,
878  WedgeFaceNodeMap >
879 { typedef Wedge<6> base ; };
880 
881 //------------------------------------------------------------------------
882 
883 typedef
884  MakeTypeList< IndexList< 0 , 1 , 8 > ,
885  IndexList< 1 , 2 , 9 > ,
886  IndexList< 2 , 3 , 10 > ,
887  IndexList< 3 , 0 , 11 > ,
888  IndexList< 4 , 5 , 16 > ,
889  IndexList< 5 , 6 , 17 > ,
890  IndexList< 6 , 7 , 18 > ,
891  IndexList< 7 , 4 , 19 > ,
892  IndexList< 0 , 4 , 12 > ,
893  IndexList< 1 , 5 , 13 > ,
894  IndexList< 2 , 6 , 14 > ,
895  IndexList< 3 , 7 , 15 > >::type
896  HexahedronEdgeNodeMap ;
897 
898 typedef
899  MakeTypeList< IndexList< 0, 1, 5, 4, 8, 13, 16, 12, 25 > ,
900  IndexList< 1, 2, 6, 5, 9, 14, 17, 13, 24 > ,
901  IndexList< 2, 3, 7, 6, 10, 15, 18, 14, 26 > ,
902  IndexList< 0, 4, 7, 3, 12, 19, 15, 11, 23 > ,
903  IndexList< 0, 3, 2, 1, 11, 10, 9, 8, 21 > ,
904  IndexList< 4, 5, 6, 7, 16, 17, 18, 19, 22 > >::type
905  HexahedronFaceNodeMap ;
906 
907 //----------------------------------------------------------------------
908 
909 template<> struct Hexahedron<8> : public
910  CellTopologyTraits< 3 , 8 , 8 ,
911  MakeTypeList< Line<2> ,
912  Line<2> ,
913  Line<2> ,
914  Line<2> ,
915  Line<2> ,
916  Line<2> ,
917  Line<2> ,
918  Line<2> ,
919  Line<2> ,
920  Line<2> ,
921  Line<2> ,
922  Line<2> >::type ,
923  HexahedronEdgeNodeMap ,
924  MakeTypeList< Quadrilateral<4> ,
925  Quadrilateral<4> ,
926  Quadrilateral<4> ,
927  Quadrilateral<4> ,
928  Quadrilateral<4> ,
929  Quadrilateral<4> >::type ,
930  HexahedronFaceNodeMap >
931 {
932  typedef Hexahedron<8> base ;
933 };
934 
935 template<> struct Hexahedron<20> : public
936  CellTopologyTraits< 3 , 8 , 20 ,
937  MakeTypeList< Line<3> ,
938  Line<3> ,
939  Line<3> ,
940  Line<3> ,
941  Line<3> ,
942  Line<3> ,
943  Line<3> ,
944  Line<3> ,
945  Line<3> ,
946  Line<3> ,
947  Line<3> ,
948  Line<3> >::type ,
949  HexahedronEdgeNodeMap ,
950  MakeTypeList< Quadrilateral<8> ,
951  Quadrilateral<8> ,
952  Quadrilateral<8> ,
953  Quadrilateral<8> ,
954  Quadrilateral<8> ,
955  Quadrilateral<8> >::type ,
956  HexahedronFaceNodeMap >
957 {
958  typedef Hexahedron<8> base ;
959 };
960 
961 template<> struct Hexahedron<27> : public
962  CellTopologyTraits< 3 , 8 , 27 ,
963  MakeTypeList< Line<3> ,
964  Line<3> ,
965  Line<3> ,
966  Line<3> ,
967  Line<3> ,
968  Line<3> ,
969  Line<3> ,
970  Line<3> ,
971  Line<3> ,
972  Line<3> ,
973  Line<3> ,
974  Line<3> >::type ,
975  HexahedronEdgeNodeMap ,
976  MakeTypeList< Quadrilateral<9> ,
977  Quadrilateral<9> ,
978  Quadrilateral<9> ,
979  Quadrilateral<9> ,
980  Quadrilateral<9> ,
981  Quadrilateral<9> >::type ,
982  HexahedronFaceNodeMap >
983 {
984  typedef Hexahedron<8> base ;
985 };
986 
987 //----------------------------------------------------------------------
988 // Polygons
989 //----------------------------------------------------------------------
990 
995 template< unsigned NodeCount = 5 > struct Pentagon {};
996 
999 template<> const CellTopologyData * getCellTopologyData< Pentagon<5> >();
1000 
1001 // Describe vertex to edge connectivity
1002 typedef
1003 MakeTypeList< IndexList< 0 , 1 > ,
1004  IndexList< 1 , 2 > ,
1005  IndexList< 2 , 3 > ,
1006  IndexList< 3 , 4 > ,
1007  IndexList< 4 , 0 > >::type PentagonEdgeNodeMap ;
1008 
1009 template<> struct Pentagon<5> : public
1010 CellTopologyTraits< 2 , 5 , 5 ,
1011  MakeTypeList< Line<2> ,
1012  Line<2> ,
1013  Line<2> ,
1014  Line<2> ,
1015  Line<2> >::type ,
1016  PentagonEdgeNodeMap >
1017 {
1018  typedef Pentagon<5> base ;
1019 };
1020 
1021 //----------------------------------------------------------------------
1022 
1027 template< unsigned NodeCount = 6 > struct Hexagon {};
1028 
1031 template<> const CellTopologyData * getCellTopologyData< Hexagon<6> >();
1032 
1033 // Describe vertex to edge connectivity
1034 typedef
1035 MakeTypeList< IndexList< 0 , 1 > ,
1036  IndexList< 1 , 2 > ,
1037  IndexList< 2 , 3 > ,
1038  IndexList< 3 , 4 > ,
1039  IndexList< 4 , 5 > ,
1040  IndexList< 5 , 0> >::type HexagonEdgeNodeMap ;
1041 
1042 template<> struct Hexagon<6> : public
1043 CellTopologyTraits< 2 , 6 , 6 ,
1044  MakeTypeList< Line<2> ,
1045  Line<2> ,
1046  Line<2> ,
1047  Line<2> ,
1048  Line<2> ,
1049  Line<2> >::type ,
1050  HexagonEdgeNodeMap >
1051 {
1052  typedef Hexagon<6> base ;
1053 };
1054 
1055 //------------------------------------------------------------------------
1057 template< class Traits > struct BasicTopologyOf ;
1058 
1060 template<> struct BasicTopologyOf< Node::Traits >
1061 { typedef Node type ; };
1062 
1064 template<> struct BasicTopologyOf< Particle::Traits >
1065 { typedef Particle type ; };
1066 
1068 template<> struct BasicTopologyOf< Line<2>::Traits >
1069 { typedef Line<2> type ; };
1070 
1072 template<> struct BasicTopologyOf< Line<3>::Traits >
1073 { typedef Line<3> type ; };
1074 
1076 template<> struct BasicTopologyOf< Beam<2>::Traits >
1077 { typedef Beam<2> type ; };
1078 
1080 template<> struct BasicTopologyOf< Beam<3>::Traits >
1081 { typedef Beam<3> type ; };
1082 
1084 template<> struct BasicTopologyOf< ShellLine<2>::Traits >
1085 { typedef ShellLine<2> type ; };
1086 
1088 template<> struct BasicTopologyOf< ShellLine<3>::Traits >
1089 { typedef ShellLine<3> type ; };
1090 
1092 template<> struct BasicTopologyOf< Triangle<3>::Traits >
1093 { typedef Triangle<3> type ; };
1094 
1096 template<> struct BasicTopologyOf< Triangle<6>::Traits >
1097 { typedef Triangle<6> type ; };
1098 
1100 template<> struct BasicTopologyOf< Triangle<4>::Traits >
1101 { typedef Triangle<4> type ; };
1102 
1104 template<> struct BasicTopologyOf< Quadrilateral<4>::Traits >
1105 { typedef Quadrilateral<4> type ; };
1106 
1108 template<> struct BasicTopologyOf< Quadrilateral<8>::Traits >
1109 { typedef Quadrilateral<8> type ; };
1110 
1112 template<> struct BasicTopologyOf< Quadrilateral<9>::Traits >
1113 { typedef Quadrilateral<9> type ; };
1114 
1116 template<> struct BasicTopologyOf< Pentagon<5>::Traits >
1117 { typedef Pentagon<5> type ; };
1118 
1120 template<> struct BasicTopologyOf< Hexagon<6>::Traits >
1121 { typedef Hexagon<6> type ; };
1122 
1124 template<> struct BasicTopologyOf< Tetrahedron<4>::Traits >
1125 { typedef Tetrahedron<4> type ; };
1126 
1128 template<> struct BasicTopologyOf< Tetrahedron<10>::Traits >
1129 { typedef Tetrahedron<10> type ; };
1130 
1132 template<> struct BasicTopologyOf< Tetrahedron<11>::Traits >
1133 { typedef Tetrahedron<11> type ; };
1134 
1136 template<> struct BasicTopologyOf< Tetrahedron<8>::Traits >
1137 { typedef Tetrahedron<8> type ; };
1138 
1140 template<> struct BasicTopologyOf< Pyramid<5>::Traits >
1141 { typedef Tetrahedron<5> type ; };
1142 
1144 template<> struct BasicTopologyOf< Pyramid<13>::Traits >
1145 { typedef Tetrahedron<13> type ; };
1146 
1148 template<> struct BasicTopologyOf< Pyramid<14>::Traits >
1149 { typedef Tetrahedron<14> type ; };
1150 
1152 template<> struct BasicTopologyOf< Wedge<6>::Traits >
1153 { typedef Wedge<6> type ; };
1154 
1156 template<> struct BasicTopologyOf< Wedge<15>::Traits >
1157 { typedef Wedge<15> type ; };
1158 
1160 template<> struct BasicTopologyOf< Wedge<18>::Traits >
1161 { typedef Wedge<18> type ; };
1162 
1164 template<> struct BasicTopologyOf< Hexahedron<8>::Traits >
1165 { typedef Hexahedron<8> type ; };
1166 
1168 template<> struct BasicTopologyOf< Hexahedron<20>::Traits >
1169 { typedef Hexahedron<20> type ; };
1170 
1172 template<> struct BasicTopologyOf< Hexahedron<27>::Traits >
1173 { typedef Hexahedron<27> type ; };
1174 
1175 //------------------------------------------------------------------------
1179 const unsigned * index_identity_array();
1180 
1181 
1190 const struct CellTopologyData_Subcell * subcell_nodes_array();
1191 
1194 std::ostream & operator << ( std::ostream &, const CellTopologyData &);
1195 
1196 #endif /* DOXYGEN_COMPILE */
1197 
1199 } // namespace shards
1200 
1201 #endif // Shards_BasicTopologies_hpp
1202 
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 = 0, 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...