Show
Ignore:
Timestamp:
05/11/08 12:53:42 (8 months ago)
Author:
rjrw
Message:

Change molecule structure to class

Make molecular column table easier to navigate (after Nick Abel's
suggestion).

Files:
1 modified

Legend:

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

    r2028 r2042  
    4747                /*  print the molecular column densities */ 
    4848                int j=0; 
     49                long heavy=-1, lastheavy=0; 
    4950                for( i=0; i < mole.num_calc; i++ ) 
    5051                { 
    5152                        if(mole.list[i]->location == NULL) 
    5253                        { 
     54                                lastheavy = heavy; 
     55                                heavy = mole.list[i]->heavyElem(); 
     56                                if(j == 8 || heavy != lastheavy) 
     57                                { 
     58                                        fprintf( ioMEAN, "\n" ); 
     59                                        if (heavy != lastheavy) 
     60                                        { 
     61                                                fprintf ( ioMEAN, "==== %-2.2s compounds ====\n",element_list[heavy]->label); 
     62                                        } 
     63                                        j = 0; 
     64                                } 
    5365                                fprintf( ioMEAN, "   %-6.6s:", mole.list[i]->label ); 
    5466                                fprintf( ioMEAN, "%7.3f",log10(MAX2(SMALLFLOAT,mole.list[i]->column ))); 
    5567                                j++;  
    56                                 fixit();  /* Separate elemental chem more clearly -- would need to refactor mole.nElem */ 
    57                                 if( j == 8 ) 
    58                                 { 
    59                                         fprintf( ioMEAN, "\n" ); 
    60                                         j = 0; 
    61                                 } 
    6268                        } 
    6369                }