bpmsimulation/add_waveforms.c

Go to the documentation of this file.
00001 
00004 #include <bpm/bpm_messages.h>
00005 #include <bpm/bpm_simulation.h>
00006 #include <bpm/bpm_rf.h>
00007 
00008 int add_waveforms( double *RF, double *RFadd, double factor ) {
00015   int i;
00016 
00017   if ( ! RF || ! RFadd) {
00018     bpm_error( "Invalid pointer argument in add_wave(...)", 
00019                __FILE__, __LINE__ );
00020     return BPM_FAILURE;
00021   }
00022 
00023   for ( i = 0; i < rf_nsamples; i++ ) {
00024 
00025       RF[i] += factor*RFadd[i];
00026   }
00027   
00028   return BPM_SUCCESS;
00029 }
00030 
00031 // end of file

Generated on Fri Nov 9 21:17:11 2007 for libbpm by  doxygen 1.5.1