cloudy  trunk
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
cddrive.h
Go to the documentation of this file.
1 /* This file is part of Cloudy and is copyright (C)1978-2008 by Gary J. Ferland and
2  * others. For conditions of distribution and use see copyright notice in license.txt */
3 
4 #ifndef _CDDRIVE_H_
5 #define _CDDRIVE_H_
6 
44 void cdInit(void);
45 
51 void cdTalk(bool);
52 
59 void cdOutp(FILE* );
60 
62 void cdInp(FILE* );
63 
68 void cdDepth_depth( double cdDepth[] );
69 
73 long int cdnZone(void );
74 
79 double cdB21cm( void );
80 
91 int cdRead( const char* );
92 
100 void cdPrtWL( FILE *io , realnum wl );
101 
111 
119 void cdNoExec(void);
120 
126 int cdDrive(void);
127 
128 
129 /* The next two routines confirm that the previous calculation was ok
130  * or produce a list of error conditions */
131 
138 void cdErrors(FILE* );
139 
155 void cdNwcns(
156  bool *lgAbort ,
157  long int *NumberWarnings,
158  long int *NumberCautions,
159  long int *NumberNotes,
160  long int *NumberSurprises,
161  long int *NumberTempFailures,
162  long int *NumberPresFailures,
163  long int *NumberIonFailures,
164  long int *NumberNeFailures );
165 
168 void cdReasonGeo(FILE*);
169 
174 void cdWarnings(FILE*);
177 void cdCautions(FILE*);
179 void cdSurprises(FILE*);
181 void cdNotes(FILE*);
182 
183 /***********************************************************
184  *
185  * The next routines examine the predictions of the previous model
186  *
187  ***********************************************************/
188 
209 long int cdLine(
210  const char *chLabel,
212  double *relint,
213  double *absint);
214 
215 
221 void cdLine_ip(long int ipLine,
222  double *relint,
223  double *absint );
224 
235 long int cdDLine(char *chLabel,
237  double *relint,
238  double *absint );
239 
247 long int cdLineListPunch(
248  /* a file handle pointing to a file that is read for writing -
249  * the calling routine must close it */
250  FILE* io );
251 
280 int cdColm(const char*, long, double* );
281 
285 double cdH2_colden( long iVib , long iRot );
286 
292 double cdCO_colden( long isotope , long iRot );
293 
309 long int cdEmis(
310  char *chLabel,
312  double *emiss );
313 
314 
319 void cdEmis_ip(
320  long int ipLine,
321  double *emiss );
322 
326 double cdCooling_last(void);
327 
331 double cdHeating_last(void);
332 
334 double cdEDEN_last(void);
335 
342 void cdPressure_last(
343  double *TotalPressure,
344  double *GasPressure,
345  double *RadiationPressure);
346 
357 void cdPressure_depth(
358  double TotalPressure[],
359  double GasPressure[],
360  double RadiationPressure[]);
361 
365 double cdTemp_last(void);
366 
387 int cdIonFrac(
388  const char *chLabel,
389  long int IonStage,
390  double *fracin,
391  const char *chWeight ,
392  bool lgDensity );
393 
398 void cdVersion(char chString[] );
399 
404 void cdDate(char chString[] );
405 
406 /* The following pairs of routines can keep track of the execution time for one model -
407  * cdSetExecTime called first (in cdInit, not by the user) to initialize timer.
408  * When cdExecTime is called it will return the elapsed time in seconds
409  * since cdInit called cdSetExecTime*/
410 
412 void cdSetExecTime(void);
413 
416 double cdExecTime(void);
417 
444 long int cdGetLineList(
445  const char chFile[] ,
446  char ***chLabels ,
447  realnum **wl );
448 
456 void cdTimescales(
457  double *TTherm ,
458  double *THRecom ,
459  double *TH2 );
460 
461 /* ******************************************************************
462  *
463  * next part deals with FeII bands. There are two types, the tabulated
464  * band that are defined in bands_Fe2.dat, and the psuedo-continuum bins
465  * that are generatedby the code in FeIIContCreate.
466  * nFeIIConBins is number of continuum bins in FeII_Cont
467  * nFeIIBands is number of bands in bands_Fe2.dat, and are saved in FeII_Bands
468  * the bands are created by hand and the entries in bands_Fe2.dat are
469  * meant to be created by a person */
470 
471 /* the declarations for the next four are in FeIILevelPops.c */
473 extern long int nFeIIBands;
474 
476 extern long int nFeIIConBins;
477 
478 /* band wavelength, lower and upper bounds, in vacuum Angstroms */
482 extern realnum **FeII_Bands;
483 
484 /* continuum wavelengths, lower and upper bounds, in vacuum Angstroms
485  * third is integrated intensity */
488 extern realnum **FeII_Cont;
489 
490 
493 void cdMPI(void);
523 void cdSPEC(
524  int Option ,
525  double EnergyLow[] ,
526  long int nEnergy ,
527  double ReturnedSpectrum[] );
528 
529 
551 void cdSPEC2(
552  int Option ,
553  long int nEnergy ,
554  realnum ReturnedSpectrum[] );
555 
573 int cdTemp(
574  const char *chLabel,
575  long int IonStage,
576  double *TeMean,
577  const char *chWeight );
578 
583 void cdPrintCommands( FILE * );
584 
586 void cdClosePunchFiles( void );
587 
601 long int cdH2_Line(
602  /* indices for the upper level */
603  long int iElecHi,
604  long int iVibHi ,
605  long int iRotHi ,
606  /* indices for lower level */
607  long int iElecLo,
608  long int iVibLo ,
609  long int iRotLo ,
610  /* linear intensity relative to normalization line*/
611  double *relint,
612  /* log of luminosity or intensity of line */
613  double *absint );
614 
615 /* none of the following are generally needed */
616 
620 extern bool lgcdInitCalled;
621 
622 #ifndef MAX2
623 /* MAX2 takes two arguments, returns the larger of the two */
624 #define MAX2(a,b) (((a)>(b)) ? (a) : (b))
625 #endif
626 /* */
627 
628 #ifndef MIN2
629 /* MIN2 takes two arguments, returns the smaller of the two */
630 #define MIN2(a,b) (((a)<(b)) ? (a) : (b))
631 #endif
632 /* */
633 
634 
635 #endif /* _CDDRIVE_H_ */

Generated for cloudy by doxygen 1.8.4