shards Version of the Day
Loading...
Searching...
No Matches
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
16namespace shards {
17
21
22//----------------------------------------------------------------------
23
25struct Node : public CellTopologyTraits<0,0,0>
26{
27#ifndef DOXYGEN_COMPILE
28 typedef Node base ;
29#endif /* DOXYGEN_COMPILE */
30};
31
34
35//----------------------------------------------------------------------
36
38struct Particle : public CellTopologyTraits<0,1,1>
39{
40#ifndef DOXYGEN_COMPILE
41 typedef Particle base ;
42#endif /* DOXYGEN_COMPILE */
43};
44
47
48//----------------------------------------------------------------------
49
55template< unsigned NodeCount = 2 > struct Line {};
56
59
62
63//----------------------------------------------------------------------
64
70template< unsigned NodeCount = 2 > struct Beam {};
71
74
77
78//----------------------------------------------------------------------
79
85template< unsigned NodeCount = 2 > struct ShellLine {};
86
89
92
93//----------------------------------------------------------------------
94
117template< unsigned NodeCount = 3 > struct Triangle {};
118
121
124
127
128//----------------------------------------------------------------------
129
135template< unsigned NodeCount = 3 > struct ShellTriangle {};
136
139
142
143//----------------------------------------------------------------------
166template< unsigned NodeCount = 4 > struct Quadrilateral {};
167
170
173
176
177//----------------------------------------------------------------------
178
184template< unsigned NodeCount = 4 > struct ShellQuadrilateral {};
185
188
191
194
195//----------------------------------------------------------------------
196
200template< unsigned NodeCount = 4 > struct Tetrahedron ;
201
204
207
210
213
214//----------------------------------------------------------------------
215
219template< unsigned NodeCount = 5 > struct Pyramid {};
220
223
226
229
230//----------------------------------------------------------------------
231
235template< unsigned NodeCount = 6 > struct Wedge {};
236
239
242
245
246//----------------------------------------------------------------------
247
326template< unsigned NodeCount = 8 > struct Hexahedron {};
327
330
333
336
337//----------------------------------------------------------------------
338//----------------------------------------------------------------------
339
340#ifndef DOXYGEN_COMPILE
341
342//----------------------------------------------------------------------
343//----------------------------------------------------------------------
344// Topologies for Rank-1 cells.
345
346typedef IndexList< 0 , 1 , 2 > LineNodeMapIdentity ;
347typedef IndexList< 1 , 0 , 2 > LineNodeMapReversed ;
348
350 LineNodePermutation ;
351
352typedef IndexList< CELL_PERMUTATION_POLARITY_POSITIVE,
353 CELL_PERMUTATION_POLARITY_NEGATIVE >
354 LineNodePermutationPolarity;
355
356template<> 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
364template<> 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
374typedef
376
377template<> struct Beam<2> : public
378 CellTopologyTraits< 2 , 2 , 2 ,
379 MakeTypeList< Line<2> >::type ,
380 BeamEdgeNodeMap >
381{ typedef Beam<2> base ; };
382
383template<> 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
391typedef
393 ShellLineEdgeNodeMap ;
394
395template<> struct ShellLine<2> : public
396 CellTopologyTraits< 2 , 2 , 2 ,
397 MakeTypeList< Line<2> , Line<2> >::type ,
398 ShellLineEdgeNodeMap >
399{ typedef ShellLine<2> base ; };
400
401template<> 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
411typedef IndexList< 0, 1, 2, 3, 4, 5 > TriangleNodeMapIdentity ;
412typedef IndexList< 2, 0, 1, 5, 3, 4 > TriangleNodeMapPositive1 ;
413typedef IndexList< 1, 2, 0, 4, 5, 3 > TriangleNodeMapPositive2 ;
414typedef IndexList< 0, 2, 1, 5, 4, 3 > TriangleNodeMapReversed0 ;
415typedef IndexList< 2, 1, 0, 4, 3, 5 > TriangleNodeMapReversed1 ;
416typedef IndexList< 1, 0, 2, 3, 5, 4 > TriangleNodeMapReversed2 ;
417
418typedef MakeTypeList< TriangleNodeMapIdentity ,
419 TriangleNodeMapPositive1 ,
420 TriangleNodeMapPositive2 ,
421 TriangleNodeMapReversed0 ,
422 TriangleNodeMapReversed1 ,
423 TriangleNodeMapReversed2 >::type
424 TriangleNodePermutation ;
425
426typedef 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
437 TriangleEdgeNodeMap ;
438
439template<> 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
450template<> 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
461typedef IndexList< 0, 1, 2, 3 > Triangle4_NodeMapIdentity ;
462typedef IndexList< 2, 0, 1, 3 > Triangle4_NodeMapPositive1 ;
463typedef IndexList< 1, 2, 0, 3 > Triangle4_NodeMapPositive2 ;
464typedef IndexList< 0, 2, 1, 3 > Triangle4_NodeMapReversed0 ;
465typedef IndexList< 2, 1, 0, 3 > Triangle4_NodeMapReversed1 ;
466typedef IndexList< 1, 0, 2, 3 > Triangle4_NodeMapReversed2 ;
467
468typedef MakeTypeList< Triangle4_NodeMapIdentity ,
469 Triangle4_NodeMapPositive1 ,
470 Triangle4_NodeMapPositive2 ,
471 Triangle4_NodeMapReversed0 ,
472 Triangle4_NodeMapReversed1 ,
473 Triangle4_NodeMapReversed2 >::type
474 Triangle4_NodePermutation ;
475
476typedef 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
484template<> 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
497typedef MakeTypeList< TriangleNodeMapIdentity ,
498 TriangleNodeMapReversed0 >::type
499 ShellTriangleFaceNodeMap ;
500
501template<> 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
512template<> 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
528typedef IndexList< 0, 1, 2, 3, 4, 5, 6, 7, 8 > QuadrilateralNodeMapIdentity ;
529typedef IndexList< 3, 0, 1, 2, 7, 4, 5, 6, 8 > QuadrilateralNodeMapPositive1 ;
530typedef IndexList< 2, 3, 0, 1, 6, 7, 4, 5, 8 > QuadrilateralNodeMapPositive2 ;
531typedef IndexList< 1, 2, 3, 0, 5, 6, 7, 4, 8 > QuadrilateralNodeMapPositive3 ;
532typedef IndexList< 0, 3, 2, 1, 7, 6, 5, 4, 8 > QuadrilateralNodeMapReversed0 ;
533typedef IndexList< 3, 2, 1, 0, 6, 5, 4, 7, 8 > QuadrilateralNodeMapReversed1 ;
534typedef IndexList< 2, 1, 0, 3, 5, 4, 7, 6, 8 > QuadrilateralNodeMapReversed2 ;
535typedef IndexList< 1, 0, 3, 2, 4, 7, 6, 5, 8 > QuadrilateralNodeMapReversed3 ;
536
537typedef MakeTypeList< QuadrilateralNodeMapIdentity ,
538 QuadrilateralNodeMapPositive1 ,
539 QuadrilateralNodeMapPositive2 ,
540 QuadrilateralNodeMapPositive3 ,
541 QuadrilateralNodeMapReversed0 ,
542 QuadrilateralNodeMapReversed1 ,
543 QuadrilateralNodeMapReversed2 ,
544 QuadrilateralNodeMapReversed3 >::type
545 QuadrilateralNodePermutation ;
546
547typedef 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
561 QuadrilateralEdgeNodeMap ;
562
563template<> 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
575template<> 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
587template<> 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
601typedef MakeTypeList< QuadrilateralNodeMapIdentity ,
602 QuadrilateralNodeMapReversed0 >::type
603 ShellQuadrilateralFaceNodeMap ;
604
605template<> 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
617template<> 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
629template<> 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
649 TetrahedronEdgeNodeMap ;
650
655 TetrahedronSideNodeMap ;
656
657template<> 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
673template<> 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
689template<> 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
705template<> 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
723typedef
732 PyramidEdgeNodeMap ;
733
734typedef
740 PyramidFaceNodeMap ;
741
742template<> 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
761template<> 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
780template<> 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
801typedef
811 >::type WedgeEdgeNodeMap ;
812
813typedef
819 >::type WedgeFaceNodeMap ;
820
821template<> 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
841template<> 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
861template<> 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
883typedef
896 HexahedronEdgeNodeMap ;
897
898typedef
905 HexahedronFaceNodeMap ;
906
907//----------------------------------------------------------------------
908
909template<> 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
935template<> 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
961template<> 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
994
995template< unsigned NodeCount = 5 > struct Pentagon {};
996
1000
1001// Describe vertex to edge connectivity
1002typedef
1007 IndexList< 4 , 0 > >::type PentagonEdgeNodeMap ;
1008
1009template<> struct Pentagon<5> : public
1010CellTopologyTraits< 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
1026
1027template< unsigned NodeCount = 6 > struct Hexagon {};
1028
1032
1033// Describe vertex to edge connectivity
1034typedef
1040 IndexList< 5 , 0> >::type HexagonEdgeNodeMap ;
1041
1042template<> struct Hexagon<6> : public
1043CellTopologyTraits< 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//------------------------------------------------------------------------
1057template< class Traits > struct BasicTopologyOf ;
1058
1060template<> struct BasicTopologyOf< Node::Traits >
1061{ typedef Node type ; };
1062
1064template<> struct BasicTopologyOf< Particle::Traits >
1065{ typedef Particle type ; };
1066
1068template<> struct BasicTopologyOf< Line<2>::Traits >
1069{ typedef Line<2> type ; };
1070
1072template<> struct BasicTopologyOf< Line<3>::Traits >
1073{ typedef Line<3> type ; };
1074
1076template<> struct BasicTopologyOf< Beam<2>::Traits >
1077{ typedef Beam<2> type ; };
1078
1080template<> struct BasicTopologyOf< Beam<3>::Traits >
1081{ typedef Beam<3> type ; };
1082
1084template<> struct BasicTopologyOf< ShellLine<2>::Traits >
1085{ typedef ShellLine<2> type ; };
1086
1088template<> struct BasicTopologyOf< ShellLine<3>::Traits >
1089{ typedef ShellLine<3> type ; };
1090
1092template<> struct BasicTopologyOf< Triangle<3>::Traits >
1093{ typedef Triangle<3> type ; };
1094
1096template<> struct BasicTopologyOf< Triangle<6>::Traits >
1097{ typedef Triangle<6> type ; };
1098
1100template<> struct BasicTopologyOf< Triangle<4>::Traits >
1101{ typedef Triangle<4> type ; };
1102
1104template<> struct BasicTopologyOf< Quadrilateral<4>::Traits >
1105{ typedef Quadrilateral<4> type ; };
1106
1108template<> struct BasicTopologyOf< Quadrilateral<8>::Traits >
1109{ typedef Quadrilateral<8> type ; };
1110
1112template<> struct BasicTopologyOf< Quadrilateral<9>::Traits >
1113{ typedef Quadrilateral<9> type ; };
1114
1116template<> struct BasicTopologyOf< Pentagon<5>::Traits >
1117{ typedef Pentagon<5> type ; };
1118
1120template<> struct BasicTopologyOf< Hexagon<6>::Traits >
1121{ typedef Hexagon<6> type ; };
1122
1124template<> struct BasicTopologyOf< Tetrahedron<4>::Traits >
1125{ typedef Tetrahedron<4> type ; };
1126
1128template<> struct BasicTopologyOf< Tetrahedron<10>::Traits >
1129{ typedef Tetrahedron<10> type ; };
1130
1132template<> struct BasicTopologyOf< Tetrahedron<11>::Traits >
1133{ typedef Tetrahedron<11> type ; };
1134
1136template<> struct BasicTopologyOf< Tetrahedron<8>::Traits >
1137{ typedef Tetrahedron<8> type ; };
1138
1140template<> struct BasicTopologyOf< Pyramid<5>::Traits >
1141{ typedef Tetrahedron<5> type ; };
1142
1144template<> struct BasicTopologyOf< Pyramid<13>::Traits >
1145{ typedef Tetrahedron<13> type ; };
1146
1148template<> struct BasicTopologyOf< Pyramid<14>::Traits >
1149{ typedef Tetrahedron<14> type ; };
1150
1152template<> struct BasicTopologyOf< Wedge<6>::Traits >
1153{ typedef Wedge<6> type ; };
1154
1156template<> struct BasicTopologyOf< Wedge<15>::Traits >
1157{ typedef Wedge<15> type ; };
1158
1160template<> struct BasicTopologyOf< Wedge<18>::Traits >
1161{ typedef Wedge<18> type ; };
1162
1164template<> struct BasicTopologyOf< Hexahedron<8>::Traits >
1165{ typedef Hexahedron<8> type ; };
1166
1168template<> struct BasicTopologyOf< Hexahedron<20>::Traits >
1169{ typedef Hexahedron<20> type ; };
1170
1172template<> struct BasicTopologyOf< Hexahedron<27>::Traits >
1173{ typedef Hexahedron<27> type ; };
1174
1175//------------------------------------------------------------------------
1179const unsigned * index_identity_array();
1180
1181
1190const struct CellTopologyData_Subcell * subcell_nodes_array();
1191
1194std::ostream & operator << ( std::ostream &, const CellTopologyData &);
1195
1196#endif /* DOXYGEN_COMPILE */
1197
1199} // namespace shards
1200
1201#endif // Shards_BasicTopologies_hpp
1202
const CellTopologyData * getCellTopologyData< Particle >()
Singleton for Particle topology.
std::ostream & operator<<(std::ostream &, const CellTopology &)
Overloaded << operator for CellTopologyData objects.
const CellTopologyData * getCellTopologyData< Node >()
Singleton for Node topology.
struct CellTopologyData CellTopologyData
Self-typedef.
const CellTopologyData * getCellTopologyData()
Return a CellTopology singleton for the given cell topology traits.
A simple 'C' struct of cell topology attributes.
Topological traits: Dimension = 2, Edges = 1, Vertices = 2, and Nodes = 2 or 3.
Compile-time traits for a cell topology.
Topological traits: Dimension = 3, Sides = 6, Edges = 12, Vertices = 8, and Nodes = 8,...
Compile-time list of indices.
Topological traits: Dimension = 1, Vertices = 2, Nodes = 2 or 3.
Member typedef ... type ; is a type list constructed from the template arguments.
TypeListClean< dirty_type >::type type
The constructed type list.
Topological traits: Dimension = 0, Vertices = 0, Nodes = 0.
Topological traits: Dimension = 0, Vertices = 1, Nodes = 1.
Topological traits: Dimension = 3, Sides = 5, Edges = 8, Vertices = 5, and Nodes = 5,...
Topological traits: Dimension = 2, Edges = 4, Vertices = 4, and Nodes = 4, 8, or 9.
Topological traits: Dimension = 2, Edges = 2, Vertices = 2, and Nodes = 2 or 3.
Topological traits: Dimension = 2, Sides = 2, Edges = 4, Vertices = 4, and Nodes = 4,...
Topological traits: Dimension = 3, Sides = 2, Edges = 3, Vertices = 3, and Nodes = 3 or 6.
Topological traits: Dimension = 3, Sides = 4, Edges = 6, Vertices = 4, and Nodes = 4 or 10.
Topological traits: Dimension = 2, Edges = 3, Vertices = 3, and Nodes = 3 or 6.
Topological traits: Dimension = 3, Sides = 5, Edges = 9, Vertices = 6, and Nodes = 6,...