|
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_CellTopologyData_h 00047 #define Shards_CellTopologyData_h 00048 00049 #if defined( __cplusplus ) 00050 extern "C" { 00051 #endif 00052 00057 /*----------------------------------------------------------------------*/ 00058 00059 struct CellTopologyData ; 00060 struct CellTopologyData_Subcell ; 00061 struct CellTopologyData_Permutation ; 00062 00075 struct CellTopologyData { 00079 const struct CellTopologyData * base ; 00080 00082 const char * name ; 00083 00085 unsigned key ; 00086 00088 unsigned dimension ; 00089 00091 unsigned vertex_count ; 00092 00097 unsigned node_count ; 00098 00100 unsigned edge_count ; 00101 00103 unsigned side_count ; 00104 00106 unsigned permutation_count ; 00107 00109 unsigned subcell_homogeneity[4] ; 00110 00112 unsigned subcell_count[4] ; 00113 00120 const struct CellTopologyData_Subcell * subcell[4] ; 00121 00128 const struct CellTopologyData_Subcell * side ; 00129 00136 const struct CellTopologyData_Subcell * edge ; 00137 00154 const struct CellTopologyData_Permutation * permutation ; 00155 const struct CellTopologyData_Permutation * permutation_inverse ; 00156 }; 00157 00166 struct CellTopologyData_Subcell { 00168 const struct CellTopologyData * topology ; 00169 00172 const unsigned * node ; 00173 }; 00174 00176 typedef struct CellTopologyData CellTopologyData ; 00177 00194 struct CellTopologyData_Permutation { 00195 const unsigned * node ; 00196 unsigned polarity ; 00197 }; 00198 00200 enum { 00201 CELL_PERMUTATION_POLARITY_IRRELEVANT = 0 , 00202 CELL_PERMUTATION_POLARITY_POSITIVE = 1 , 00203 CELL_PERMUTATION_POLARITY_NEGATIVE = 2 00204 }; 00205 00209 extern 00210 int mapCellFaceEdge( const CellTopologyData * cell_topology , 00211 unsigned face_ordinal , 00212 unsigned face_edge_ordinal ); 00213 00216 #if defined( __cplusplus ) 00217 } /* extern "C" */ 00218 #endif 00219 00220 #endif /* Shards_CellTopologyData_h */ 00221