Update ChangeLog
[gss-tcad.git] / src / include / interface.h
blob2f4fa22f6636e6d1e8b88f032af4e50db3a8d01a
1 /*****************************************************************************/
2 /* 8888888 88888888 88888888 */
3 /* 8 8 8 */
4 /* 8 8 8 */
5 /* 8 88888888 88888888 */
6 /* 8 8888 8 8 */
7 /* 8 8 8 8 */
8 /* 888888 888888888 888888888 */
9 /* */
10 /* A Two-Dimensional General Purpose Semiconductor Simulator. */
11 /* */
12 /* GSS 0.4x */
13 /* Last update: Jan 01, 2005 */
14 /* */
15 /* Gong Ding */
16 /* gdiso@ustc.edu */
17 /* NINT, No.69 P.O.Box, Xi'an City, China */
18 /* */
19 /*****************************************************************************/
21 #ifndef _interface_h_
22 #define _interface_h_
23 #include "zone.h"
24 #include <vector>
25 using namespace std;
27 class Interface // a collection of interface edges
29 public:
30 char conn_name[32];
31 char zone1_name[32];
32 char zone2_name[32];
33 int zone1;
34 int zone2;
35 ZONE *pzone1;
36 ZONE *pzone2;
37 int flag;
38 int node_num;
39 vector<int> index_array1;
40 vector<int> index_array2;
41 vector<int> gindex_array;
42 int Find_neighbor_zone_index(int z);
43 int Find_neighbor_node_index(int z,int n);
44 ZONE *Get_neighbor_zone_pointer(int z);
45 void clear();
49 class ZoneInterface
51 public:
52 vector<Interface> interface;
53 public:
54 int Find(const char* conn);
55 Interface & operator[](int i) { return interface[i];}
56 int size() { return interface.size(); }
57 void Clear_flag_all() { for(int i=0;i<interface.size();i++) interface[i].flag = 0;}
58 void Set_flag_all() { for(int i=0;i<interface.size();i++) interface[i].flag = 1;}
59 void Clear_flag(const char *conn){ interface[Find(conn)].flag = 0;}
60 void Set_flag(const char *conn) { interface[Find(conn)].flag = 1;}
61 int Flag(const char *conn) { return interface[Find(conn)].flag; }
62 void Clear_flag(int i) { interface[i].flag = 0;}
63 void Set_flag(int i) { interface[i].flag = 1;}
64 int Flag(int i) { return interface[i].flag; }
65 int IsBelong(int inf,int z);
66 vector<int> * Get_node_array(int inf,int z);
70 #endif