2 |
|
#include <stdlib.h> |
3 |
|
#include <string.h> |
4 |
|
|
5 |
< |
#include <parse_interface.h> |
6 |
< |
#include <BASS_interface.h> |
7 |
< |
#include <simError.h> |
5 |
> |
#include "parse_interface.h" |
6 |
> |
#include "BASS_interface.h" |
7 |
> |
#include "simError.h" |
8 |
|
#ifdef IS_MPI |
9 |
< |
#include <mpiBASS.h> |
9 |
> |
#include "mpiBASS.h" |
10 |
|
#endif |
11 |
|
|
12 |
|
void interface_error( event* the_event ); |
45 |
|
free( the_event ); |
46 |
|
} |
47 |
|
|
48 |
+ |
void init_rigidbody( int rigidbody_index ){ |
49 |
+ |
event* the_event; |
50 |
+ |
|
51 |
+ |
the_event = (event* )malloc( sizeof( event ) ); |
52 |
+ |
|
53 |
+ |
the_event->event_type = RIGIDBODY; |
54 |
+ |
the_event->err_msg = NULL; |
55 |
+ |
the_event->evt.blk_index = rigidbody_index; |
56 |
+ |
|
57 |
+ |
if( !event_handler( the_event ) ) interface_error( the_event ); |
58 |
+ |
#ifdef IS_MPI |
59 |
+ |
throwMPIEvent(the_event); |
60 |
+ |
#endif |
61 |
+ |
|
62 |
+ |
free( the_event ); |
63 |
+ |
} |
64 |
+ |
|
65 |
|
void init_atom( int atom_index ){ |
66 |
|
event* the_event; |
67 |
|
|
130 |
|
free( the_event ); |
131 |
|
} |
132 |
|
|
133 |
+ |
void init_member( int member_index ){ |
134 |
+ |
event* the_event; |
135 |
|
|
136 |
+ |
the_event = (event* )malloc( sizeof( event ) ); |
137 |
+ |
|
138 |
+ |
the_event->event_type = MEMBER; |
139 |
+ |
the_event->err_msg = NULL; |
140 |
+ |
the_event->evt.blk_index = member_index; |
141 |
+ |
|
142 |
+ |
if( !event_handler( the_event ) ) interface_error( the_event ); |
143 |
+ |
#ifdef IS_MPI |
144 |
+ |
throwMPIEvent(the_event); |
145 |
+ |
#endif |
146 |
+ |
|
147 |
+ |
free( the_event ); |
148 |
+ |
} |
149 |
+ |
|
150 |
+ |
void init_zconstraint( int zconstraint_index ){ |
151 |
+ |
event* the_event; |
152 |
+ |
|
153 |
+ |
the_event = (event* )malloc( sizeof( event ) ); |
154 |
+ |
|
155 |
+ |
the_event->event_type = ZCONSTRAINT; |
156 |
+ |
the_event->err_msg = NULL; |
157 |
+ |
the_event->evt.blk_index = zconstraint_index; |
158 |
+ |
|
159 |
+ |
if( !event_handler( the_event ) ) interface_error( the_event ); |
160 |
+ |
#ifdef IS_MPI |
161 |
+ |
throwMPIEvent(the_event); |
162 |
+ |
#endif |
163 |
+ |
|
164 |
+ |
free( the_event ); |
165 |
+ |
} |
166 |
+ |
|
167 |
+ |
|
168 |
|
/* |
169 |
|
* the next few deal with the statement initializations |
170 |
|
*/ |
175 |
|
|
176 |
|
the_event = (event* )malloc( sizeof( event ) ); |
177 |
|
|
178 |
< |
the_event->event_type = MEMBER; |
178 |
> |
the_event->event_type = MEMBERS; |
179 |
|
the_event->err_msg = NULL; |
180 |
< |
the_event->evt.mbr.a = the_node->the_data.mbr.a; |
181 |
< |
the_event->evt.mbr.b = the_node->the_data.mbr.b; |
182 |
< |
the_event->evt.mbr.c = the_node->the_data.mbr.c; |
183 |
< |
the_event->evt.mbr.d = the_node->the_data.mbr.d; |
180 |
> |
the_event->evt.mbrs.a = the_node->the_data.mbrs.a; |
181 |
> |
the_event->evt.mbrs.b = the_node->the_data.mbrs.b; |
182 |
> |
the_event->evt.mbrs.c = the_node->the_data.mbrs.c; |
183 |
> |
the_event->evt.mbrs.d = the_node->the_data.mbrs.d; |
184 |
|
|
185 |
|
if( !event_handler( the_event ) ) interface_error( the_event ); |
186 |
|
#ifdef IS_MPI |