FrontISTR  5.7.0
Large-scale structural analysis program with finit element method
hecmw_vis_SF_geom.h
Go to the documentation of this file.
1 /*****************************************************************************
2  * Copyright (c) 2019 FrontISTR Commons
3  * This software is released under the MIT License, see LICENSE.txt
4  *****************************************************************************/
5 
6 #ifndef HECMW_VIS_SF_GEOM_H_INCLUDED
7 #define HECMW_VIS_SF_GEOM_H_INCLUDED
8 
9 /*
10 #include <stdio.h>
11 #include <stdlib.h>
12 #include <math.h>
13 #include <string.h>
14 #include <memory.h>
15 #include <ctype.h>
16 #include "hecmw_struct.h"
17 #include "hecmw_util.h"
18 #include "hecmw_io.h"
19 */
21 /*
22 #include "hecmw_vis_comm_util.h"
23 */
24 
25 #define MASTER_PE 0
26 
27 #define EPSILON 0.00000001
28 
29 #define TABLE_SIZE 100
30 
31 #define VERTEX_PACK 50
32 
33 #define POLYGON_PACK 100
34 
35 #define VERTEX_KIND 27
36 
37 #define HEX_N_NODE 8
38 
39 #define HEX_N_FACE 6
40 
41 #define HEX_NODE_INDEX 255 /* 2^8 */
42 
43 #define HEX_FACE_INDEX 63 /* 2^6 */
44 
45 #define PRISM_N_NODE 6
46 
47 #define PRISM_N_FACE 5
48 
49 #define PRISM_NODE_INDEX 63 /* 2^6 */
50 
51 #define PRISM_FACE_INDEX 31 /* 2^5 */
52 
53 #define TETRA_N_NODE 4
54 
55 #define TETRA_N_FACE 4
56 
57 #define TETRA_NODE_INDEX 15 /* 2^4 */
58 
59 #define TETRA_FACE_INDEX 15 /* 2^4 */
60 
61 #define MAX_N_NODE 20
62 
63 #define HASH_TABLE_SIZE 10000
64 
65 #define NUM_CONTROL_PSF 73
66 /*
67 #define MAX_LINE_LEN 256
68 #define buffer_size 300
69 #define UCD_NUM_CELL_TYPES 8
70 #define UCD_LABEL_LEN 1024
71  */
72 
73 typedef struct _psf_link_struct {
75 
76  struct surface_module *sf;
77 
83 
85 
87 
90  char group_name[128];
92  char data_comp_name[128];
93  int data_comp;
94  char data_subcomp_name[128];
96  double iso_value;
97  int method;
98  double point[3];
99  double radius;
100  double length[3];
101  double coef[10];
103  char color_comp_name[128];
111  char range_filename[128];
112 
114 
116 
117  char disp_comp_name[128];
118 
119  double disp_scale;
121 
123 
125 
127 
128  double deform_line_color[3];
129 
131 };
132 
133 typedef struct _surface_module_struct {
135  char *group_name;
139  double iso_value;
143  double cont_equ[10];
145  double rgbrange[3];
148 
151  double opacity;
152 
154 
156 
157  char disp_comp_name[128];
158 
159  double disp_scale;
162 
164 
166 
167  double deform_line_color[3];
169 
170 typedef struct _result_struct {
171  int n_vertex;
172  int n_patch;
173  double *vertex;
174  int *patch;
175  double *color;
176  double *disp;
178 
179 typedef struct _fgeom_struct {
180  double x;
181  double y;
182  double z;
184 
185 typedef struct _triangle_struct { int vertex[3]; } Triangle;
186 
187 typedef struct _isoline_struct {
191 
192 typedef struct _isohead_struct {
193  int linenum;
196 
197 typedef struct _point_struct {
198  int ident;
199  double field;
200  double cdata;
201  double disp[3];
203  int locator;
204  int bdflag;
205  int info;
208 
209 typedef struct _polygon_struct {
210  int type;
211  int *plist;
213  int elem_id[2];
214  int bdflag;
216 /* type: 0 then polygon is owned by alpha isosurface
217  1 then polygon is owned by beta isosurface
218  2 then polygon is owned by cross section */
219 /* *plist = {a,b,c,d,e,....} : a is number of vertex,
220  b,c,d,c,... is array of vertex(left turn) */
221 /* flag : ␛$B6-3&$NMWAG$+$I$&$+␛(B */
222 
223 typedef struct _polygon_obj_struct {
225  double *field;
226  double *verts;
227  unsigned long *colors;
228  int *plist;
230 
231 typedef struct _CS_polygon_struct {
234  double area;
235  double volume;
236  double integral;
238 
239 typedef struct _cube_polygons_struct {
241  int verts[VERTEX_KIND]; /* 8 + 12 + 7 */
242  int **isosurf; /* terminator is -1 */
244 
245 typedef struct _rotation_info_struct {
246  unsigned char face[6];
247  unsigned char grid_point[8];
248  unsigned char edge[12];
249  unsigned char inside[7];
251 
252 typedef struct _cell_struct {
253  double axis[3 * 8];
254  double s_data[8];
255  double c_data[8];
256  double disp[3 * 8];
257  double v_data[3 * 8];
258  int elem_id[2];
260 
261 typedef struct _tetra_struct {
262  double axis[3 * 4];
263  double s_data[4];
264  double c_data[4];
265  double disp[3 * 4];
266  double v_data[3 * 4];
267  int elem_id[2];
268  int local_vid[4];
270 
271 typedef struct _prism_struct {
272  double axis[3 * 6];
273  double s_data[6];
274  double c_data[6];
275  double disp[3 * 6];
276  double v_data[3 * 6];
277  int elem_id[2];
278  int local_vid[6];
280 
281 /*
282 typedef struct _overlap_struct {
283  int index;
284  int elem_id[2];
285  int verts_num;
286  int *verts;
287  struct _overlap_struct *next_elem;
288 } Overlap;
289  */
290 
291 typedef struct _vertex_struct {
292  int index;
293  double x;
294  double y;
295  double z;
296  double color;
297  double disp[3];
300 typedef struct _overlap_struct {
301  int index;
302  int elem_id[2];
304  int *verts;
307 
308 /*
309 typedef struct _elem_no {
310  int peID;
311  int localID;
312 } Elem_no;
313  */
314 
315 typedef struct _hash_table_struct {
316  int elemID;
317  int faceID;
320 
321 typedef struct _boundary_patch_struct {
322  int type;
323  /* 3== tri 4==quad */
324  double vertex[4 * 3];
325  double color[4];
326  double disp[4 * 3];
329 
330 typedef struct _point_tetra_struct {
331  int ident;
332  double cdata;
333  double disp[3];
334  double geom[3];
335 
338 
339 typedef struct _patch_tetra_struct {
340  int patch[3];
343 
344 typedef struct _head_patch_tetra_struct {
348 
349 typedef struct _hash_vertex_struct {
350  int ident;
351  double geom[3];
354 
355 typedef struct _connect_inf {
357  int *connect;
359 
360 #endif /* HECMW_VIS_SF_GEOM_H_INCLUDED */
struct _vertex_struct Vertex
struct _polygon_obj_struct Polygon_obj
struct _hash_table_struct Hash_table
struct _point_tetra_struct Tetra_point
struct _cube_polygons_struct Cube_polygons
struct _cell_struct Cell
struct _result_struct Result
struct _rotation_info_struct Rotation_info
struct _isoline_struct Isoline
struct _polygon_struct Polygon
#define VERTEX_KIND
struct _patch_tetra_struct Patch_tetra
struct _isohead_struct Isohead
struct _overlap_struct Overlap
struct _head_patch_tetra_struct Head_patch_tetra
struct _surface_module_struct Surface
struct _connect_inf Connect_inf
struct _tetra_struct Tetra
struct _hash_vertex_struct Hash_vertex
struct _triangle_struct Triangle
struct _CS_polygon_struct CS_polygon_obj
struct _fgeom_struct Fgeom
#define NUM_CONTROL_PSF
struct _boundary_patch_struct Boundary_patch
struct _point_struct Point
struct _prism_struct Prism
struct _psf_link_struct PSF_link
Polygon_obj * cross_obj
Polygon_obj * alpha_obj
struct _boundary_patch_struct * next_patch
double axis[3 *8]
double v_data[3 *8]
double disp[3 *8]
int verts[VERTEX_KIND]
struct _hash_table_struct * next_elem
struct _hash_vertex_struct * next_vertex
struct _isoline_struct * nextline
struct _isoline_struct * nextline
struct _overlap_struct * next_elem
struct _patch_tetra_struct * next_patch
struct _point_struct * nextpoint
struct _point_tetra_struct * nextpoint
unsigned long * colors
struct _polygon_struct * nextpolygon
double disp[3 *6]
double axis[3 *6]
double v_data[3 *6]
unsigned char edge[12]
unsigned char grid_point[8]
unsigned char inside[7]
double v_data[3 *4]
double disp[3 *4]
double axis[3 *4]
struct _vertex_struct * next_verts
char data_comp_name[128]
char range_filename[128]
char color_subcomp_name[128]
char data_subcomp_name[128]
char group_name[128]
double deform_line_color[3]
double initial_line_color[3]
char color_comp_name[128]
char disp_comp_name[128]