PeriDEM 0.2.0
PeriDEM -- Peridynamics-based high-fidelity model for granular media
Loading...
Searching...
No Matches
feElementDefs.h
Go to the documentation of this file.
1/*
2 * -------------------------------------------
3 * Copyright (c) 2021 - 2024 Prashant K. Jha
4 * -------------------------------------------
5 * PeriDEM https://github.com/prashjha/PeriDEM
6 *
7 * Distributed under the Boost Software License, Version 1.0. (See accompanying
8 * file LICENSE)
9 */
10
11#ifndef UTIL_GLOBALDEFS_H
12#define UTIL_GLOBALDEFS_H
13
14namespace util {
15
26//*! @brief Element type (for vtk) */
27//#define VTK_VERTEX 1 // 1-node vertex
28//#define VTK_POLY_VERTEX 2 // n-node polygonal vertex no edges
29//#define VTK_LINE 3 // 2-node line
30//#define VTK_POLY_LINE 4 // n-node line
31//#define VTK_TRIANGLE 5 // 3-node triangle
32//#define VTK_TRIANGLE_STRIP 6 // n-node sequence of triangles
33//#define VTK_POLYGON 7 // n-node polygon
34//#define VTK_PIXEL 8 // 4-node pixel
35//#define VTK_QUAD 9 // 4-node quadrangle
36//#define VTK_TETRA 10 // 4-node tetrahedron
37//#define VTK_VOXEL 11 // 8-node voxel
38//#define VTK_HEXAHEDRON 12 // 8-node hexahedron
39//#define VTK_WEDGE 13 // 6-node wedge (prism)
40//#define VTK_PYRAMID 14 // 5-node pyramid
41
43static const int vtk_type_vertex = 1;
44
46static const int vtk_type_poly_vertex = 2;
47
49static const int vtk_type_line = 3;
50
52static const int vtk_type_poly_line = 4;
53
55static const int vtk_type_triangle = 5;
56
58static const int vtk_type_triangle_strip = 6;
59
61static const int vtk_type_polygon = 7;
62
64static const int vtk_type_pixel = 8;
65
67static const int vtk_type_quad = 9;
68
70static const int vtk_type_tetra = 10;
71
73static const int vtk_type_voxel = 11;
74
76static const int vtk_type_hexahedron = 12;
77
79static const int vtk_type_wedge = 13;
80
82static const int vtk_type_pyramid = 14;
83
85static int vtk_map_element_to_num_nodes[16] = {0, 1, -1, 2, -1, 3, -1, -1,
86 4, 4, 4, 8, 8, 6, 5, -1};
87
89static int vtk_to_msh_element_type_map[16] = {-1, 15, -1, 1, -1, 2, -1, -1,
90 -1, 3, 4, -1, 5, 6, 7, -1};
91
99//*! @brief Element type (for gmsh) */
100//#define MSH_LINE 1 // 2-node line
101//#define MSH_TRIANGLE 2 // 3-node triangle
102//#define MSH_QUAD 3 // 4-node quadrangle
103//#define MSH_TETRA 4 // 4-node tetrahedron
104//#define MSH_HEXA 5 // 8-node hexahedron
105//#define MSH_PRISM 6 // 6-node wedge (prism)
106//#define MSH_PYRAMID 7 // 5-node pyramid
107//#define MSH_LINE_ORDER_TWO 8 // 3-node second order line
108//#define MSH_TRIANGLE_ORDER_TWO 9 // 6-node second order triangle
109//#define MSH_QUAD_ORDER_TWO 10 // 10-node second order tetrahedron
110//#define MSH_VERTEX 15 // 1-node vertex
111
113static const int msh_type_line = 1;
114
116static const int msh_type_triangle = 2;
117
119static const int msh_type_quadrangle = 3;
120
122static const int msh_type_tetrahedron = 4;
123
125static const int msh_type_hexahedron = 5;
126
128static const int msh_type_prism = 6;
129
131static const int msh_type_pyramid = 7;
132
134static const int msh_type_line_second_order = 8;
135
138
141
143static const int msh_type_vertex = 15;
144
146static int msh_map_element_to_num_nodes[16] = {0, 2, 3, 4, 4, 8, 6, 5,
147 3, 6, 10, 0, 0, 0, 0, 1};
148
157#define FREE_MASK 0x000
158
160#define FIX_X_MASK 0x001
161
163#define FIX_Y_MASK 0x002
164
166#define FIX_Z_MASK 0x004
167
172} // namespace util
173
174#endif // UTIL_GLOBALDEFS_H
static const int vtk_type_wedge
Integer flag for wedge element.
static const int msh_type_quadrangle
Integer flag for quadrangle element.
static const int vtk_type_pixel
Integer flag for pixel element.
static const int vtk_type_poly_line
Integer flag for poly line element.
static int vtk_map_element_to_num_nodes[16]
Map from element type to number of nodes (for vtk)
static const int vtk_type_triangle
Integer flag for triangle element.
static const int vtk_type_quad
Integer flag for quad element.
static const int vtk_type_poly_vertex
Integer flag for poly vertex element.
static const int msh_type_quadrangle_second_order
Integer flag for quadrangle (second order) element.
static const int msh_type_line_second_order
Integer flag for line (second order) element.
static const int vtk_type_voxel
Integer flag for voxel element.
static const int vtk_type_pyramid
Integer flag for pyramid element.
static const int msh_type_prism
Integer flag for prism element.
static const int vtk_type_tetra
Integer flag for tetrahedron element.
static int msh_map_element_to_num_nodes[16]
Map from element type to number of nodes (for msh)
static const int msh_type_hexahedron
Integer flag for hexahedron element.
static const int vtk_type_hexahedron
Integer flag for hexahedron element.
static const int msh_type_line
Integer flag for line element.
static const int msh_type_triangle
Integer flag for triangle element.
static const int vtk_type_triangle_strip
Integer flag for triangle strip element.
static const int vtk_type_line
Integer flag for line element.
static int vtk_to_msh_element_type_map[16]
Map from vtk element type to msh element type.
static const int vtk_type_polygon
Integer flag for polygon element.
static const int vtk_type_vertex
Integer flag for vertex (point) element.
static const int msh_type_vertex
Integer flag for vertex (point) element.
static const int msh_type_pyramid
Integer flag for pyramid element.
static const int msh_type_traingle_second_order
Integer flag for traingle (second order) element.
static const int msh_type_tetrahedron
Integer flag for tetrahedron element.
Collection of methods useful in simulation.