Initial version of donated sources by Avertec, 3.4p5.
[tas-yagle.git] / distrib / sources / tas / trc / trc_awe_generalized_moment.h
1 typedef struct awe_matrix_node {
2 struct awe_matrix_node *NEXT ;
3 RCXFLOAT CAPA ;
4 int INDEX ; /* -1 mean a lonode on driver */
5 lonode_list *LONODE ;
6 unsigned int FLAGS ;
7
8 } awe_matrix_node ;
9
10 typedef struct awe_hybrid_matrix {
11 struct awe_hybrid_matrix *NEXT ;
12 mbk_matrix *MATRIX ;
13 chain_list *WIRELIST ;
14 chain_list *INTNODELIST ;
15 chain_list *EXTNODELIST ;
16 int DIM ;
17 int SDIM ;
18 } awe_hybrid_matrix ;
19
20 typedef struct awe_hybrid_node {
21 struct awe_hybrid_node *NEXT ;
22 awe_hybrid_matrix *HYBRID ;
23 int INDEX ;
24 } awe_hybrid_node ;
25
26 #define AWE_FLAG_HYBRID ((unsigned int)0x00000001)
27 #define AWE_FLAG_NORMAL ((unsigned int)0x00000002)
28 #define AWE_FLAG_DRIVER ((unsigned int)0x00000004)
29
30 #define AWE_NODE_M 0x5243581D
31 #define AWE_NODE_H 0x5243581E
32 #define AWE_EQUIV_NODE 0x52435820
33
34 extern float AWE_MIN_RESI_VALUE ;
35
36 void build_awe_moment_with_loop( losig_list *losig,
37 locon_list *driver,
38 RCXFLOAT extcapa,
39 rcx_slope *slope,
40 char type,
41 RCXFLOAT coefctc );
42 void sort_node( losig_list *losig,
43 num_list *driver,
44 wirefromlocon_list *group,
45 RCXFLOAT extcapa,
46 rcx_slope *slope,
47 char type,
48 RCXFLOAT coefctc,
49 awe_matrix_node **valid_node,
50 awe_matrix_node **hybrid_node
51 );
52 void test_sort_node( losig_list *losig,
53 lonode_list *mtxnode,
54 RCXFLOAT extcapa,
55 rcx_slope *slope,
56 char type,
57 RCXFLOAT coefctc
58 );
59 void free_sort_node( awe_matrix_node *nodelist );
60 void build_node_index( awe_matrix_node *nodelist );
61 awe_matrix_node* get_matrix_node( lonode_list *ptnode );
62 awe_matrix_node* add_awe_matrix_node( lonode_list *ptnode );
63 awe_hybrid_matrix* build_sort_hybrid( losig_list *losig,
64 awe_matrix_node *hybrid_node
65 );
66 void build_sort_hybrid_rec( losig_list *losig,
67 lonode_list *from,
68 lowire_list *wire,
69 awe_hybrid_matrix *hmat
70 );
71 void set_hybrid_from_node( lonode_list *lonode,
72 awe_hybrid_matrix *hmat,
73 char external
74 );
75 awe_hybrid_node* get_hybrid_from_node( lonode_list *lonode,
76 awe_hybrid_matrix *hmat
77 );
78 void free_hybrid( awe_hybrid_matrix *hlist);
79 awe_hybrid_matrix* alloc_hybrid_matrix( void );
80 void build_fill_hybrid_list( losig_list *losig,
81 awe_hybrid_matrix *hybrid_list,
82 double k
83 );
84 void build_fill_hybrid( losig_list *losig,
85 awe_hybrid_matrix *matrix,
86 double k
87 );
88 void awe_add_admi( mbk_matrix *matrix, int i, int j, double val );
89 void build_awe( losig_list *losig, locon_list *driver, int single_driver, awe_matrix_node *node_list, awe_hybrid_matrix *hybrid_list, double extcapa, chain_list *wirelist );
90
91 mbk_matrix* build_awe_matrix( losig_list *losig, awe_matrix_node *node_list, awe_hybrid_matrix *hybrid_list, double k, chain_list *wirelist );
92 void awebuildinfomatrix( losig_list *losig, locon_list *driver, int single_driver, double k, double extcapa, double **tabmoment ) ;
93 void awe_buildinfomatrix_hybrid( losig_list *losig, locon_list *driver, int single_driver, locon_list *load, awe_matrix_node *mnode, double **tabmoment, double k, double extcapa );
94 int awe_rc_product( int x, int y, double *val, double *data );
95 lonode_list* awe_get_equiv_lonode( lonode_list *lonode );
96 void awe_build_equiv_lonode( losig_list *losig, chain_list *headwire );
97 void awe_clean_equiv_lonode( losig_list *losig, chain_list *headwire );
98 void awe_find_nul_wire_rec( chain_list **head, losig_list *losig, lonode_list *lonode );