shards
Version of the Day
Toggle main menu visibility
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 )
50
extern
"C"
{
51
#endif
52
56
57
/*----------------------------------------------------------------------*/
58
59
struct
CellTopologyData
;
60
struct
CellTopologyData_Subcell
;
61
struct
CellTopologyData_Permutation
;
62
75
struct
CellTopologyData
{
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
106
unsigned
permutation_count
;
107
109
unsigned
subcell_homogeneity
[4] ;
110
112
unsigned
subcell_count
[4] ;
113
120
const
struct
CellTopologyData_Subcell
*
subcell
[4] ;
121
128
const
struct
CellTopologyData_Subcell
*
side
;
129
136
const
struct
CellTopologyData_Subcell
*
edge
;
137
154
const
struct
CellTopologyData_Permutation
*
permutation
;
155
const
struct
CellTopologyData_Permutation
* permutation_inverse ;
156
};
157
166
struct
CellTopologyData_Subcell
{
168
const
struct
CellTopologyData
*
topology
;
169
172
const
unsigned
*
node
;
173
};
174
176
typedef
struct
CellTopologyData
CellTopologyData
;
177
194
struct
CellTopologyData_Permutation
{
195
const
unsigned
* node ;
196
unsigned
polarity ;
197
};
198
200
enum
{
201
CELL_PERMUTATION_POLARITY_IRRELEVANT = 0 ,
202
CELL_PERMUTATION_POLARITY_POSITIVE = 1 ,
203
CELL_PERMUTATION_POLARITY_NEGATIVE = 2
204
};
205
209
extern
210
int
mapCellFaceEdge
(
const
CellTopologyData
* cell_topology ,
211
unsigned
face_ordinal ,
212
unsigned
face_edge_ordinal );
213
215
216
#if defined( __cplusplus )
217
}
/* extern "C" */
218
#endif
219
220
#endif
/* Shards_CellTopologyData_h */
221
mapCellFaceEdge
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.
CellTopologyData_Permutation
Array of node permutations.
Definition
Shards_CellTopologyData.h:194
CellTopologyData_Subcell
Subcell information.
Definition
Shards_CellTopologyData.h:166
CellTopologyData_Subcell::topology
const struct CellTopologyData * topology
Subcell topology.
Definition
Shards_CellTopologyData.h:168
CellTopologyData_Subcell::node
const unsigned * node
Subcell indexing of with respect to parent cell.
Definition
Shards_CellTopologyData.h:172
CellTopologyData
A simple 'C' struct of cell topology attributes.
Definition
Shards_CellTopologyData.h:75
CellTopologyData::name
const char * name
Intuitive name for this topology.
Definition
Shards_CellTopologyData.h:82
CellTopologyData::node_count
unsigned node_count
Number of nodes (a.k.a. subcells).
Definition
Shards_CellTopologyData.h:97
CellTopologyData::edge
const struct CellTopologyData_Subcell * edge
Array of edges subcells of length edge_count.
Definition
Shards_CellTopologyData.h:136
CellTopologyData::side_count
unsigned side_count
Number of sides (a.k.a. boundary subcells).
Definition
Shards_CellTopologyData.h:103
CellTopologyData::side
const struct CellTopologyData_Subcell * side
Array of side subcells of length side_count.
Definition
Shards_CellTopologyData.h:128
CellTopologyData::base
const struct CellTopologyData * base
Base, a.k.a. not-extended, version of this topology where vertex_count == node_count.
Definition
Shards_CellTopologyData.h:79
CellTopologyData::key
unsigned key
Unique key for this topology.
Definition
Shards_CellTopologyData.h:85
CellTopologyData::edge_count
unsigned edge_count
Number of edges (a.k.a. boundary subcells).
Definition
Shards_CellTopologyData.h:100
CellTopologyData::vertex_count
unsigned vertex_count
Number of vertices.
Definition
Shards_CellTopologyData.h:91
CellTopologyData::permutation_count
unsigned permutation_count
Number of defined permutations.
Definition
Shards_CellTopologyData.h:106
CellTopologyData::subcell_homogeneity
unsigned subcell_homogeneity[4]
Flag if the subcells of a given dimension are homogeneous.
Definition
Shards_CellTopologyData.h:109
CellTopologyData::subcell
const struct CellTopologyData_Subcell * subcell[4]
Array of subcells of each dimension.
Definition
Shards_CellTopologyData.h:120
CellTopologyData::permutation
const struct CellTopologyData_Permutation * permutation
Array of node permutations.
Definition
Shards_CellTopologyData.h:154
CellTopologyData::dimension
unsigned dimension
Topological dimension.
Definition
Shards_CellTopologyData.h:88
CellTopologyData::subcell_count
unsigned subcell_count[4]
Number of subcells of each dimension.
Definition
Shards_CellTopologyData.h:112
src
Shards_CellTopologyData.h
Generated by
1.17.0