ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/mdtools/BASS_parse/interface.c
(Generate patch)

Comparing trunk/mdtools/BASS_parse/interface.c (file contents):
Revision 117 by mmeineke, Tue Sep 24 22:10:55 2002 UTC vs.
Revision 118 by chuckv, Wed Sep 25 22:51:14 2002 UTC

# Line 17 | Line 17 | void init_component( int comp_index ){
17    the_event->evt.blk_index = comp_index;
18  
19    if( !event_handler( the_event ) ) interface_error( the_event );
20 <  
20 > #ifdef MPI
21 >  throwMPIEvent(the_event);
22 > #endif
23 >
24    free( the_event );  
25   }
26  
# Line 31 | Line 34 | void init_molecule( int mol_index ){
34    the_event->evt.blk_index = mol_index;
35  
36    if( !event_handler( the_event ) ) interface_error( the_event );
37 + #ifdef MPI
38 +  throwMPIEvent(the_event);
39 + #endif
40    
41    free( the_event );  
42   }
# Line 45 | Line 51 | void init_atom( int atom_index ){
51    the_event->evt.blk_index = atom_index;
52  
53    if( !event_handler( the_event ) ) interface_error( the_event );
54 + #ifdef MPI
55 +  throwMPIEvent(the_event);
56 + #endif
57    
58    free( the_event );
59   }
# Line 59 | Line 68 | void init_bond( int bond_index ){
68    the_event->evt.blk_index = bond_index;
69  
70    if( !event_handler( the_event ) ) interface_error( the_event );
71 + #ifdef MPI
72 +  throwMPIEvent(the_event);
73 + #endif
74    
75    free( the_event );
76   }
# Line 73 | Line 85 | void init_bend( int bend_index ){
85    the_event->evt.blk_index = bend_index;
86  
87    if( !event_handler( the_event ) ) interface_error( the_event );
88 + #ifdef MPI
89 +  throwMPIEvent(the_event);
90 + #endif
91    
92    free( the_event );
93   }
# Line 87 | Line 102 | void init_torsion( int torsion_index ){
102    the_event->evt.blk_index = torsion_index;
103  
104    if( !event_handler( the_event ) ) interface_error( the_event );
105 + #ifdef MPI
106 +  throwMPIEvent(the_event);
107 + #endif
108    
109    free( the_event );
110   }
# Line 110 | Line 128 | void init_members( struct node_tag* the_node,
128    the_event->evt.mbr.d = the_node->the_data.mbr.d;
129  
130    if( !event_handler( the_event ) ) interface_error( the_event );
131 + #ifdef MPI
132 +  throwMPIEvent(the_event);
133 + #endif
134    
135    free( the_event );
136   }
# Line 125 | Line 146 | void init_constraint( struct node_tag* the_node,
146    the_event->evt.cnstr = the_node->the_data.cnstr.constraint_val;
147  
148    if( !event_handler( the_event ) ) interface_error( the_event );
149 + #ifdef MPI
150 +  throwMPIEvent(the_event);
151 + #endif
152    
153    free( the_event );
154   }
# Line 159 | Line 183 | void init_assignment( struct node_tag* the_node,
183    }
184  
185    if( !event_handler( the_event ) ) interface_error( the_event );
186 + #ifdef MPI
187 +  throwMPIEvent(the_event);
188 + #endif
189    
190    free( the_event );
191   }
# Line 176 | Line 203 | void init_position( struct node_tag* the_node,
203    the_event->evt.pos.z = the_node->the_data.pos.z;
204  
205    if( !event_handler( the_event ) ) interface_error( the_event );
206 + #ifdef MPI
207 +  throwMPIEvent(the_event);
208 + #endif
209    
210    free( the_event );
211   }
# Line 193 | Line 223 | void init_orientation( struct node_tag* the_node,
223    the_event->evt.ornt.z = the_node->the_data.ort.z;
224  
225    if( !event_handler( the_event ) ) interface_error( the_event );
226 + #ifdef MPI
227 +  throwMPIEvent(the_event);
228 + #endif
229    
230    free( the_event );
231   }
232  
200 void init_start_index( struct node_tag* the_node,
201                       struct namespc the_namespc ){
202  event* the_event;
203  int* si_array;
204  int n_elements = 0;
205  int index = 0;
233  
207  struct integer_list_tag* head;
208  struct integer_list_tag* current;
209  
210  the_event = (event* )malloc( sizeof( event ) );
211  
212  the_event->event_type = ORIENTATION;
213  the_event->err_msg = NULL;
214
215  head = the_node->the_data.il_head;
216  n_elements++;
217
218  current = head->next;
219  while( current != NULL ){
220    n_elements++;
221    current = current->next;
222  }
223
224  the_event->evt.si.n_elements = n_elements;
225  si_array = ( int* ) calloc( n_elements, sizeof( int ) );
226  
227  si_array[index] = head->the_int;
228  
229  current = head->next;
230  while( current != NULL ){
231    index++;
232    si_array[index] = current->the_int;
233    current = current->next;
234  }
235  the_event->evt.si.array = si_array;
236  
237  if( !event_handler( the_event ) ) interface_error( the_event );
238  
239  free( the_event );
240 }
241
234   void end_of_block( void ){
235    event* the_event;
236    
# Line 248 | Line 240 | void end_of_block( void ){
240    the_event->err_msg = NULL;
241  
242    if( !event_handler( the_event ) ) interface_error( the_event );
243 + #ifdef MPI
244 +  throwMPIEvent(the_event);
245 + #endif
246    
247    free( the_event );
248   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines