Show
Ignore:
Timestamp:
12/10/07 08:08:24 (12 months ago)
Author:
rjrw
Message:

Implement "no heavy molecules" command and tidying use of lgNoMole

Location:
branches/newmole/source
Files:
1 added
5 modified

Legend:

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

    r1639 r1654  
    759759        renormnew = 1.; 
    760760        /* >>chng 06 mar 17, comment out test on old full depth - keep old solution if overrun scale */ 
    761         if(iteration > dynamics.n_initial_relax+1 && dynamics.lgAdvection /*&& radius.depth < dynamics.oldFullDepth */ &&  
    762                  co.lgNoMole) 
     761        if(iteration > dynamics.n_initial_relax+1 && dynamics.lgAdvection /*&& radius.depth < dynamics.oldFullDepth */) 
    763762        { 
    764763                /* The normalization out of the matrix solution is correct and 
  • branches/newmole/source/mole.h

    r1638 r1654  
    9494        bool lgCOCoolCaped; 
    9595 
    96         /** flag to turn off CO molecules, set with no molecules command */ 
     96        /** flag to turn off all molecules, set with no molecules command */ 
    9797        bool lgNoMole; 
     98 
     99        /** flag to turn off heavy molecules, set with no heavy molecules command */ 
     100        bool lgNoHeavyMole; 
    98101 
    99102        /** C12/C13 isotope ratio, sets the ratio of C12O16 to C13O16 and  
  • branches/newmole/source/mole_co_etc.cpp

    r1653 r1654  
    469469        } 
    470470         
    471         if ((mol->n_nuclei > 1 || mol->nElec < 0) && co.lgNoMole)  
     471        if (mol->n_nuclei > 1 && co.lgNoMole)  
    472472        { 
    473473                fprintf(ioQQQ,"No species %s as molecules off\n",label); 
    474474                free(mol); 
    475475                return NULL; 
     476        } 
     477 
     478        if (mol->n_nuclei > 1 && co.lgNoHeavyMole) 
     479        { 
     480                for (i=ipLITHIUM;i<LIMELM;i++) 
     481                { 
     482                        if (mol->nElem[i] != 0)  
     483                        { 
     484                                fprintf(ioQQQ,"No species %s as heavy molecules off\n",label); 
     485                                free(mol); 
     486                                return NULL; 
     487                        } 
     488                } 
    476489        } 
    477490 
  • branches/newmole/source/parse_dont.cpp

    r1610 r1654  
    293293        else if( nMatch("MOLE",chCard) ) 
    294294        { 
    295                 /* turn off molecular network */ 
    296                 co.lgNoMole = true; 
     295                /* disable molecule formation, first option is to turn off only high Z part */ 
     296                if( nMatch("HEAV",chCard) ) 
     297                { 
     298                        /* turn off only Z>=2 molecules */ 
     299                        co.lgNoHeavyMole = true; 
     300                } 
     301                else 
     302                { 
     303                        co.lgNoMole = true; 
     304                } 
    297305                phycon.lgPhysOK = false; 
    298306        } 
  • branches/newmole/source/zero.cpp

    r1653 r1654  
    275275        co.lgNoMole = false; 
    276276 
     277        co.lgNoHeavyMole = false; 
     278 
    277279        NumDeriv.lgNumDeriv = false; 
    278280        /* nsum is line pointer within large stack of line intensities */