shards Version of the Day
Loading...
Searching...
No Matches
Shards_CellTopologyData.h
1/*
2//@HEADER
3// ************************************************************************
4//
5// Shards : Shared Discretization Tools
6// Copyright 2008 Sandia Corporation
7//
8// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
9// the U.S. Government retains certain rights in this software.
10//
11// Redistribution and use in source and binary forms, with or without
12// modification, are permitted provided that the following conditions are
13// met:
14//
15// 1. Redistributions of source code must retain the above copyright
16// notice, this list of conditions and the following disclaimer.
17//
18// 2. Redistributions in binary form must reproduce the above copyright
19// notice, this list of conditions and the following disclaimer in the
20// documentation and/or other materials provided with the distribution.
21//
22// 3. Neither the name of the Corporation nor the names of the
23// contributors may be used to endorse or promote products derived from
24// this software without specific prior written permission.
25//
26// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
27// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
28// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
29// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
30// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
31// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
32// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
33// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
34// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
35// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
36// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
37//
38// Questions? Contact Carter Edwards (hcedwar@sandia.gov),
39// Pavel Bochev (pbboche@sandia.gov), or
40// Denis Ridzal (dridzal@sandia.gov).
41//
42// ************************************************************************
43//@HEADER
44*/
45
46#ifndef Shards_CellTopologyData_h
47#define Shards_CellTopologyData_h
48
49#if defined( __cplusplus )
50extern "C" {
51#endif
52
57/*----------------------------------------------------------------------*/
58
59struct CellTopologyData ;
62
79 const struct CellTopologyData * base ;
80
82 const char * name ;
83
85 unsigned key ;
86
88 unsigned dimension ;
89
91 unsigned vertex_count ;
92
97 unsigned node_count ;
98
100 unsigned edge_count ;
101
103 unsigned side_count ;
104
107
110
112 unsigned subcell_count[4] ;
113
121
129
137
155 const struct CellTopologyData_Permutation * permutation_inverse ;
156};
157
168 const struct CellTopologyData * topology ;
169
172 const unsigned * node ;
173};
174
177
195 const unsigned * node ;
196 unsigned polarity ;
197};
198
200enum {
201 CELL_PERMUTATION_POLARITY_IRRELEVANT = 0 ,
202 CELL_PERMUTATION_POLARITY_POSITIVE = 1 ,
203 CELL_PERMUTATION_POLARITY_NEGATIVE = 2
204};
205
209extern
210int mapCellFaceEdge( const CellTopologyData * cell_topology ,
211 unsigned face_ordinal ,
212 unsigned face_edge_ordinal );
213
216#if defined( __cplusplus )
217} /* extern "C" */
218#endif
219
220#endif /* Shards_CellTopologyData_h */
221
int mapCellFaceEdge(const CellTopologyData *cell_topology, unsigned face_ordinal, unsigned face_edge_ordinal)
Map a cell->face->edge ordinal to the cell->edge ordinal. Return -1 for erroneous input.
Array of node permutations.
const struct CellTopologyData * topology
Subcell topology.
const unsigned * node
Subcell indexing of with respect to parent cell.
A simple 'C' struct of cell topology attributes.
const char * name
Intuitive name for this topology.
unsigned node_count
Number of nodes (a.k.a. subcells).
const struct CellTopologyData_Subcell * edge
Array of edges subcells of length edge_count.
unsigned side_count
Number of sides (a.k.a. boundary subcells).
const struct CellTopologyData_Subcell * side
Array of side subcells of length side_count.
const struct CellTopologyData * base
Base, a.k.a. not-extended, version of this topology where vertex_count == node_count.
unsigned key
Unique key for this topology.
unsigned edge_count
Number of edges (a.k.a. boundary subcells).
unsigned vertex_count
Number of vertices.
unsigned permutation_count
Number of defined permutations.
unsigned subcell_homogeneity[4]
Flag if the subcells of a given dimension are homogeneous.
const struct CellTopologyData_Subcell * subcell[4]
Array of subcells of each dimension.
const struct CellTopologyData_Permutation * permutation
Array of node permutations.
unsigned dimension
Topological dimension.
unsigned subcell_count[4]
Number of subcells of each dimension.