| 1 |
/* |
| 2 |
* Copyright(C) 1999-2020, 2022, 2023, 2024 National Technology & Engineering Solutions |
| 3 |
* of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with |
| 4 |
* NTESS, the U.S. Government retains certain rights in this software. |
| 5 |
* |
| 6 |
* See packages/seacas/LICENSE for details |
| 7 |
*/ |
| 8 |
#pragma once |
| 9 |
|
| 10 |
/* Define element info requests */ |
| 11 |
enum class ElementInfo { NNODES = 0, NDIM = 2, NSIDE_NODES = 4, NSIDES = 5 }; |
| 12 |
|
| 13 |
/* Define element types */ |
| 14 |
enum class ElementType { |
| 15 |
SPHERE, |
| 16 |
BAR2, |
| 17 |
BAR3, |
| 18 |
QUAD4, |
| 19 |
QUAD8, |
| 20 |
QUAD9, |
| 21 |
SHELL4, |
| 22 |
SHELL8, |
| 23 |
SHELL9, |
| 24 |
TRI3, |
| 25 |
TRI4, |
| 26 |
TRI6, |
| 27 |
TRI7, |
| 28 |
TSHELL3, |
| 29 |
TSHELL4, |
| 30 |
TSHELL6, |
| 31 |
TSHELL7, |
| 32 |
HEX8, |
| 33 |
HEX16, |
| 34 |
HEX20, |
| 35 |
HEX27, |
| 36 |
HEXSHELL, |
| 37 |
TET4, |
| 38 |
TET10, |
| 39 |
TET8, |
| 40 |
TET14, |
| 41 |
TET15, |
| 42 |
WEDGE6, |
| 43 |
WEDGE12, |
| 44 |
WEDGE15, |
| 45 |
WEDGE16, |
| 46 |
WEDGE20, |
| 47 |
WEDGE21, |
| 48 |
PYRAMID5, |
| 49 |
PYRAMID13, |
| 50 |
PYRAMID14, |
| 51 |
PYRAMID18, |
| 52 |
PYRAMID19, |
| 53 |
SHELL2, |
| 54 |
SHELL3, |
| 55 |
BAR1D2, |
| 56 |
BAR1D3, |
| 57 |
NULL_EL |
| 58 |
}; |
| 59 |
|
| 60 |
extern const char *elem_name_from_enum(ElementType elem_type); |
| 61 |
|
| 62 |
extern ElementType get_elem_type(const char *elem_name, /* ExodusII element name */ |
| 63 |
int num_nodes, /* Number of nodes in the element */ |
| 64 |
int num_dim /* Number of dimensions of the mesh */ |
| 65 |
); |
| 66 |
|
| 67 |
extern int get_elem_info(ElementInfo info, /* The requested information */ |
| 68 |
ElementType elem_type /* The element type */ |
| 69 |
); |
| 70 |
|
| 71 |
template <typename INT> |
| 72 |
int get_side_id(ElementType etype, const INT *connect, int nsnodes, INT side_nodes[], |
| 73 |
int skip_check, int partial_adj); |
| 74 |
|
| 75 |
template <typename INT> |
| 76 |
int get_side_id_hex_tet(ElementType etype, /* The element type */ |
| 77 |
const INT *conn, /* The element connectivity */ |
| 78 |
int nsnodes, /* The number of side nodes */ |
| 79 |
const INT side_nodes[] /* The list of side node IDs */ |
| 80 |
); |
| 81 |
|
| 82 |
template <typename INT> |
| 83 |
int ss_to_node_list(ElementType etype, /* The element type */ |
| 84 |
const INT *connect, /* The element connectivity */ |
| 85 |
int side_num, /* The element side number */ |
| 86 |
INT ss_node_list[] /* The list of side node IDs */ |
| 87 |
); |
| 88 |
|
| 89 |
template <typename INT> |
| 90 |
int get_ss_mirror(ElementType etype, /* The element type */ |
| 91 |
const INT *ss_node_list, /* The list of side node IDs */ |
| 92 |
int side_num, /* The element side number */ |
| 93 |
INT mirror_node_list[] /* The list of the mirror side node IDs */ |
| 94 |
); |
| 95 |
|
| 96 |
/* Define for the maximum number of nodes on an element side/face */ |
| 97 |
const int MAX_SIDE_NODES = 9; |
| 98 |
/* |
| 99 |
* Define for the maximum number of sides (and hence communications |
| 100 |
* entries) that an element can have |
| 101 |
*/ |
| 102 |
const int MAX_ELEM_SIDES = 6; |
| 103 |
|
| 104 |
bool is_hex(ElementType etype); |
| 105 |
bool is_tet(ElementType etype); |
| 106 |
bool is_wedge(ElementType etype); |
| 107 |
bool is_pyramid(ElementType etype); |
| 108 |
bool is_3d_element(ElementType etype); |