--- trunk/mdtools/BASS_parse/interface.c 2002/09/24 22:10:55 117 +++ trunk/mdtools/BASS_parse/interface.c 2002/09/25 22:51:14 118 @@ -17,7 +17,10 @@ void init_component( int comp_index ){ the_event->evt.blk_index = comp_index; if( !event_handler( the_event ) ) interface_error( the_event ); - +#ifdef MPI + throwMPIEvent(the_event); +#endif + free( the_event ); } @@ -31,6 +34,9 @@ void init_molecule( int mol_index ){ the_event->evt.blk_index = mol_index; if( !event_handler( the_event ) ) interface_error( the_event ); +#ifdef MPI + throwMPIEvent(the_event); +#endif free( the_event ); } @@ -45,6 +51,9 @@ void init_atom( int atom_index ){ the_event->evt.blk_index = atom_index; if( !event_handler( the_event ) ) interface_error( the_event ); +#ifdef MPI + throwMPIEvent(the_event); +#endif free( the_event ); } @@ -59,6 +68,9 @@ void init_bond( int bond_index ){ the_event->evt.blk_index = bond_index; if( !event_handler( the_event ) ) interface_error( the_event ); +#ifdef MPI + throwMPIEvent(the_event); +#endif free( the_event ); } @@ -73,6 +85,9 @@ void init_bend( int bend_index ){ the_event->evt.blk_index = bend_index; if( !event_handler( the_event ) ) interface_error( the_event ); +#ifdef MPI + throwMPIEvent(the_event); +#endif free( the_event ); } @@ -87,6 +102,9 @@ void init_torsion( int torsion_index ){ the_event->evt.blk_index = torsion_index; if( !event_handler( the_event ) ) interface_error( the_event ); +#ifdef MPI + throwMPIEvent(the_event); +#endif free( the_event ); } @@ -110,6 +128,9 @@ void init_members( struct node_tag* the_node, the_event->evt.mbr.d = the_node->the_data.mbr.d; if( !event_handler( the_event ) ) interface_error( the_event ); +#ifdef MPI + throwMPIEvent(the_event); +#endif free( the_event ); } @@ -125,6 +146,9 @@ void init_constraint( struct node_tag* the_node, the_event->evt.cnstr = the_node->the_data.cnstr.constraint_val; if( !event_handler( the_event ) ) interface_error( the_event ); +#ifdef MPI + throwMPIEvent(the_event); +#endif free( the_event ); } @@ -159,6 +183,9 @@ void init_assignment( struct node_tag* the_node, } if( !event_handler( the_event ) ) interface_error( the_event ); +#ifdef MPI + throwMPIEvent(the_event); +#endif free( the_event ); } @@ -176,6 +203,9 @@ void init_position( struct node_tag* the_node, the_event->evt.pos.z = the_node->the_data.pos.z; if( !event_handler( the_event ) ) interface_error( the_event ); +#ifdef MPI + throwMPIEvent(the_event); +#endif free( the_event ); } @@ -193,52 +223,14 @@ void init_orientation( struct node_tag* the_node, the_event->evt.ornt.z = the_node->the_data.ort.z; if( !event_handler( the_event ) ) interface_error( the_event ); +#ifdef MPI + throwMPIEvent(the_event); +#endif free( the_event ); } -void init_start_index( struct node_tag* the_node, - struct namespc the_namespc ){ - event* the_event; - int* si_array; - int n_elements = 0; - int index = 0; - struct integer_list_tag* head; - struct integer_list_tag* current; - - the_event = (event* )malloc( sizeof( event ) ); - - the_event->event_type = ORIENTATION; - the_event->err_msg = NULL; - - head = the_node->the_data.il_head; - n_elements++; - - current = head->next; - while( current != NULL ){ - n_elements++; - current = current->next; - } - - the_event->evt.si.n_elements = n_elements; - si_array = ( int* ) calloc( n_elements, sizeof( int ) ); - - si_array[index] = head->the_int; - - current = head->next; - while( current != NULL ){ - index++; - si_array[index] = current->the_int; - current = current->next; - } - the_event->evt.si.array = si_array; - - if( !event_handler( the_event ) ) interface_error( the_event ); - - free( the_event ); -} - void end_of_block( void ){ event* the_event; @@ -248,6 +240,9 @@ void end_of_block( void ){ the_event->err_msg = NULL; if( !event_handler( the_event ) ) interface_error( the_event ); +#ifdef MPI + throwMPIEvent(the_event); +#endif free( the_event ); }