Changeset 1144
- Timestamp:
- 05/21/07 20:25:16 (18 months ago)
- Location:
- trunk/source
- Files:
-
- 1 added
- 13 modified
- 1 moved
-
date.h (modified) (1 diff)
-
grid_do.cpp (modified) (2 diffs)
-
grid_xspec.cpp (modified) (1 diff)
-
init_coreload.cpp (modified) (3 diffs)
-
init_coreload_postparse.cpp (added)
-
init_defaults.cpp (moved) (moved from trunk/source/init_sim_preparse.cpp)
-
iter_startend.cpp (modified) (1 diff)
-
mole_h2.cpp (modified) (1 diff)
-
parse_punch.cpp (modified) (1 diff)
-
parse_trace.cpp (modified) (2 diffs)
-
pressure_total.cpp (modified) (10 diffs)
-
punch_do.cpp (modified) (1 diff)
-
radius_next.cpp (modified) (3 diffs)
-
rt.h (modified) (2 diffs)
-
rt_line_driving.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/date.h
r1122 r1144 9 9 #define YEAR 107 10 10 #define MONTH 4 11 #define DAY 1511 #define DAY 21 -
trunk/source/grid_do.cpp
r1122 r1144 15 15 #include "grid.h" 16 16 17 /*grid_do called by cdDrive, this returns 0 if things wentok, 1 for disaster */17 /*grid_do called by cdDrive, calls gridXspec, returns 0 if ok, 1 for disaster */ 18 18 bool grid_do(void) 19 19 { … … 398 398 /* though a page eject */ 399 399 fprintf( ioQQQ, "\f" ); 400 401 /*402 called.lgTalk = true;403 called.lgTalkIsOK = true;404 prt.lgFaintOn = true;405 */406 /* flag that punch files should be opened this time */407 /* punch.lgOpenUnits = true; */408 400 } 409 401 else -
trunk/source/grid_xspec.cpp
r849 r1144 18 18 /*static void gridFunc(float param[] );*/ 19 19 20 /*gridXspec handles all grid calculations, called by grid do */20 /*gridXspec handles all grid calculations, called by grid_do */ 21 21 void gridXspec(float xc[], long int nInterpVars) 22 22 { -
trunk/source/init_coreload.cpp
r1121 r1144 2 2 * For conditions of distribution and use, see copyright notice in license.txt */ 3 3 /* initialization routines for Cloudy 4 * init_coreload - one time initialization, called from cdInit4 *InitCoreload - one time initialization, called from cdInit 5 5 */ 6 6 #include "cddefines.h" … … 12 12 #include "path.h" 13 13 14 /** one time initialization of core load, called from cdInit */ 15 void init_coreload( void ) 14 /** one time initialization of core load, called from cdInit before first 15 * look at input commands */ 16 void InitCoreload( void ) 16 17 { 17 18 static int nCalled=0; 18 19 long int nelem; 19 20 20 DEBUG_ENTRY( " init_coreload()" );21 DEBUG_ENTRY( "InitCoreload()" ); 21 22 22 23 /* sanity check */ 24 if( nCalled ) 25 { 26 /* return since already called */ 27 DEBUG_EXIT( "InitCoreload()" ); 28 return; 29 } 23 30 ++nCalled; 24 ASSERT( nCalled==1 );25 26 /* set ioQQQ to standard output */27 ioQQQ = stdout;28 29 /* set ioStdin to standard input, will get line images from here */30 ioStdin = stdin;31 32 /* set ioPrnErr to stderr */33 ioPrnErr = stderr;34 35 /* but don't want to usually do this */36 lgPrnErr = false;37 31 38 32 strncpy( chOptimFileName , "optimal.in" , sizeof( chOptimFileName ) ); … … 269 263 } 270 264 271 DEBUG_EXIT( " init_coreload()" );265 DEBUG_EXIT( "InitCoreload()" ); 272 266 return; 273 267 } -
trunk/source/iter_startend.cpp
r1124 r1144 574 574 * as now coded this memory is freed and reallocated on every iteration. 575 575 * this allows some details of line emission to change for last iteration, 576 * but may not really be necessary 577 if( LineDSv!=NULL ) 576 * but may not really be necessary */ 577 578 if( LineSv!=NULL ) 578 579 { 579 580 if( trace.lgTrace ) 580 581 { 581 fprintf( ioQQQ, "IterStart has freed LindDSv \n" );582 }583 free(LineDSv );584 LineDSv = NULL;585 }*/586 587 if( LineSv!=NULL )588 {589 if( trace.lgTrace )590 {591 582 fprintf( ioQQQ, "IterStart has freed LindSv \n" ); 592 583 } 593 free( LineSv );584 free( LineSv ); 594 585 LineSv = NULL; 595 586 } 596 597 /* >>chng 06 mar 09 rm this598 * only allocate space if this sum is positive - will be zero if no grains present599 if( LineSave.nsum > 0 )600 {601 LineDSv = (LinDstSv*)MALLOC((unsigned)LineSave.nsum*sizeof( LinDstSv ) );602 } */603 587 604 588 /* this is the large main line array */ -
trunk/source/mole_h2.cpp
r1128 r1144 3741 3741 old_HeatH2Dexc = hmi.HeatH2Dexc_BigH2; 3742 3742 } 3743 /*fprintf(ioQQQ,"DEBUG H2 vib deex Te %.2e heat %.2e\n", 3744 phycon.te, hmi.HeatH2Dexc_BigH2);*/ 3743 3745 if( mole.nH2_TRACE >= mole.nH2_trace_full ) 3744 3746 fprintf(ioQQQ, -
trunk/source/parse_punch.cpp
r1123 r1144 1084 1084 } 1085 1085 } 1086 1087 1086 } 1088 1087 -
trunk/source/parse_trace.cpp
r759 r1144 44 44 } 45 45 46 /* >>chng 02 jun 14, change to set of if else rather than simply series of if47 * makes it possible to use keywords on converge without triggering other trace */48 49 /* >>chng 05 apr 13, changed all from else if to if, so that more than one50 * keyword can be recognized on each command line */51 46 /* trace convergence is a special command, 52 47 * only convergence loops, not full trace */ … … 196 191 /* this says which element, on the C scale (H=0), to trace */ 197 192 trace.ipIsoTrace[ipH_LIKE] = 0; 198 199 193 } 200 194 -
trunk/source/pressure_total.cpp
r1113 r1144 172 172 dense.xMassDensity = (float)(dense.wmole*ATOMIC_MASS_UNIT*dense.pden); 173 173 174 /*>>chng 04 may 25, introduce foll ing test on xMassDensity0174 /*>>chng 04 may 25, introduce following test on xMassDensity0 175 175 * WJH 21 may 04, this is the mass density that corresponds to the hden 176 176 * specified in the init file. It is used to calculate the mass flux in the … … 282 282 TotalInsanity(); 283 283 /* >>chng 01 jan 08, do not include highest level since maser can occur, 284 * and pops are set to small number in this case */284 * and pops are set to small number in this case */ 285 285 /* >>chng 06 aug 17, should go to numLevels_local instead of _max. */ 286 286 for( ipLo=0; ipLo < (iso.numLevels_local[ipISO][nelem] - 2); ipLo++ ) … … 330 330 /* >>chng 04 may 13, add Aul > 10 to prevent forbidden lines with 331 331 * tiny optical depths - taumin doubled - occur, but still opt thin 332 * sympto nwas very large radiation pressure from Paschen beta */332 * symptom was very large radiation pressure from Paschen beta */ 333 333 /* >>chng 04 aug 28, add test on ipCont being positive to skip bogus lines*/ 334 /*NB - this code must be ke p parrallel with code in prt_linepres */334 /*NB - this code must be keep parallel with code in prt_linepres */ 335 335 if( Transitions[ipISO][nelem][ipHi][ipLo].Emis.ipCont > 0 && 336 336 Transitions[ipISO][nelem][ipHi][ipLo].Emis.Aul > 10. && 337 337 Transitions[ipISO][nelem][ipHi][ipLo].Hi.Pop > smallfloat && 338 338 /* >>chng 04 may 21, change PopOpc to poplo as defined above, 339 * to not over count 23P of He */339 * to not over count 23P of He */ 340 340 /*Transitions[ipISO][nelem][ipHi][ipLo].PopOpc > smallfloat &&*/ 341 341 poplo > smallfloat && … … 351 351 StatesElem[ipISO][nelem][ipHi].g)/ 352 352 /* >>chng 04 may 21, change PopOpc to poplo as defined above, 353 * to not over count 23P of He */353 * to not over count 23P of He */ 354 354 /*(Transitions[ipISO][nelem][ipHi][ipLo].PopOpc/ */ 355 355 (poplo/ … … 709 709 { 710 710 /* this branch is time dependent AND constant density */ 711 /*fprintf(ioQQQ,"DEBUG enthalp hHIT1\n");*/711 /*fprintf(ioQQQ,"DEBUG enthalpy HIT1\n");*/ 712 712 /* this is the time-varying case where density is constant */ 713 /* \todo 1 this has 3/2 on the PresGasCurr while tru le dynamics case below713 /* \todo 1 this has 3/2 on the PresGasCurr while true dynamics case below 714 714 * has 5/2 - so this is not really the enthalpy density - better 715 715 * would be to always use this term and add the extra PresGasCurr … … 723 723 { 724 724 /* this branch either advective or constant pressure */ 725 /*fprintf(ioQQQ,"DEBUG enthalp hHIT2\n");*/725 /*fprintf(ioQQQ,"DEBUG enthalpy HIT2\n");*/ 726 726 /* this is usual dynamics case, or time-varying case where pressure 727 727 * is kept constant and PdV work is added to the cell */ … … 740 740 /* >>chng 05 feb 03, do not update RadBetaMax in this block, wait until 741 741 * following, which also protects against the evaluation before zone 1, 742 * when sol n may not be stable742 * when solution may not be stable 743 743 pressure.RadBetaMax = (float)MAX2(pressure.RadBetaMax,pressure.pbeta); */ 744 744 /* stop RadPres from exceeding the gas pressure on first iteration */ … … 767 767 /*@+redef@*/ 768 768 /*lint -e644 Piso_seq not initialized */ 769 /* trace verious constituents in radiation pressure */769 /* trace serious constituents in radiation pressure */ 770 770 if( DEBUG_LOC ) 771 771 { … … 823 823 else if( ipSet == 8 ) 824 824 { 825 /* hyperfi le struct lines */825 /* hyperfine struct lines */ 826 826 strcpy( pressure.chLineRadPres, "hyperf "); 827 827 ASSERT( ip1>=0 ); … … 875 875 876 876 { 877 /*@-redef@*/878 877 enum{DEBUG_LOC=false}; 879 /*@+redef@*/880 878 if( DEBUG_LOC && pressure.PresTotlCurr > SMALLFLOAT /*&& iteration > 1*/ ) 881 879 { -
trunk/source/punch_do.cpp
r1142 r1144 175 175 /* this global variable to remember where in the punch stack we are */ 176 176 punch.ipConPun = ipPun; 177 /* 177 178 /* iterations.lgLastIt is true if this is last iteration 178 179 * lgPunLstIter set true if 'last' key occurred on punch command 179 180 * normally is false. This will skip punching if last set and 180 * this is not last iteration 181 */ 182 181 * this is not last iteration */ 183 182 if( iterations.lgLastIt || (!punch.lgPunLstIter[ipPun]) ) 184 183 { -
trunk/source/radius_next.cpp
r1111 r1144 567 567 568 568 /*>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>*/ 569 /* check whether change in wind velocity constrains DRAD */ 570 /*>>chng 04 may 25, 571 * WJH 22 May 2004: disable when we are near the sonic point since 569 /* check whether change in wind velocity constrains DRAD 570 * WJH 22 May 2004: disable when we are near the sonic point since 572 571 * the velocity may be jumping all over the place but we just want 573 572 * to push through it as quickly as we can */ … … 575 574 { 576 575 double v = fabs(wind.windv); 577 /* this is fractional accel over length */576 /* this is fractional acceleration over length */ 578 577 dVeldRad = fabs(wind.windv-OldWindVelocity)/ 579 578 MAX2(v,0.1*timesc.sound_speed_isothermal)/radius.drad; … … 1615 1614 { 1616 1615 fprintf( punch.ipDRout, 1617 "Wind, dVeldRad=%10.3e\n", 1618 dVeldRad ); 1616 "Wind, dVeldRad=%.3e windv=%.3e\n", 1617 dVeldRad , 1618 wind.windv); 1619 1619 } 1620 1620 -
trunk/source/rt.h
r1111 r1144 2 2 * For conditions of distribution and use see copyright notice in license.txt */ 3 3 /**MakeRT drive static or wind metal line radiative transfer, 4 * if argument is true then do both escape and de EXTERN struction probs,5 * if false only update de EXTERNstruction probabilities. routine only4 * if argument is true then do both escape and destruction probabilities, 5 * if false only update destruction probabilities. routine only 6 6 * called by cloudy(true) and ConvBase(false) 7 \param lgDoEsc this is true if we want to do both escape and destruction prob s,7 \param lgDoEsc this is true if we want to do both escape and destruction probabilities, 8 8 and false if only destruction probabilities are needed 9 9 \param lgUpdateFineOpac flag saying whether to update fine opacities … … 13 13 bool lgUpdateFineOpac ); 14 14 15 /**rt_radiative_acceleration radiative accel due to incident continuum, calls rt_line_driving for lines*/ 15 /**rt_radiative_acceleration radiative acceleration due to incident continuum, 16 * calls rt_line_driving for lines*/ 16 17 void RT_radiative_acceleration(void); 17 18 18 /**rt_line_driving radiative acceleration due to line absorption of incident continuum */ 19 /**rt_line_driving radiative acceleration due to line absorption of incident continuum 20 * returns line radiative acceleration cm s-2 */ 19 21 double RT_line_driving(void); 20 22 21 23 /* in following two the logical variable says whether to do the 22 * escape prob s too (true) or just the deEXTERN struction probs (false) */24 * escape probabilities too (true) or just the destruction probabilities (false) */ 23 25 24 26 /**RT_line_one do line radiative transfer 25 27 \param t 26 28 \param lgDoEsc the logical variable says whether to do the 27 escape prob s too (true) or just the deEXTERN struction probs (false)29 escape probabilities too (true) or just the destruction probabilities (false) 28 30 \param lgUpdateFineOpac 29 31 \param lgShield_this_zone this is option to not include line self shielding across this zone. -
trunk/source/rt_line_driving.cpp
r1111 r1144 1 1 /* This file is part of Cloudy and is copyright (C)1978-2007 by Gary J. Ferland 2 2 * For conditions of distribution and use see copyright notice in license.txt */ 3 /*RT_line_driving derive radiative acceleration due to line absorption of incident continuum */ 3 /*RT_line_driving derive radiative acceleration due to line absorption of incident continuum, 4 * return value is line radiative acceleration */ 4 5 #include "cddefines.h" 5 6 #include "physconst.h" … … 11 12 #include "rt.h" 12 13 14 /*RT_line_driving derive radiative acceleration due to line absorption of incident continuum, 15 * return value is line radiative acceleration */ 13 16 double RT_line_driving(void) 14 17 {
