|
shards
Version of the Day
|
00001 /* 00002 //@HEADER 00003 // ************************************************************************ 00004 // 00005 // Shards : Shared Discretization Tools 00006 // Copyright 2008 Sandia Corporation 00007 // 00008 // Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, 00009 // the U.S. Government retains certain rights in this software. 00010 // 00011 // Redistribution and use in source and binary forms, with or without 00012 // modification, are permitted provided that the following conditions are 00013 // met: 00014 // 00015 // 1. Redistributions of source code must retain the above copyright 00016 // notice, this list of conditions and the following disclaimer. 00017 // 00018 // 2. Redistributions in binary form must reproduce the above copyright 00019 // notice, this list of conditions and the following disclaimer in the 00020 // documentation and/or other materials provided with the distribution. 00021 // 00022 // 3. Neither the name of the Corporation nor the names of the 00023 // contributors may be used to endorse or promote products derived from 00024 // this software without specific prior written permission. 00025 // 00026 // THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY 00027 // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 00028 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 00029 // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE 00030 // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 00031 // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 00032 // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 00033 // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 00034 // LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 00035 // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 00036 // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 00037 // 00038 // Questions? Contact Carter Edwards (hcedwar@sandia.gov), 00039 // Pavel Bochev (pbboche@sandia.gov), or 00040 // Denis Ridzal (dridzal@sandia.gov). 00041 // 00042 // ************************************************************************ 00043 //@HEADER 00044 */ 00045 00046 #ifndef Shards_BasicTopologies_hpp 00047 #define Shards_BasicTopologies_hpp 00048 00049 #include <iosfwd> 00050 #include <Shards_CellTopologyTraits.hpp> 00051 00052 namespace shards { 00053 00058 //---------------------------------------------------------------------- 00059 00061 struct Node : public CellTopologyTraits<0,0,0> 00062 { 00063 #ifndef DOXYGEN_COMPILE 00064 typedef Node base ; 00065 #endif /* DOXYGEN_COMPILE */ 00066 }; 00067 00069 template<> const CellTopologyData * getCellTopologyData< Node >(); 00070 00071 //---------------------------------------------------------------------- 00072 00074 struct Particle : public CellTopologyTraits<1,1,1> 00075 { 00076 #ifndef DOXYGEN_COMPILE 00077 typedef Particle base ; 00078 #endif /* DOXYGEN_COMPILE */ 00079 }; 00080 00082 template<> const CellTopologyData * getCellTopologyData< Particle >(); 00083 00084 //---------------------------------------------------------------------- 00085 00091 template< unsigned NodeCount = 2 > struct Line {}; 00092 00094 template<> const CellTopologyData * getCellTopologyData< Line<2> >(); 00095 00097 template<> const CellTopologyData * getCellTopologyData< Line<3> >(); 00098 00099 //---------------------------------------------------------------------- 00100 00106 template< unsigned NodeCount = 2 > struct Beam {}; 00107 00109 template<> const CellTopologyData * getCellTopologyData< Beam<2> >(); 00110 00112 template<> const CellTopologyData * getCellTopologyData< Beam<3> >(); 00113 00114 //---------------------------------------------------------------------- 00115 00121 template< unsigned NodeCount = 2 > struct ShellLine {}; 00122 00124 template<> const CellTopologyData * getCellTopologyData< ShellLine<2> >(); 00125 00127 template<> const CellTopologyData * getCellTopologyData< ShellLine<3> >(); 00128 00129 //---------------------------------------------------------------------- 00130 00153 template< unsigned NodeCount = 3 > struct Triangle {}; 00154 00156 template<> const CellTopologyData * getCellTopologyData< Triangle<3> >(); 00157 00159 template<> const CellTopologyData * getCellTopologyData< Triangle<6> >(); 00160 00162 template<> const CellTopologyData * getCellTopologyData< Triangle<4> >(); 00163 00164 //---------------------------------------------------------------------- 00165 00171 template< unsigned NodeCount = 3 > struct ShellTriangle {}; 00172 00174 template<> const CellTopologyData * getCellTopologyData< ShellTriangle<3> >(); 00175 00177 template<> const CellTopologyData * getCellTopologyData< ShellTriangle<6> >(); 00178 00179 //---------------------------------------------------------------------- 00202 template< unsigned NodeCount = 4 > struct Quadrilateral {}; 00203 00205 template<> const CellTopologyData * getCellTopologyData< Quadrilateral<4> >(); 00206 00208 template<> const CellTopologyData * getCellTopologyData< Quadrilateral<8> >(); 00209 00211 template<> const CellTopologyData * getCellTopologyData< Quadrilateral<9> >(); 00212 00213 //---------------------------------------------------------------------- 00214 00220 template< unsigned NodeCount = 4 > struct ShellQuadrilateral {}; 00221 00223 template<> const CellTopologyData * getCellTopologyData< ShellQuadrilateral<4> >(); 00224 00226 template<> const CellTopologyData * getCellTopologyData< ShellQuadrilateral<8> >(); 00227 00229 template<> const CellTopologyData * getCellTopologyData< ShellQuadrilateral<9> >(); 00230 00231 //---------------------------------------------------------------------- 00232 00236 template< unsigned NodeCount = 4 > struct Tetrahedron ; 00237 00239 template<> const CellTopologyData * getCellTopologyData< Tetrahedron<4> >(); 00240 00242 template<> const CellTopologyData * getCellTopologyData< Tetrahedron<10> >(); 00243 00245 template<> const CellTopologyData * getCellTopologyData< Tetrahedron<8> >(); 00246 00248 template<> const CellTopologyData * getCellTopologyData< Tetrahedron<11> >(); 00249 00250 //---------------------------------------------------------------------- 00251 00255 template< unsigned NodeCount = 5 > struct Pyramid {}; 00256 00258 template<> const CellTopologyData * getCellTopologyData< Pyramid<5> >(); 00259 00261 template<> const CellTopologyData * getCellTopologyData< Pyramid<13> >(); 00262 00264 template<> const CellTopologyData * getCellTopologyData< Pyramid<14> >(); 00265 00266 //---------------------------------------------------------------------- 00267 00271 template< unsigned NodeCount = 6 > struct Wedge {}; 00272 00274 template<> const CellTopologyData * getCellTopologyData< Wedge<6> >(); 00275 00277 template<> const CellTopologyData * getCellTopologyData< Wedge<15> >(); 00278 00280 template<> const CellTopologyData * getCellTopologyData< Wedge<18> >(); 00281 00282 //---------------------------------------------------------------------- 00283 00362 template< unsigned NodeCount = 8 > struct Hexahedron {}; 00363 00365 template<> const CellTopologyData * getCellTopologyData< Hexahedron<8> >(); 00366 00368 template<> const CellTopologyData * getCellTopologyData< Hexahedron<20> >(); 00369 00371 template<> const CellTopologyData * getCellTopologyData< Hexahedron<27> >(); 00372 00373 //---------------------------------------------------------------------- 00374 //---------------------------------------------------------------------- 00375 00376 #ifndef DOXYGEN_COMPILE 00377 00378 //---------------------------------------------------------------------- 00379 //---------------------------------------------------------------------- 00380 // Topologies for Rank-1 cells. 00381 00382 typedef IndexList< 0 , 1 , 2 > LineNodeMapIdentity ; 00383 typedef IndexList< 1 , 0 , 2 > LineNodeMapReversed ; 00384 00385 typedef MakeTypeList< LineNodeMapIdentity , LineNodeMapReversed >::type 00386 LineNodePermutation ; 00387 00388 typedef IndexList< CELL_PERMUTATION_POLARITY_POSITIVE, 00389 CELL_PERMUTATION_POLARITY_NEGATIVE > 00390 LineNodePermutationPolarity; 00391 00392 template<> struct Line<2> : public 00393 CellTopologyTraits< 1 , 2 , 2 , 00394 TypeListEnd, TypeListEnd, 00395 TypeListEnd, TypeListEnd, 00396 LineNodePermutation, 00397 LineNodePermutationPolarity > 00398 { typedef Line<2> base ; }; 00399 00400 template<> struct Line<3> : public 00401 CellTopologyTraits< 1 , 2 , 3 , 00402 TypeListEnd, TypeListEnd, 00403 TypeListEnd, TypeListEnd, 00404 LineNodePermutation, 00405 LineNodePermutationPolarity > 00406 { typedef Line<2> base ; }; 00407 00408 // Beam is a line with one edge: 00409 00410 typedef 00411 MakeTypeList< LineNodeMapIdentity >::type BeamEdgeNodeMap ; 00412 00413 template<> struct Beam<2> : public 00414 CellTopologyTraits< 2 , 2 , 2 , 00415 MakeTypeList< Line<2> >::type , 00416 BeamEdgeNodeMap > 00417 { typedef Beam<2> base ; }; 00418 00419 template<> struct Beam<3> : public 00420 CellTopologyTraits< 2 , 2 , 3 , 00421 MakeTypeList< Line<3> >::type , 00422 BeamEdgeNodeMap > 00423 { typedef Beam<2> base ; }; 00424 00425 // Shell-line has two edges: 00426 00427 typedef 00428 MakeTypeList< LineNodeMapIdentity , LineNodeMapReversed >::type 00429 ShellLineEdgeNodeMap ; 00430 00431 template<> struct ShellLine<2> : public 00432 CellTopologyTraits< 2 , 2 , 2 , 00433 MakeTypeList< Line<2> , Line<2> >::type , 00434 ShellLineEdgeNodeMap > 00435 { typedef ShellLine<2> base ; }; 00436 00437 template<> struct ShellLine<3> : public 00438 CellTopologyTraits< 2 , 2 , 3 , 00439 MakeTypeList< Line<3> , Line<3> >::type , 00440 ShellLineEdgeNodeMap > 00441 { typedef ShellLine<2> base ; }; 00442 00443 //---------------------------------------------------------------------- 00444 //---------------------------------------------------------------------- 00445 // Topologies for Rank-2 cells. 00446 00447 typedef IndexList< 0, 1, 2, 3, 4, 5 > TriangleNodeMapIdentity ; 00448 typedef IndexList< 2, 0, 1, 5, 3, 4 > TriangleNodeMapPositive1 ; 00449 typedef IndexList< 1, 2, 0, 4, 5, 3 > TriangleNodeMapPositive2 ; 00450 typedef IndexList< 0, 2, 1, 5, 4, 3 > TriangleNodeMapReversed0 ; 00451 typedef IndexList< 2, 1, 0, 4, 3, 5 > TriangleNodeMapReversed1 ; 00452 typedef IndexList< 1, 0, 2, 3, 5, 4 > TriangleNodeMapReversed2 ; 00453 00454 typedef MakeTypeList< TriangleNodeMapIdentity , 00455 TriangleNodeMapPositive1 , 00456 TriangleNodeMapPositive2 , 00457 TriangleNodeMapReversed0 , 00458 TriangleNodeMapReversed1 , 00459 TriangleNodeMapReversed2 >::type 00460 TriangleNodePermutation ; 00461 00462 typedef IndexList< CELL_PERMUTATION_POLARITY_POSITIVE, 00463 CELL_PERMUTATION_POLARITY_POSITIVE, 00464 CELL_PERMUTATION_POLARITY_POSITIVE, 00465 CELL_PERMUTATION_POLARITY_NEGATIVE, 00466 CELL_PERMUTATION_POLARITY_NEGATIVE, 00467 CELL_PERMUTATION_POLARITY_NEGATIVE > 00468 TriangleNodePermutationPolarity; 00469 00470 typedef MakeTypeList< IndexList< 0 , 1 , 3 > , 00471 IndexList< 1 , 2 , 4 > , 00472 IndexList< 2 , 0 , 5 > >::type 00473 TriangleEdgeNodeMap ; 00474 00475 template<> struct Triangle<3> : public 00476 CellTopologyTraits< 2 , 3 , 3 , 00477 MakeTypeList< Line<2> , 00478 Line<2> , 00479 Line<2> >::type , 00480 TriangleEdgeNodeMap , 00481 TypeListEnd , TypeListEnd , 00482 TriangleNodePermutation , 00483 TriangleNodePermutationPolarity > 00484 { typedef Triangle<3> base ; }; 00485 00486 template<> struct Triangle<6> : public 00487 CellTopologyTraits< 2 , 3 , 6 , 00488 MakeTypeList< Line<3> , 00489 Line<3> , 00490 Line<3> >::type , 00491 TriangleEdgeNodeMap , 00492 TypeListEnd , TypeListEnd , 00493 TriangleNodePermutation , 00494 TriangleNodePermutationPolarity > 00495 { typedef Triangle<3> base ; }; 00496 00497 typedef IndexList< 0, 1, 2, 3 > Triangle4_NodeMapIdentity ; 00498 typedef IndexList< 2, 0, 1, 3 > Triangle4_NodeMapPositive1 ; 00499 typedef IndexList< 1, 2, 0, 3 > Triangle4_NodeMapPositive2 ; 00500 typedef IndexList< 0, 2, 1, 3 > Triangle4_NodeMapReversed0 ; 00501 typedef IndexList< 2, 1, 0, 3 > Triangle4_NodeMapReversed1 ; 00502 typedef IndexList< 1, 0, 2, 3 > Triangle4_NodeMapReversed2 ; 00503 00504 typedef MakeTypeList< Triangle4_NodeMapIdentity , 00505 Triangle4_NodeMapPositive1 , 00506 Triangle4_NodeMapPositive2 , 00507 Triangle4_NodeMapReversed0 , 00508 Triangle4_NodeMapReversed1 , 00509 Triangle4_NodeMapReversed2 >::type 00510 Triangle4_NodePermutation ; 00511 00512 typedef IndexList< CELL_PERMUTATION_POLARITY_POSITIVE, 00513 CELL_PERMUTATION_POLARITY_POSITIVE, 00514 CELL_PERMUTATION_POLARITY_POSITIVE, 00515 CELL_PERMUTATION_POLARITY_NEGATIVE, 00516 CELL_PERMUTATION_POLARITY_NEGATIVE, 00517 CELL_PERMUTATION_POLARITY_NEGATIVE > 00518 Triangle4_NodePermutationPolarity; 00519 00520 template<> struct Triangle<4> : public 00521 CellTopologyTraits< 2 , 3 , 4 , 00522 MakeTypeList< Line<2> , 00523 Line<2> , 00524 Line<2> >::type , 00525 TriangleEdgeNodeMap , 00526 TypeListEnd , TypeListEnd , 00527 Triangle4_NodePermutation , 00528 Triangle4_NodePermutationPolarity > 00529 { typedef Triangle<3> base ; }; 00530 00531 //------------------------------------------------------------------------ 00532 00533 typedef MakeTypeList< TriangleNodeMapIdentity , 00534 TriangleNodeMapReversed0 >::type 00535 ShellTriangleFaceNodeMap ; 00536 00537 template<> struct ShellTriangle<3> : public 00538 CellTopologyTraits< 3 , 3 , 3 , 00539 MakeTypeList< Line<2> , 00540 Line<2> , 00541 Line<2> >::type , 00542 TriangleEdgeNodeMap , 00543 MakeTypeList< Triangle<3> , 00544 Triangle<3> >::type , 00545 ShellTriangleFaceNodeMap > 00546 { typedef ShellTriangle<3> base ; }; 00547 00548 template<> struct ShellTriangle<6> : public 00549 CellTopologyTraits< 3 , 3 , 6 , 00550 MakeTypeList< Line<3> , 00551 Line<3> , 00552 Line<3> >::type , 00553 TriangleEdgeNodeMap , 00554 MakeTypeList< Triangle<6> , 00555 Triangle<6> >::type , 00556 ShellTriangleFaceNodeMap > 00557 { typedef ShellTriangle<3> base ; }; 00558 00559 //---------------------------------------------------------------------- 00560 00561 // A permutation should either be the identity or reversed. 00562 // Simple (non-reversed) rotations should not happen in practice. 00563 00564 typedef IndexList< 0, 1, 2, 3, 4, 5, 6, 7, 8 > QuadrilateralNodeMapIdentity ; 00565 typedef IndexList< 3, 0, 1, 2, 7, 4, 5, 6, 8 > QuadrilateralNodeMapPositive1 ; 00566 typedef IndexList< 2, 3, 0, 1, 6, 7, 4, 5, 8 > QuadrilateralNodeMapPositive2 ; 00567 typedef IndexList< 1, 2, 3, 0, 5, 6, 7, 4, 8 > QuadrilateralNodeMapPositive3 ; 00568 typedef IndexList< 0, 3, 2, 1, 7, 6, 5, 4, 8 > QuadrilateralNodeMapReversed0 ; 00569 typedef IndexList< 3, 2, 1, 0, 6, 5, 4, 7, 8 > QuadrilateralNodeMapReversed1 ; 00570 typedef IndexList< 2, 1, 0, 3, 5, 4, 7, 6, 8 > QuadrilateralNodeMapReversed2 ; 00571 typedef IndexList< 1, 0, 3, 2, 4, 7, 6, 5, 8 > QuadrilateralNodeMapReversed3 ; 00572 00573 typedef MakeTypeList< QuadrilateralNodeMapIdentity , 00574 QuadrilateralNodeMapPositive1 , 00575 QuadrilateralNodeMapPositive2 , 00576 QuadrilateralNodeMapPositive3 , 00577 QuadrilateralNodeMapReversed0 , 00578 QuadrilateralNodeMapReversed1 , 00579 QuadrilateralNodeMapReversed2 , 00580 QuadrilateralNodeMapReversed3 >::type 00581 QuadrilateralNodePermutation ; 00582 00583 typedef IndexList< CELL_PERMUTATION_POLARITY_POSITIVE, 00584 CELL_PERMUTATION_POLARITY_POSITIVE, 00585 CELL_PERMUTATION_POLARITY_POSITIVE, 00586 CELL_PERMUTATION_POLARITY_POSITIVE, 00587 CELL_PERMUTATION_POLARITY_NEGATIVE, 00588 CELL_PERMUTATION_POLARITY_NEGATIVE, 00589 CELL_PERMUTATION_POLARITY_NEGATIVE, 00590 CELL_PERMUTATION_POLARITY_NEGATIVE > 00591 QuadrilateralNodePermutationPolarity; 00592 00593 typedef MakeTypeList< IndexList< 0 , 1 , 4 > , 00594 IndexList< 1 , 2 , 5 > , 00595 IndexList< 2 , 3 , 6 > , 00596 IndexList< 3 , 0 , 7 > >::type 00597 QuadrilateralEdgeNodeMap ; 00598 00599 template<> struct Quadrilateral<4> : public 00600 CellTopologyTraits< 2 , 4 , 4 , 00601 MakeTypeList< Line<2> , 00602 Line<2> , 00603 Line<2> , 00604 Line<2> >::type , 00605 QuadrilateralEdgeNodeMap , 00606 TypeListEnd , TypeListEnd , 00607 QuadrilateralNodePermutation , 00608 QuadrilateralNodePermutationPolarity > 00609 { typedef Quadrilateral<4> base ; }; 00610 00611 template<> struct Quadrilateral<8> : public 00612 CellTopologyTraits< 2 , 4 , 8 , 00613 MakeTypeList< Line<3> , 00614 Line<3> , 00615 Line<3> , 00616 Line<3> >::type , 00617 QuadrilateralEdgeNodeMap , 00618 TypeListEnd , TypeListEnd , 00619 QuadrilateralNodePermutation , 00620 QuadrilateralNodePermutationPolarity > 00621 { typedef Quadrilateral<4> base ; }; 00622 00623 template<> struct Quadrilateral<9> : public 00624 CellTopologyTraits< 2 , 4 , 9 , 00625 MakeTypeList< Line<3> , 00626 Line<3> , 00627 Line<3> , 00628 Line<3> >::type , 00629 QuadrilateralEdgeNodeMap , 00630 TypeListEnd , TypeListEnd , 00631 QuadrilateralNodePermutation , 00632 QuadrilateralNodePermutationPolarity > 00633 { typedef Quadrilateral<4> base ; }; 00634 00635 //---------------------------------------------------------------------- 00636 00637 typedef MakeTypeList< QuadrilateralNodeMapIdentity , 00638 QuadrilateralNodeMapReversed0 >::type 00639 ShellQuadrilateralFaceNodeMap ; 00640 00641 template<> struct ShellQuadrilateral<4> : public 00642 CellTopologyTraits< 3 , 4 , 4 , 00643 MakeTypeList< Line<2> , 00644 Line<2> , 00645 Line<2> , 00646 Line<2> >::type , 00647 QuadrilateralEdgeNodeMap , 00648 MakeTypeList< Quadrilateral<4> , 00649 Quadrilateral<4> >::type , 00650 ShellQuadrilateralFaceNodeMap > 00651 { typedef ShellQuadrilateral<4> base ; }; 00652 00653 template<> struct ShellQuadrilateral<8> : public 00654 CellTopologyTraits< 3 , 4 , 8 , 00655 MakeTypeList< Line<3> , 00656 Line<3> , 00657 Line<3> , 00658 Line<3> >::type , 00659 QuadrilateralEdgeNodeMap , 00660 MakeTypeList< Quadrilateral<8> , 00661 Quadrilateral<8> >::type , 00662 ShellQuadrilateralFaceNodeMap > 00663 { typedef ShellQuadrilateral<4> base ; }; 00664 00665 template<> struct ShellQuadrilateral<9> : public 00666 CellTopologyTraits< 3 , 4 , 9 , 00667 MakeTypeList< Line<3> , 00668 Line<3> , 00669 Line<3> , 00670 Line<3> >::type , 00671 QuadrilateralEdgeNodeMap , 00672 MakeTypeList< Quadrilateral<9> , 00673 Quadrilateral<9> >::type , 00674 ShellQuadrilateralFaceNodeMap > 00675 { typedef ShellQuadrilateral<4> base ; }; 00676 00677 //------------------------------------------------------------------------ 00678 00679 typedef MakeTypeList< IndexList< 0 , 1 , 4 > , 00680 IndexList< 1 , 2 , 5 > , 00681 IndexList< 2 , 0 , 6 > , 00682 IndexList< 0 , 3 , 7 > , 00683 IndexList< 1 , 3 , 8 > , 00684 IndexList< 2 , 3 , 9 > >::type 00685 TetrahedronEdgeNodeMap ; 00686 00687 typedef MakeTypeList< IndexList< 0 , 1 , 3 , 4 , 8 , 7 > , 00688 IndexList< 1 , 2 , 3 , 5 , 9 , 8 > , 00689 IndexList< 0 , 3 , 2 , 7 , 9 , 6 > , 00690 IndexList< 0 , 2 , 1 , 6 , 5 , 4 > >::type 00691 TetrahedronSideNodeMap ; 00692 00693 template<> struct Tetrahedron<4> : public 00694 CellTopologyTraits< 3 , 4 , 4 , 00695 MakeTypeList< Line<2> , 00696 Line<2> , 00697 Line<2> , 00698 Line<2> , 00699 Line<2> , 00700 Line<2> >::type , 00701 TetrahedronEdgeNodeMap , 00702 MakeTypeList< Triangle<3> , 00703 Triangle<3> , 00704 Triangle<3> , 00705 Triangle<3> >::type , 00706 TetrahedronSideNodeMap > 00707 { typedef Tetrahedron<4> base ; }; 00708 00709 template<> struct Tetrahedron<10> : public 00710 CellTopologyTraits< 3 , 4 , 10 , 00711 MakeTypeList< Line<3> , 00712 Line<3> , 00713 Line<3> , 00714 Line<3> , 00715 Line<3> , 00716 Line<3> >::type , 00717 TetrahedronEdgeNodeMap , 00718 MakeTypeList< Triangle<6> , 00719 Triangle<6> , 00720 Triangle<6> , 00721 Triangle<6> >::type , 00722 TetrahedronSideNodeMap > 00723 { typedef Tetrahedron<4> base ; }; 00724 00725 template<> struct Tetrahedron<11> : public 00726 CellTopologyTraits< 3 , 4 , 11 , 00727 MakeTypeList< Line<3> , 00728 Line<3> , 00729 Line<3> , 00730 Line<3> , 00731 Line<3> , 00732 Line<3> >::type , 00733 TetrahedronEdgeNodeMap , 00734 MakeTypeList< Triangle<6> , 00735 Triangle<6> , 00736 Triangle<6> , 00737 Triangle<6> >::type , 00738 TetrahedronSideNodeMap > 00739 { typedef Tetrahedron<4> base ; }; 00740 00741 template<> struct Tetrahedron<8> : public 00742 CellTopologyTraits< 3 , 4 , 8 , 00743 MakeTypeList< Line<2> , 00744 Line<2> , 00745 Line<2> , 00746 Line<2> , 00747 Line<2> , 00748 Line<2> >::type , 00749 TetrahedronEdgeNodeMap , 00750 MakeTypeList< Triangle<4> , 00751 Triangle<4> , 00752 Triangle<4> , 00753 Triangle<4> >::type , 00754 TetrahedronSideNodeMap > 00755 { typedef Tetrahedron<4> base ; }; 00756 00757 //------------------------------------------------------------------------ 00758 00759 typedef 00760 MakeTypeList< IndexList< 0 , 1 , 5 > , 00761 IndexList< 1 , 2 , 6 > , 00762 IndexList< 2 , 3 , 7 > , 00763 IndexList< 3 , 0 , 8 > , 00764 IndexList< 0 , 4 , 9 > , 00765 IndexList< 1 , 4 , 10 > , 00766 IndexList< 2 , 4 , 11 > , 00767 IndexList< 3 , 4 , 12 > >::type 00768 PyramidEdgeNodeMap ; 00769 00770 typedef 00771 MakeTypeList< IndexList< 0, 1, 4, 5, 10, 9 > , 00772 IndexList< 1, 2, 4, 6, 11, 10 > , 00773 IndexList< 2, 3, 4, 7, 12, 11 > , 00774 IndexList< 3, 0, 4, 8, 9, 12 > , 00775 IndexList< 0, 3, 2, 1, 8, 7, 6, 5, 13 > >::type 00776 PyramidFaceNodeMap ; 00777 00778 template<> struct Pyramid<5> : public 00779 CellTopologyTraits< 3 , 5 , 5 , 00780 MakeTypeList< Line<2> , 00781 Line<2> , 00782 Line<2> , 00783 Line<2> , 00784 Line<2> , 00785 Line<2> , 00786 Line<2> , 00787 Line<2> >::type , 00788 PyramidEdgeNodeMap , 00789 MakeTypeList< Triangle<3> , 00790 Triangle<3> , 00791 Triangle<3> , 00792 Triangle<3> , 00793 Quadrilateral<4> >::type , 00794 PyramidFaceNodeMap > 00795 { typedef Pyramid<5> base ; }; 00796 00797 template<> struct Pyramid<13> : public 00798 CellTopologyTraits< 3 , 5 , 13 , 00799 MakeTypeList< Line<3> , 00800 Line<3> , 00801 Line<3> , 00802 Line<3> , 00803 Line<3> , 00804 Line<3> , 00805 Line<3> , 00806 Line<3> >::type , 00807 PyramidEdgeNodeMap , 00808 MakeTypeList< Triangle<6> , 00809 Triangle<6> , 00810 Triangle<6> , 00811 Triangle<6> , 00812 Quadrilateral<8> >::type , 00813 PyramidFaceNodeMap > 00814 { typedef Pyramid<5> base ; }; 00815 00816 template<> struct Pyramid<14> : public 00817 CellTopologyTraits< 3 , 5 , 14 , 00818 MakeTypeList< Line<3> , 00819 Line<3> , 00820 Line<3> , 00821 Line<3> , 00822 Line<3> , 00823 Line<3> , 00824 Line<3> , 00825 Line<3> >::type , 00826 PyramidEdgeNodeMap , 00827 MakeTypeList< Triangle<6> , 00828 Triangle<6> , 00829 Triangle<6> , 00830 Triangle<6> , 00831 Quadrilateral<9> >::type , 00832 PyramidFaceNodeMap > 00833 { typedef Pyramid<5> base ; }; 00834 00835 //------------------------------------------------------------------------ 00836 00837 typedef 00838 MakeTypeList< IndexList< 0 , 1 , 6 > , 00839 IndexList< 1 , 2 , 7 > , 00840 IndexList< 2 , 0 , 8 > , 00841 IndexList< 3 , 4 , 12 > , 00842 IndexList< 4 , 5 , 13 > , 00843 IndexList< 5 , 3 , 14 > , 00844 IndexList< 0 , 3 , 9 > , 00845 IndexList< 1 , 4 , 10 > , 00846 IndexList< 2 , 5 , 11 > 00847 >::type WedgeEdgeNodeMap ; 00848 00849 typedef 00850 MakeTypeList< IndexList< 0 , 1 , 4 , 3 , 6 , 10 , 12 , 9 , 15 > , 00851 IndexList< 1 , 2 , 5 , 4 , 7 , 11 , 13 , 10 , 16 > , 00852 IndexList< 0 , 3 , 5 , 2 , 9 , 14 , 11 , 8 , 17 > , 00853 IndexList< 0 , 2 , 1 , 8 , 7 , 6 > , 00854 IndexList< 3 , 4 , 5 , 12 , 13 , 14 > 00855 >::type WedgeFaceNodeMap ; 00856 00857 template<> struct Wedge<6> : public 00858 CellTopologyTraits< 3 , 6 , 6 , 00859 MakeTypeList< Line<2> , 00860 Line<2> , 00861 Line<2> , 00862 Line<2> , 00863 Line<2> , 00864 Line<2> , 00865 Line<2> , 00866 Line<2> , 00867 Line<2> >::type , 00868 WedgeEdgeNodeMap , 00869 MakeTypeList< Quadrilateral<4> , 00870 Quadrilateral<4> , 00871 Quadrilateral<4> , 00872 Triangle<3> , 00873 Triangle<3> >::type , 00874 WedgeFaceNodeMap > 00875 { typedef Wedge<6> base ; }; 00876 00877 template<> struct Wedge<15> : public 00878 CellTopologyTraits< 3 , 6 , 15 , 00879 MakeTypeList< Line<3> , 00880 Line<3> , 00881 Line<3> , 00882 Line<3> , 00883 Line<3> , 00884 Line<3> , 00885 Line<3> , 00886 Line<3> , 00887 Line<3> >::type , 00888 WedgeEdgeNodeMap , 00889 MakeTypeList< Quadrilateral<8> , 00890 Quadrilateral<8> , 00891 Quadrilateral<8> , 00892 Triangle<6> , 00893 Triangle<6> >::type , 00894 WedgeFaceNodeMap > 00895 { typedef Wedge<6> base ; }; 00896 00897 template<> struct Wedge<18> : public 00898 CellTopologyTraits< 3 , 6 , 18 , 00899 MakeTypeList< Line<3> , 00900 Line<3> , 00901 Line<3> , 00902 Line<3> , 00903 Line<3> , 00904 Line<3> , 00905 Line<3> , 00906 Line<3> , 00907 Line<3> >::type , 00908 WedgeEdgeNodeMap , 00909 MakeTypeList< Quadrilateral<9> , 00910 Quadrilateral<9> , 00911 Quadrilateral<9> , 00912 Triangle<6> , 00913 Triangle<6> >::type , 00914 WedgeFaceNodeMap > 00915 { typedef Wedge<6> base ; }; 00916 00917 //------------------------------------------------------------------------ 00918 00919 typedef 00920 MakeTypeList< IndexList< 0 , 1 , 8 > , 00921 IndexList< 1 , 2 , 9 > , 00922 IndexList< 2 , 3 , 10 > , 00923 IndexList< 3 , 0 , 11 > , 00924 IndexList< 4 , 5 , 16 > , 00925 IndexList< 5 , 6 , 17 > , 00926 IndexList< 6 , 7 , 18 > , 00927 IndexList< 7 , 4 , 19 > , 00928 IndexList< 0 , 4 , 12 > , 00929 IndexList< 1 , 5 , 13 > , 00930 IndexList< 2 , 6 , 14 > , 00931 IndexList< 3 , 7 , 15 > >::type 00932 HexahedronEdgeNodeMap ; 00933 00934 typedef 00935 MakeTypeList< IndexList< 0, 1, 5, 4, 8, 13, 16, 12, 25 > , 00936 IndexList< 1, 2, 6, 5, 9, 14, 17, 13, 24 > , 00937 IndexList< 2, 3, 7, 6, 10, 15, 18, 14, 26 > , 00938 IndexList< 0, 4, 7, 3, 12, 19, 15, 11, 23 > , 00939 IndexList< 0, 3, 2, 1, 11, 10, 9, 8, 21 > , 00940 IndexList< 4, 5, 6, 7, 16, 17, 18, 19, 22 > >::type 00941 HexahedronFaceNodeMap ; 00942 00943 //---------------------------------------------------------------------- 00944 00945 template<> struct Hexahedron<8> : public 00946 CellTopologyTraits< 3 , 8 , 8 , 00947 MakeTypeList< Line<2> , 00948 Line<2> , 00949 Line<2> , 00950 Line<2> , 00951 Line<2> , 00952 Line<2> , 00953 Line<2> , 00954 Line<2> , 00955 Line<2> , 00956 Line<2> , 00957 Line<2> , 00958 Line<2> >::type , 00959 HexahedronEdgeNodeMap , 00960 MakeTypeList< Quadrilateral<4> , 00961 Quadrilateral<4> , 00962 Quadrilateral<4> , 00963 Quadrilateral<4> , 00964 Quadrilateral<4> , 00965 Quadrilateral<4> >::type , 00966 HexahedronFaceNodeMap > 00967 { 00968 typedef Hexahedron<8> base ; 00969 }; 00970 00971 template<> struct Hexahedron<20> : public 00972 CellTopologyTraits< 3 , 8 , 20 , 00973 MakeTypeList< Line<3> , 00974 Line<3> , 00975 Line<3> , 00976 Line<3> , 00977 Line<3> , 00978 Line<3> , 00979 Line<3> , 00980 Line<3> , 00981 Line<3> , 00982 Line<3> , 00983 Line<3> , 00984 Line<3> >::type , 00985 HexahedronEdgeNodeMap , 00986 MakeTypeList< Quadrilateral<8> , 00987 Quadrilateral<8> , 00988 Quadrilateral<8> , 00989 Quadrilateral<8> , 00990 Quadrilateral<8> , 00991 Quadrilateral<8> >::type , 00992 HexahedronFaceNodeMap > 00993 { 00994 typedef Hexahedron<8> base ; 00995 }; 00996 00997 template<> struct Hexahedron<27> : public 00998 CellTopologyTraits< 3 , 8 , 27 , 00999 MakeTypeList< Line<3> , 01000 Line<3> , 01001 Line<3> , 01002 Line<3> , 01003 Line<3> , 01004 Line<3> , 01005 Line<3> , 01006 Line<3> , 01007 Line<3> , 01008 Line<3> , 01009 Line<3> , 01010 Line<3> >::type , 01011 HexahedronEdgeNodeMap , 01012 MakeTypeList< Quadrilateral<9> , 01013 Quadrilateral<9> , 01014 Quadrilateral<9> , 01015 Quadrilateral<9> , 01016 Quadrilateral<9> , 01017 Quadrilateral<9> >::type , 01018 HexahedronFaceNodeMap > 01019 { 01020 typedef Hexahedron<8> base ; 01021 }; 01022 01023 //---------------------------------------------------------------------- 01024 // Polygons 01025 //---------------------------------------------------------------------- 01026 01031 template< unsigned NodeCount = 5 > struct Pentagon {}; 01032 01035 template<> const CellTopologyData * getCellTopologyData< Pentagon<5> >(); 01036 01037 // Describe vertex to edge connectivity 01038 typedef 01039 MakeTypeList< IndexList< 0 , 1 > , 01040 IndexList< 1 , 2 > , 01041 IndexList< 2 , 3 > , 01042 IndexList< 3 , 4 > , 01043 IndexList< 4 , 0 > >::type PentagonEdgeNodeMap ; 01044 01045 template<> struct Pentagon<5> : public 01046 CellTopologyTraits< 2 , 5 , 5 , 01047 MakeTypeList< Line<2> , 01048 Line<2> , 01049 Line<2> , 01050 Line<2> , 01051 Line<2> >::type , 01052 PentagonEdgeNodeMap > 01053 { 01054 typedef Pentagon<5> base ; 01055 }; 01056 01057 //---------------------------------------------------------------------- 01058 01063 template< unsigned NodeCount = 6 > struct Hexagon {}; 01064 01067 template<> const CellTopologyData * getCellTopologyData< Hexagon<6> >(); 01068 01069 // Describe vertex to edge connectivity 01070 typedef 01071 MakeTypeList< IndexList< 0 , 1 > , 01072 IndexList< 1 , 2 > , 01073 IndexList< 2 , 3 > , 01074 IndexList< 3 , 4 > , 01075 IndexList< 4 , 5 > , 01076 IndexList< 5 , 0> >::type HexagonEdgeNodeMap ; 01077 01078 template<> struct Hexagon<6> : public 01079 CellTopologyTraits< 2 , 6 , 6 , 01080 MakeTypeList< Line<2> , 01081 Line<2> , 01082 Line<2> , 01083 Line<2> , 01084 Line<2> , 01085 Line<2> >::type , 01086 HexagonEdgeNodeMap > 01087 { 01088 typedef Hexagon<6> base ; 01089 }; 01090 01091 //------------------------------------------------------------------------ 01093 template< class Traits > struct BasicTopologyOf ; 01094 01096 template<> struct BasicTopologyOf< Node::Traits > 01097 { typedef Node type ; }; 01098 01100 template<> struct BasicTopologyOf< Particle::Traits > 01101 { typedef Particle type ; }; 01102 01104 template<> struct BasicTopologyOf< Line<2>::Traits > 01105 { typedef Line<2> type ; }; 01106 01108 template<> struct BasicTopologyOf< Line<3>::Traits > 01109 { typedef Line<3> type ; }; 01110 01112 template<> struct BasicTopologyOf< Beam<2>::Traits > 01113 { typedef Beam<2> type ; }; 01114 01116 template<> struct BasicTopologyOf< Beam<3>::Traits > 01117 { typedef Beam<3> type ; }; 01118 01120 template<> struct BasicTopologyOf< ShellLine<2>::Traits > 01121 { typedef ShellLine<2> type ; }; 01122 01124 template<> struct BasicTopologyOf< ShellLine<3>::Traits > 01125 { typedef ShellLine<3> type ; }; 01126 01128 template<> struct BasicTopologyOf< Triangle<3>::Traits > 01129 { typedef Triangle<3> type ; }; 01130 01132 template<> struct BasicTopologyOf< Triangle<6>::Traits > 01133 { typedef Triangle<6> type ; }; 01134 01136 template<> struct BasicTopologyOf< Triangle<4>::Traits > 01137 { typedef Triangle<4> type ; }; 01138 01140 template<> struct BasicTopologyOf< Quadrilateral<4>::Traits > 01141 { typedef Quadrilateral<4> type ; }; 01142 01144 template<> struct BasicTopologyOf< Quadrilateral<8>::Traits > 01145 { typedef Quadrilateral<8> type ; }; 01146 01148 template<> struct BasicTopologyOf< Quadrilateral<9>::Traits > 01149 { typedef Quadrilateral<9> type ; }; 01150 01152 template<> struct BasicTopologyOf< Pentagon<5>::Traits > 01153 { typedef Pentagon<5> type ; }; 01154 01156 template<> struct BasicTopologyOf< Hexagon<6>::Traits > 01157 { typedef Hexagon<6> type ; }; 01158 01160 template<> struct BasicTopologyOf< Tetrahedron<4>::Traits > 01161 { typedef Tetrahedron<4> type ; }; 01162 01164 template<> struct BasicTopologyOf< Tetrahedron<10>::Traits > 01165 { typedef Tetrahedron<10> type ; }; 01166 01168 template<> struct BasicTopologyOf< Tetrahedron<11>::Traits > 01169 { typedef Tetrahedron<11> type ; }; 01170 01172 template<> struct BasicTopologyOf< Tetrahedron<8>::Traits > 01173 { typedef Tetrahedron<8> type ; }; 01174 01176 template<> struct BasicTopologyOf< Pyramid<5>::Traits > 01177 { typedef Tetrahedron<5> type ; }; 01178 01180 template<> struct BasicTopologyOf< Pyramid<13>::Traits > 01181 { typedef Tetrahedron<13> type ; }; 01182 01184 template<> struct BasicTopologyOf< Pyramid<14>::Traits > 01185 { typedef Tetrahedron<14> type ; }; 01186 01188 template<> struct BasicTopologyOf< Wedge<6>::Traits > 01189 { typedef Wedge<6> type ; }; 01190 01192 template<> struct BasicTopologyOf< Wedge<15>::Traits > 01193 { typedef Wedge<15> type ; }; 01194 01196 template<> struct BasicTopologyOf< Wedge<18>::Traits > 01197 { typedef Wedge<18> type ; }; 01198 01200 template<> struct BasicTopologyOf< Hexahedron<8>::Traits > 01201 { typedef Hexahedron<8> type ; }; 01202 01204 template<> struct BasicTopologyOf< Hexahedron<20>::Traits > 01205 { typedef Hexahedron<20> type ; }; 01206 01208 template<> struct BasicTopologyOf< Hexahedron<27>::Traits > 01209 { typedef Hexahedron<27> type ; }; 01210 01211 //------------------------------------------------------------------------ 01215 const unsigned * index_identity_array(); 01216 01217 01226 const struct CellTopologyData_Subcell * subcell_nodes_array(); 01227 01230 std::ostream & operator << ( std::ostream &, const CellTopologyData &); 01231 01232 #endif /* DOXYGEN_COMPILE */ 01233 01235 } // namespace shards 01236 01237 #endif // Shards_BasicTopologies_hpp 01238