/usr/include/trilinos/Shards_CellTopologyData.h is in libtrilinos-shards-dev 12.10.1-3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 | /*
//@HEADER
// ************************************************************************
//
// Shards : Shared Discretization Tools
// Copyright 2008 Sandia Corporation
//
// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
// the U.S. Government retains certain rights in this software.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// 1. Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
//
// 2. Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
//
// 3. Neither the name of the Corporation nor the names of the
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// Questions? Contact Carter Edwards (hcedwar@sandia.gov),
// Pavel Bochev (pbboche@sandia.gov), or
// Denis Ridzal (dridzal@sandia.gov).
//
// ************************************************************************
//@HEADER
*/
#ifndef Shards_CellTopologyData_h
#define Shards_CellTopologyData_h
#if defined( __cplusplus )
extern "C" {
#endif
/** \addtogroup shards_package_cell_topology
* \{
*/
/*----------------------------------------------------------------------*/
struct CellTopologyData ;
struct CellTopologyData_Subcell ;
struct CellTopologyData_Permutation ;
/** \brief A simple 'C' struct of cell topology attributes.
*
* The topology may be extended such that the number of nodes
* (subcells of dimension zero) is greater than the number of
* vertices. In this case the vertices must be ordered first.
*
* Nodes, edges, and sides are subcells with a particular dimension.
* A cell has edges and sides only if its dimension is greater than one.
* - node has Dim == 0
* - edge has Dim == 1
* - side has Dim == dimension - 1.
*/
struct CellTopologyData {
/** \brief Base, a.k.a. not-extended, version of this topology
* where vertex_count == node_count.
*/
const struct CellTopologyData * base ;
/** \brief Intuitive name for this topology */
const char * name ;
/** \brief Unique key for this topology */
unsigned key ;
/** \brief Topological dimension */
unsigned dimension ;
/** \brief Number of vertices. */
unsigned vertex_count ;
/** \brief Number of nodes (a.k.a. \f$ {Cell}^{0} \f$ subcells).
*
* A topology is <em> extended </em> if node_count > vertex_count
*/
unsigned node_count ;
/** \brief Number of edges (a.k.a. \f$ {Cell}^{1} \f$ boundary subcells). */
unsigned edge_count ;
/** \brief Number of sides (a.k.a. \f$ {Cell}^{D-1} \f$ boundary subcells). */
unsigned side_count ;
/** \brief Number of defined permutations */
unsigned permutation_count ;
/** \brief Flag if the subcells of a given dimension are homogeneous */
unsigned subcell_homogeneity[4] ;
/** \brief Number of subcells of each dimension. */
unsigned subcell_count[4] ;
/** \brief Array of subcells of each dimension
*
* The length of each subcell array is subcell_count[Dim]
* - <b> subcell[Dim][Ord].topology </b> topology of the subcell
* - <b> subcell[Dim][Ord].node[I] </b> node ordinal of the subcell's node I
*/
const struct CellTopologyData_Subcell * subcell[4] ;
/** \brief Array of side subcells of length side_count
*
* The length of the side array is side_count
* - <b> side[Ord].topology </b> topology of the side
* - <b> side[Ord].node[I] </b> node ordinal of the side's node I
*/
const struct CellTopologyData_Subcell * side ;
/** \brief Array of edges subcells of length edge_count
*
* The length of the edge array is edge_count
* - <b> edge[Ord].topology </b> topology of the edge
* - <b> edge[Ord].node[I] </b> node ordinal of the edge's node I
*/
const struct CellTopologyData_Subcell * edge ;
/** \brief Array of node permutations.
*
* - required: 0 <= P < permutation_count
* - required: 0 <= I < node_count
*
* Let ParentCell be dimension D and SubCell be dimension dim < D.
* Let SubCell be connected as subcell Ord with permutation P.
*
* Then <b> ParentCell.node(K) == SubCell.node(I) </b> where:
* - SubCellTopology == ParentCellTopology->subcell[dim][Ord].topology
* - K = ParentCellTopology->subcell[dim][Ord].node[IP]
* - IP = SubCellTopology->permutation[P].node[I]
* - I = SubCellTopology->permutation_inverse[P].node[IP]
*
* The permutation map for P == 0 is required to be identity.
*/
const struct CellTopologyData_Permutation * permutation ;
const struct CellTopologyData_Permutation * permutation_inverse ;
};
/** \brief Subcell information.
*
* - required: 0 <= Dim <= 3
* - required: 0 <= Ord <= subcell_count[Dim]
* - required: 0 <= J < subcell[Dim][Ord]->subcell_count[0]
* - subcell[Dim][Ord].topology
* - subcell[Dim][Ord].node[J]
*/
struct CellTopologyData_Subcell {
/** \brief Subcell topology */
const struct CellTopologyData * topology ;
/** \brief Subcell indexing of \f$ {Cell}^{0} \f$
* with respect to parent cell. */
const unsigned * node ;
};
/** \brief Self-typedef */
typedef struct CellTopologyData CellTopologyData ;
/** \brief Array of node permutations.
*
* - required: 0 <= P < permutation_count
* - required: 0 <= I < node_count
*
* Let ParentCell be dimension D and SubCell be dimension dim < D.
* Let SubCell be connected as subcell Ord with permutation P.
*
* Then <b> ParentCell.node(K) == SubCell.node(I) </b> where:
* - SubCellTopology == ParentCellTopology->subcell[dim][Ord].topology
* - K = ParentCellTopology->subcell[dim][Ord].node[IP]
* - IP = SubCellTopology->permutation[P].node[I]
* - I = SubCellTopology->permutation_inverse[P].node[IP]
*
* The permutation map for P == 0 is required to be identity.
*/
struct CellTopologyData_Permutation {
const unsigned * node ;
unsigned polarity ;
};
/** \brief Values for the CellTopologyData_Permutation polarity */
enum {
CELL_PERMUTATION_POLARITY_IRRELEVANT = 0 ,
CELL_PERMUTATION_POLARITY_POSITIVE = 1 ,
CELL_PERMUTATION_POLARITY_NEGATIVE = 2
};
/** \brief Map a cell->face->edge ordinal to the cell->edge ordinal.
* Return -1 for erroneous input.
*/
extern
int mapCellFaceEdge( const CellTopologyData * cell_topology ,
unsigned face_ordinal ,
unsigned face_edge_ordinal );
/** \} */
#if defined( __cplusplus )
} /* extern "C" */
#endif
#endif /* Shards_CellTopologyData_h */
|