Show
Ignore:
Timestamp:
05/13/08 17:01:00 (8 months ago)
Author:
rjrw
Message:

Move further towards Householder projection method for of conservation
constraints

Some other tidyings (move from explicit pointers to multi_arr)

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • branches/newmole/source/mole_drive.cpp

    r2028 r2055  
    7777 
    7878        valarray<double> b(mole.num_total);  
    79         double **c; 
    80         long int i; 
     79        multi_arr<double,2> c(mole.num_total,mole.num_total); 
    8180 
    8281        DEBUG_ENTRY( "mole_effects()" ); 
    8382 
    84         c = (double **)MALLOC((size_t)mole.num_total*sizeof(double *)); 
    85         c[0] = (double *)MALLOC((size_t)mole.num_total* 
    86                                                                                                         mole.num_total*sizeof(double)); 
    87         for(i=1;i<mole.num_total;i++) 
    88         { 
    89                 c[i] = c[i-1]+mole.num_total; 
    90         } 
    91  
    92         mole_eval_balance(mole.num_total,&b[0],c);       
     83        mole_eval_balance(mole.num_total,&b[0],true,c);  
    9384 
    9485        for (long int nelem=ipHYDROGEN;nelem<LIMELM;nelem++) 
     
    545536        } 
    546537 
    547         free(c[0]); 
    548         free(c); 
    549  
    550538        mole_h_rate_diagnostics(); 
    551539