00001
00002
00003
00004
00005
00006
00014 #ifndef _CELL_H_
00015 #define _CELL_H_
00016
00017
00018 #include "common_headers.h"
00019
00042
00043
00044
00045
00046 struct Cell
00047 {
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060 int global_cell_num;
00061 float aspect_ratio;
00062 struct Face** cell_faces;
00063 int face_num;
00064
00065 #ifndef AREA_VOLUME_NORMAL_NOT_NEEDED
00066
00067
00068
00069
00070 short* face_outward_normal_sign;
00071 float volume;
00072 #endif
00073
00074 #ifndef CELL_FACE_CENTROID_NOT_NEEDED
00075 float centroid [3];
00076 #endif
00077
00078 short on_boundary;
00079 };
00080
00081 void static_cell_ds_init (void);
00082
00091 void get_cell_edges (struct Edge*** cell_ed, int* num_ed, struct Cell* cl);
00092
00102 void get_cell_vertices (struct Vertex*** cell_vt, int* num_vt, struct Cell* cl);
00103
00104 void cell_init (int cl_num, int fc_num, struct Cell* cl);
00105
00106 void set_this_cell (struct Cell* cl);
00107
00108 void compute_aspect_ratio (struct Cell* cl);
00109
00110 void count_cell_vertices (struct Vertex*** cell_vt, int* num_vt, int** count_arr, struct Cell* cl);
00111
00112 #ifndef AREA_VOLUME_NORMAL_NOT_NEEDED
00113 void compute_volume (struct Cell* cl);
00114
00122 int get_face_normal_sign (struct Face* fc, struct Cell* cl);
00123
00124 void compute_face_normal_sign (struct Cell* cl);
00125 #endif
00126
00127
00128 void print_cl_debug_info (struct Cell* cl);
00129
00130 void output_cell (FILE* fp, struct Cell* cl);
00131
00132 void cell_destroy (struct Cell* cl);
00133
00134 void static_cell_ds_destroy (void);
00135
00136 #endif