This graph shows which files directly or indirectly include this file:
Go to the source code of this file.
Defines | |
#define | MAX2(a, b) (((a)>(b)) ? (a) : (b)) |
#define | MIN2(a, b) (((a)<(b)) ? (a) : (b)) |
Functions | |
void | cdInit (void) |
void | cdTalk (bool) |
void | cdOutp (FILE *) |
void | cdInp (FILE *) |
void | cdDepth_depth (double cdDepth[]) |
long int | cdnZone (void) |
double | cdB21cm (void) |
int | cdRead (const char *) |
void | cdPrtWL (FILE *io, realnum wl) |
long | debugLine (realnum wavelength) |
void | cdNoExec (void) |
int | cdDrive (void) |
void | cdErrors (FILE *) |
void | cdNwcns (bool *lgAbort, long int *NumberWarnings, long int *NumberCautions, long int *NumberNotes, long int *NumberSurprises, long int *NumberTempFailures, long int *NumberPresFailures, long int *NumberIonFailures, long int *NumberNeFailures) |
void | cdReasonGeo (FILE *) |
void | cdWarnings (FILE *) |
void | cdCautions (FILE *) |
void | cdSurprises (FILE *) |
void | cdNotes (FILE *) |
long int | cdLine (const char *chLabel, realnum wavelength, double *relint, double *absint) |
void | cdLine_ip (long int ipLine, double *relint, double *absint) |
long int | cdDLine (char *chLabel, realnum wavelength, double *relint, double *absint) |
long int | cdLineListPunch (FILE *io) |
int | cdColm (const char *, long, double *) |
double | cdH2_colden (long iVib, long iRot) |
double | cdCO_colden (long isotope, long iRot) |
long int | cdEmis (char *chLabel, realnum wavelength, double *emiss) |
void | cdEmis_ip (long int ipLine, double *emiss) |
double | cdCooling_last (void) |
double | cdHeating_last (void) |
double | cdEDEN_last (void) |
void | cdPressure_last (double *TotalPressure, double *GasPressure, double *RadiationPressure) |
void | cdPressure_depth (double TotalPressure[], double GasPressure[], double RadiationPressure[]) |
double | cdTemp_last (void) |
int | cdIonFrac (const char *chLabel, long int IonStage, double *fracin, const char *chWeight, bool lgDensity) |
void | cdVersion (char chString[]) |
void | cdDate (char chString[]) |
void | cdSetExecTime (void) |
double | cdExecTime (void) |
long int | cdGetLineList (const char chFile[], char ***chLabels, realnum **wl) |
void | cdTimescales (double *TTherm, double *THRecom, double *TH2) |
void | cdMPI (void) |
void | cdSPEC (int Option, double EnergyLow[], long int nEnergy, double ReturnedSpectrum[]) |
void | cdSPEC2 (int Option, long int nEnergy, realnum ReturnedSpectrum[]) |
int | cdTemp (const char *chLabel, long int IonStage, double *TeMean, const char *chWeight) |
void | cdPrintCommands (FILE *) |
void | cdClosePunchFiles (void) |
long int | cdH2_Line (long int iElecHi, long int iVibHi, long int iRotHi, long int iElecLo, long int iVibLo, long int iRotLo, double *relint, double *absint) |
Variables | |
long int | nFeIIBands |
long int | nFeIIConBins |
realnum ** | FeII_Bands |
realnum ** | FeII_Cont |
bool | lgcdInitCalled |
this file contains definitions for the suite of routines that allow the code to be driven as a subroutine. These routines set up model parameters, control the execution of Cloudy, and obtain results once complete these are the only "public" routines, and only these should be accessed when controlling Cloudy DRIVING CLOUDY FROM A FORTRAN PROGRAM: This should not be too hard - the recommended approach is to use the cfortran.h file described at http://www-zeus.desy.de/~burow/cfortran/ A note on return error conditions: Many functions return an int to indicate success or failure. I try to follow standard Unix/C convention. A return value of zero usually indicates that the routine was successful, and a non-zero value (not always 1) indicates failure. This is conventional in both C and Unix. So the way to call Cloudy and test for success is if( cdDdrive() ) { printf(" Cloudy failed.\n"); } Although I try to follow this, there ARE exceptions.
Definition in file cddrive.h.
double cdB21cm | ( | void | ) |
cdB21cm returns B as measured by 21 cm assumes tangled field weighted by n(H0)/T
Definition at line 1678 of file cddrive.cpp.
References t_mean::B_HarMeanTempRadius, DEBUG_ENTRY, mean, and SMALLFLOAT.
void cdCautions | ( | FILE * | ) |
produces list of cautions
Definition at line 239 of file cddrive.cpp.
References t_warnings::chCaunln, DEBUG_ENTRY, t_warnings::ncaun, and warnings.
Referenced by cdErrors(), PunLineIntensity(), punResults(), and ShowMe().
void cdClosePunchFiles | ( | void | ) |
wrapper to close all punch files
Definition at line 2111 of file cddrive.cpp.
References ClosePunchFiles(), and DEBUG_ENTRY.
Here is the call graph for this function:
double cdCO_colden | ( | long | isotope, | |
long | iRot | |||
) |
int cdColm | ( | const char * | , | |
long | , | |||
double * | ||||
) |
* cdColm * This obtains the column density of a species in the previously computed model. * The first parameter is a 4 character + NULL terminated string which gives * the first 4 char of the element name as spelled by Cloudy, either upper or lower case. * The second parameter is the stage of ionization, 1 for atom, 2 for first ion, etc; 0 is special. * * examples: * column density of atomic carbon * cdColm( "carb" , 1 , &col1 ); * * doubly ionized helium * cdColm( "heli" , 3 , &col3 ); * * molecular hydrogen * cdColm("H2 " , 0 , &col2 ); * * If the ion stage is zero then the routine will check the first label * for the values "H2 ", "OH ", "CO " and "CII* *", * and will return the H2, OH, CO or CII* column density in this case * * The column density [cm-2] is returned as the third parameter in all cases * * The function returns 0 if it found the species, 1 if it failed
double cdCooling_last | ( | void | ) |
cdCooling_last The returns the total cooling (erg cm^-3 s^-1) for the last computed zone
Definition at line 346 of file cddrive.cpp.
References t_thermal::ctot, and thermal.
void cdDate | ( | char | chString[] | ) |
cdDate The argument is a string with at least 8 char that will receive a null terminated string with the date of the current version of the code.
Definition at line 374 of file cddrive.cpp.
References Singleton< T >::Inst().
Here is the call graph for this function:
void cdDepth_depth | ( | double | cdDepth[] | ) |
returns depth structure of previous model
cdDepth[] |
Definition at line 965 of file cddrive.cpp.
References DEBUG_ENTRY, t_struc::depth, nzone, and struc.
long int cdDLine | ( | char * | chLabel, | |
realnum | wavelength, | |||
double * | relint, | |||
double * | absint | |||
) |
cdDLine get the predicted emergent line intensity, also index for line in stack
*chLabel | ||
wavelength | wavelength of line as printed by code | |
*relint | linear intensity relative to normalization line | |
*absint | log of luminosity or intensity of line |
Definition at line 1486 of file cddrive.cpp.
References ASSERT, cap4(), t_radius::Conv2PrtInten, DEBUG_ENTRY, t_LineSave::ipNormWavL, LineSave, LineSv, t_LineSave::nsum, radius, t_LineSave::ScaleNormLine, t_tag_LineSv::sumlin, and WavlenErrorGet().
Here is the call graph for this function:
int cdDrive | ( | void | ) |
cdDrive This command actually computes a model. It returns 0 if the calculation was successful, and 1 if an error condition was encountered
Definition at line 77 of file cddrive.cpp.
References cdEXIT, ClosePunchFiles(), cloudy(), DEBUG_ENTRY, bad_mpi::failMode(), grid_do(), InitCoreload(), input, ioQQQ, lgAbort, lgcdInitCalled, t_optimize::lgNoVary, t_optimize::lgOptimr, t_trace::lgTrace, t_optimize::lgVaryOn, t_input::nSave, nSimThisCoreload, optimize, and trace.
Referenced by main().
Here is the call graph for this function:
double cdEDEN_last | ( | void | ) |
cdEDEN_last return electron density of last zone
Definition at line 403 of file cddrive.cpp.
References dense, and t_dense::eden.
long int cdEmis | ( | char * | chLabel, | |
realnum | wavelength, | |||
double * | emiss | |||
) |
cdEmis This routine finds the local emissivity for any line. The first argument is the 4 character (null terminated) label as it appears in the standard output. The second argument is float wavelength as it appears in the standard output. The emissivity (erg /cm^3 /s) is returned as the last parameter. cdEms returns the index of the line in the stack if it was found, the negative of the total number of lines in the stack if it could not find the line
*chLabel | 4 char null terminated string label | |
wavelength | line wavelength | |
*emiss | the vol emissivity of this line in last computed zone |
Definition at line 548 of file cddrive.cpp.
References cap4(), caps(), DEBUG_ENTRY, INPUT_LINE_LENGTH, t_LineSave::lgLineEmergent, LineSave, LineSv, t_LineSave::nsum, and WavlenErrorGet().
Referenced by punch_line().
Here is the call graph for this function:
void cdEmis_ip | ( | long int | ipLine, | |
double * | emiss | |||
) |
cdEms_ip obtain the local emissivity for a line with known index
ipLine | index of the line in the stack | |
*emiss | the vol emissivity of this line in last computed zone |
Definition at line 604 of file cddrive.cpp.
References ASSERT, DEBUG_ENTRY, t_tag_LineSv::emslin, t_LineSave::lgLineEmergent, LineSave, LineSv, and t_LineSave::nsum.
Referenced by punch_line().
void cdErrors | ( | FILE * | ) |
cdErrors After the calculation is completed, a summary of all error messages can be be generated by calling this routine. The argument is the output file
[out] | *ioOUT | output file |
Definition at line 899 of file cddrive.cpp.
References cdCautions(), cdNwcns(), cdWarnings(), t_input::chTitle, DEBUG_ENTRY, and input.
Here is the call graph for this function:
double cdExecTime | ( | void | ) |
cdExecTime returns the elapsed time cpu time (sec) that has elapsed since cdInit called cdSetExecTime.
Definition at line 494 of file cddrive.cpp.
References before, cdClock(), cdEXIT, DEBUG_ENTRY, ioQQQ, and lgCalled.
Referenced by main().
Here is the call graph for this function:
long int cdGetLineList | ( | const char | chFile[], | |
char *** | chLabels, | |||
realnum ** | wl | |||
) |
* cdGetLineList will read in a list of emission line labels and wavelengths * from a file. I use it for generating LOC grids. * Two files (cdGetLineList and cdGetLineList) are included in the main data * distribution and have list of strong emission lines for high and low density gas. * other files can be created by the user. * * The first argument is the name of the file to read. * It it is void ("") then the routine will open LineList_BLR.dat * * The next two arguments are pointers that will become arrays giving the * list of labels and wavelengths. The routine will allocate the * needed space, but the pointer is defined in the calling routine. * in the calling routine the two variable should be declared like this: * char **chLabels; * realnum *wavelength; * They would appear as follows in the call to the routine: * chGetLineList("", &chLabels , &wavelength ); * * cdGetLineList returns the number of lines it found in the file if it was successful, * and -1 if it could not open the file. *
Definition at line 9 of file cdgetlinelist.cpp.
References AS_LOCAL_DATA_TRY, cdEXIT, DEBUG_ENTRY, FFmtRead(), FILENAME_PATH_LENGTH_2, INPUT_LINE_LENGTH, ioQQQ, lgcdInitCalled, MALLOC, open_data(), and read_whole_line().
Referenced by ParsePunch().
Here is the call graph for this function:
double cdH2_colden | ( | long | iVib, | |
long | iRot | |||
) |
cdH2_colden return column density in H2, returns -1 if cannot find state, header is in cdDrive, source in h2.c
Definition at line 3549 of file mole_h2.cpp.
References h2, H2_X_colden, t_h2::lgH2ON, t_h2::nRot_hi, t_h2::nVib_hi, t_h2::ortho_colden, and t_h2::para_colden.
Referenced by cdColm(), and lgCheckAsserts().
long int cdH2_Line | ( | long int | iElecHi, | |
long int | iVibHi, | |||
long int | iRotHi, | |||
long int | iElecLo, | |||
long int | iVibLo, | |||
long int | iRotLo, | |||
double * | relint, | |||
double * | absint | |||
) |
cdH2_Line returns 1 if we found the line, or false==0 if we did not find the line because ortho-para transition or upper level has lower energy than lower level NB - this is in mole_h2_io.c
iElecHi | indices for the upper level | |
iVibHi | indices for the upper level | |
iRotHi | indices for the upper level | |
iElecLo | indices for lower level | |
iVibLo | indices for lower level | |
iRotLo | indices for lower level | |
*relint | linear intensity relative to normalization line | |
*absint | log of luminosity or intensity of line |
Definition at line 2228 of file mole_h2_io.cpp.
References ASSERT, t_radius::Conv2PrtInten, DEBUG_ENTRY, energy_wn, H2_lgOrtho, H2_SaveLine, t_LineSave::ipNormWavL, lgH2_line_exists, t_LineSave::lgLineEmergent, LineSave, LineSv, radius, t_LineSave::ScaleNormLine, and t_tag_LineSv::sumlin.
double cdHeating_last | ( | void | ) |
cdHeating_last returns the total heating (erg cm^-3 s^-1) for the last computed zone
Definition at line 389 of file cddrive.cpp.
References t_thermal::htot, and thermal.
void cdInit | ( | void | ) |
cdInit This routine must be called before any of the others - it reinitializes many variables, and must be called before any of the other routines. In a large grid of calculations it must be repeatedly called before the start of the new calculation and after all results have been obtained from the previous model
Definition at line 141 of file cdinit.cpp.
References called, cdSetExecTime(), t_input::chCardSav, DEBUG_ENTRY, grid, input, ioPrnErr, ioQQQ, ioStdin, lgAssertsOK, lgBigBotch, t_input::lgBracketFound, lgcdInitCalled, t_grid::lgGrid, t_optimize::lgNoVary, t_optimize::lgOptimr, t_grid::lgOutputTypeOn, lgPrnErr, lgPrtSciNot, t_called::lgTalk, t_called::lgTalkForcedOff, t_called::lgTalkIsOK, t_input::lgUnderscoreFound, t_optimize::lgVaryOn, LIMPAR, t_grid::nGridCommands, NKRD, t_input::nRead, t_input::nSave, t_input::nSaveIni, NUM_OUTPUT_TYPES, t_grid::numParamValues, optimize, TotalInsanity(), and zero().
Referenced by main().
Here is the call graph for this function:
void cdInp | ( | FILE * | ) |
cdInp - redirect input stream to open file
Definition at line 1641 of file cddrive.cpp.
References DEBUG_ENTRY, and ioStdin.
Referenced by main().
int cdIonFrac | ( | const char * | chLabel, | |
long int | IonStage, | |||
double * | fracin, | |||
const char * | chWeight, | |||
bool | lgDensity | |||
) |
* cdIonFrac * This returns the ionization fraction for any element included in the calculation. * The first parameter is 4 char null terminated string giving the first 4 letters of * element name as spelled by Cloudy. * The second parameter is an integer giving the ionization stage, * 1 for atom, 2 for first ion, etc. * The third parameter returns the predicted ionization fraction of that ion stage. * The last parameter is an 8 character + null string that says either "volume" or "radius", * to specify whether the average should be weighted by volume or radius. * The return value is 0 if the routine could find the species and * non-zero if it failed to find the element
*chLabel | four char string, null terminated, giving the element name | |
IonStage | IonStage is ionization stage, 1 for atom, up to N+1 where N is atomic number | |
*fracin | will be fractional ionization | |
*chWeight | how to weight the average, must be "VOLUME" or "RADIUS" | |
lgDensity | if true then weighting also has electron density, if false then only volume or radius |
Definition at line 1061 of file cddrive.cpp.
References caps(), t_elementnames::chElementNameShort, DEBUG_ENTRY, elementnames, INPUT_LINE_LENGTH, ioQQQ, ipHYDROGEN, LIMELM, MeanIonRadius(), and MeanIonVolume().
Referenced by DynaPunchTimeDep(), lgCheckAsserts(), and punch_average().
Here is the call graph for this function:
long int cdLine | ( | const char * | chLabel, | |
realnum | wavelength, | |||
double * | relint, | |||
double * | absint | |||
) |
cdLine This routine finds the predicted intensity of any line in the standard output.
*chLabel | 1st parameter is the 4-char label + null terminated label, as it appears in the output. | |
wavelength | 2nd parameter is the float wavelength in Angstroms, not how it appears in printout. The first four digits must agree with the number in the printout, but the units must be Angstroms. 3rd parameter is the predicted intensity relative to the normalization line. 4th par is the log of the predicted luminosity or intensity of the line (ergs). | |
*relint | 5th is pointer to relative intensity, a double that is returned | |
*absint | 6th is pointer to log of absolute intensity |
Definition at line 1270 of file cddrive.cpp.
References ASSERT, BIGFLOAT, cap4(), t_radius::Conv2PrtInten, DEBUG_ENTRY, INPUT_LINE_LENGTH, ioQQQ, t_LineSave::ipNormWavL, t_LineSave::lgLineEmergent, LineSave, LineSv, t_LineSave::nsum, prt_wl(), radius, t_LineSave::ScaleNormLine, t_tag_LineSv::sumlin, TotalInsanity(), and WavlenErrorGet().
Referenced by Drive_cdLine(), lgCheckAsserts(), lines(), lines_table(), optimize_func(), PrtComment(), PrtLineSum(), and punch_line().
Here is the call graph for this function:
void cdLine_ip | ( | long int | ipLine, | |
double * | relint, | |||
double * | absint | |||
) |
cdLine_ip get the predicted line intensity, using index for line in stack
ipLine | ||
*relint | linear intensity relative to normalization line | |
*absint | log of luminosity or intensity of line |
Definition at line 1434 of file cddrive.cpp.
References ASSERT, t_radius::Conv2PrtInten, DEBUG_ENTRY, t_LineSave::ipNormWavL, t_LineSave::lgLineEmergent, LineSave, LineSv, t_LineSave::nsum, radius, t_LineSave::ScaleNormLine, and t_tag_LineSv::sumlin.
Referenced by lgCheckAsserts(), and PrtLineSum().
long int cdLineListPunch | ( | FILE * | io | ) |
create a file with a list of all emission lines punched, and their index within the emission line stack
io | a file handle pointing to a file that is read for writing - the calling routine must close it |
Definition at line 1237 of file cddrive.cpp.
References DEBUG_ENTRY, LineSave, LineSv, t_LineSave::nsum, prt_wl(), and wavelength.
Here is the call graph for this function:
void cdMPI | ( | void | ) |
cdMPI sets flag telling exit handler to call MPI_Finalize, This routine must be called after cdInit when MPI is used
Definition at line 134 of file cdinit.cpp.
References lgMPI.
void cdNoExec | ( | void | ) |
cdNoExec This provides option to have the code prepare the initial conditions for a model, but not actually try to compute the model. I use this when setting up a large grid so that I can quickly run through the full grid as a check that the commands are entered properly and the parameters I am going to vary do so properly. The command is then commented out when the grid is properly set up.
Definition at line 417 of file cddrive.cpp.
References DEBUG_ENTRY, t_noexec::lgNoExec, and noexec.
void cdNotes | ( | FILE * | ) |
produces list of Notes
Definition at line 322 of file cddrive.cpp.
References t_warnings::chNoteln, DEBUG_ENTRY, t_warnings::nnote, and warnings.
void cdNwcns | ( | bool * | lgAbort, | |
long int * | NumberWarnings, | |||
long int * | NumberCautions, | |||
long int * | NumberNotes, | |||
long int * | NumberSurprises, | |||
long int * | NumberTempFailures, | |||
long int * | NumberPresFailures, | |||
long int * | NumberIonFailures, | |||
long int * | NumberNeFailures | |||
) |
cdNwcns This command returns the number of warnings, cautions, notes, surprises, assorted types of failures found the last computed model
*lgAbort | abort status, if non-zero then big problems happened | |
*NumberWarnings | the number of warnings | |
*NumberCautions | the number of cautions | |
*NumberNotes | the number of notes | |
*NumberSurprises | the number of surprises | |
*NumberTempFailures | the number of temperature convergence failures | |
*NumberPresFailures | the number of pressure convergence failures | |
*NumberIonFailures | the number of ionization convergence failures | |
*NumberNeFailures | the number of electron density convergence failures |
Definition at line 1583 of file cddrive.cpp.
References conv, DEBUG_ENTRY, lgAbort, t_warnings::nbang, t_warnings::ncaun, t_conv::nIonFail, t_conv::nNeFail, t_warnings::nnote, t_conv::nPreFail, t_conv::nTeFail, t_warnings::nwarn, and warnings.
Referenced by cdErrors(), and main().
long int cdnZone | ( | void | ) |
void cdOutp | ( | FILE * | ) |
cdOutp This tells the code where to send output. The argument must be a previously opened file handle. All output will go to this file. If this routine is not called then all output will go to stdout, the standard c output
Definition at line 1625 of file cddrive.cpp.
References DEBUG_ENTRY, and ioQQQ.
Referenced by main().
void cdPressure_depth | ( | double | TotalPressure[], | |
double | GasPressure[], | |||
double | RadiationPressure[] | |||
) |
cdPressure_depth This returns the pressure and its constituents for the last iteration. space was allocated in the calling routine for the vectors - before calling this, cdnZone should have been called to get the number of zones, then space allocated for the arrays
TotalPressure[] | total pressure, all forms | |
GasPressure[] | gas pressure | |
RadiationPressure[] | radiation pressure |
Definition at line 990 of file cddrive.cpp.
References DEBUG_ENTRY, t_struc::GasPressure, nzone, t_struc::pres_radiation_lines_curr, t_struc::pressure, and struc.
void cdPressure_last | ( | double * | TotalPressure, | |
double * | GasPressure, | |||
double * | RadiationPressure | |||
) |
cdPressure_last This returns the pressure and its constituents for the last computed zone.
*TotalPressure | total pressure, all forms | |
*GasPressure | gas pressure | |
*RadiationPressure | radiation pressure |
Definition at line 1017 of file cddrive.cpp.
References DEBUG_ENTRY, t_pressure::pres_radiation_lines_curr, t_pressure::PresGasCurr, pressure, and t_pressure::PresTotlCurr.
void cdPrintCommands | ( | FILE * | ) |
cdPrintCommands( FILE *) This routine prints all input commands into file whose handle is the argument
*ioOUT | [out] output file handle |
Definition at line 526 of file cddrive.cpp.
References t_input::chCardSav, input, and t_input::nSave.
Referenced by ShowMe().
void cdPrtWL | ( | FILE * | io, | |
realnum | wl | |||
) |
cdPrtWL print line wavelengths in Angstroms in the standard format - a wrapper for prt_wl which must be kept parallel with sprt_wl both of those live in pdt.c
[out] | *ioOUT | output file handle |
[in] | the | emission line wavelength |
Definition at line 170 of file cddrive.cpp.
References DEBUG_ENTRY, and prt_wl().
Here is the call graph for this function:
int cdRead | ( | const char * | ) |
cdRead This sends commands to the code. The normal set of commands described in Part I of Hazy must be entered into a null-terminated string. These strings are then fed to Cloudy with this command. The function returns the number of commands that can still be entered before the command stack is full. The code will stop if you try to continue giving it commands after the command has returned zero. This return value is the opposite of the standard - a non-zero return is normal
Definition at line 1936 of file cddrive.cpp.
References caps(), cdEXIT, t_input::chCardSav, DEBUG_ENTRY, grid, input, INPUT_LINE_LENGTH, ioQQQ, lgcdInitCalled, t_grid::lgGrid, lgInputComment(), t_optimize::lgNoVary, t_optimize::lgOptimr, t_input::lgSetNoBuffering, t_trace::lgTrace, t_optimize::lgVaryOn, t_grid::nGridCommands, NKRD, nMatch(), t_input::nSave, optimize, TotalInsanity(), and trace.
Referenced by main().
Here is the call graph for this function:
void cdReasonGeo | ( | FILE * | ) |
This prints the reason why the model stopped, and the model geometry, on the io file pointed to by the file handle
Definition at line 188 of file cddrive.cpp.
References t_warnings::chRgcln, DEBUG_ENTRY, and warnings.
void cdSetExecTime | ( | void | ) |
void cdSPEC | ( | int | Option, | |
double | EnergyLow[], | |||
long int | nEnergy, | |||
double | ReturnedSpectrum[] | |||
) |
this routine returns the spectrum needed for Keith Arnaud's XSPEC X-Ray analysis code. It should be called after cdDrive has successfully computed a model. The calling routine must ensure that the vectors have enough space to store the resulting spectrum, given the bounds and energy resolution
Option | option - the type of spectrum to be returned 1 the incident continuum 4\pi nuJ_nu, , erg cm-2 s-1 2 the attenuated incident continuum, same units 3 the reflected continuum, same units 4 diffuse continuous emission outward direction 5 diffuse continuous emission, reflected 6 collisional+recombination lines, outward 7 collisional+recombination lines, reflected all lines and continuum emitted by the cloud assume full coverage of continuum source | |
EnergyLow[] | * the energy of the lower edge of each cell (in Ryd to be consistent with all the rest of Cloudy | |
nEnergy | the number of cells + 1 | |
ReturnedSpectrum[] | the returned spectrum, same size is two energy spectra (see option), returns nEnergy -1 pts |
Definition at line 31 of file cdspec.cpp.
References t_rfield::anu, cdEXIT, t_rfield::ConEmitOut, t_rfield::ConEmitReflec, t_rfield::ConRefIncid, t_geometry::covgeo, DEBUG_ENTRY, Ehi, Elo, t_rfield::flux, t_rfield::flux_total_incident, geometry, ioQQQ, iphi, iplo, t_geometry::lgSphere, MALLOC, t_rfield::nflux, t_rfield::nupper, t_rfield::outlin, t_radius::r1r0sq, radius, t_rfield::reflin, rfield, Spec_cont(), and t_rfield::widflx.
Referenced by PunchNewContinuum().
Here is the call graph for this function:
void cdSPEC2 | ( | int | Option, | |
long int | nEnergy, | |||
realnum | ReturnedSpectrum[] | |||
) |
Option | the type of spectrum to be returned 1 the incident continuum 4\pi nuJ_nu, , erg cm-2 s-1 2 the attenuated incident continuum, same units 3 the reflected continuum, same units 4 diffuse continuous emission outward direction 5 diffuse continuous emission, reflected 6 collisional+recombination lines, outward 7 collisional+recombination lines, reflected all lines and continuum emitted by the cloud assume full coverage of continuum source | |
nEnergy | the number of cells + 1 | |
ReturnedSpectrum[] | the returned spectrum, same size is two energy spectra (see option), returns nEnergy -1 pts |
Definition at line 313 of file cdspec.cpp.
References ASSERT, t_rfield::ConEmitOut, t_rfield::ConEmitReflec, t_rfield::ConRefIncid, t_geometry::covgeo, DEBUG_ENTRY, t_rfield::flux, t_rfield::flux_total_incident, geometry, MALLOC, t_rfield::nflux, NUM_OUTPUT_TYPES, t_rfield::nupper, t_rfield::outlin, t_radius::r1r0sq, radius, and rfield.
Referenced by punchFITS_GenericData().
void cdSurprises | ( | FILE * | ) |
produces list of surprises
Definition at line 295 of file cddrive.cpp.
References t_warnings::chBangln, DEBUG_ENTRY, t_warnings::nbang, and warnings.
void cdTalk | ( | bool | ) |
cdTalk tells the code whether or not to produce any of its normal output, If the argument is true (or if it is not called at all) it produces output, produces no output if it is false
Definition at line 1657 of file cddrive.cpp.
References called, DEBUG_ENTRY, t_called::lgTalk, and t_called::lgTalkForcedOff.
int cdTemp | ( | const char * | chLabel, | |
long int | IonStage, | |||
double * | TeMean, | |||
const char * | chWeight | |||
) |
Definition at line 1717 of file cddrive.cpp.
References caps(), t_elementnames::chElementNameShort, DEBUG_ENTRY, elementnames, t_mean::H2MeanTempRadius, t_mean::H2MeanTempVolume, t_mean::H_21cm_spin_mean_radius, t_mean::HarMeanTempRadius, t_mean::HarMeanTempVolume, HFLines, INPUT_LINE_LENGTH, ioQQQ, ipH1s, ipH2p, ipH_LIKE, ipHYDROGEN, LIMELM, mean, MeanIonRadius(), MeanIonVolume(), SDIV(), SMALLFLOAT, t_mean::TempMeanRadius, t_mean::TempMeanVolume, and Transitions.
Referenced by DynaPunchTimeDep(), lgCheckAsserts(), optimize_func(), punch_average(), and timestep_next().
Here is the call graph for this function:
double cdTemp_last | ( | void | ) |
cdTemp_last returns the temperature of the last zone on last iteration
Definition at line 1050 of file cddrive.cpp.
References phycon, and t_phycon::te.
void cdTimescales | ( | double * | TTherm, | |
double * | THRecom, | |||
double * | TH2 | |||
) |
cdTimescales returns the longest thermal, recombination, and H2 formation timescales that occurred in the previous model
*TTherm | the thermal cooling timescale | |
*THRecom | the hydrogen recombination timescale | |
*TH2 | the H2 formation timescale |
Definition at line 262 of file cddrive.cpp.
References DEBUG_ENTRY, MAX2, t_timesc::time_H2_Dest_longest, t_timesc::time_H2_Form_longest, t_timesc::time_Hrecom_long, t_timesc::time_therm_long, and timesc.
void cdVersion | ( | char | chString[] | ) |
cdVersion The argument is a string with at least 8 characters that will receive a null terminated string with the version number of the code.
Definition at line 359 of file cddrive.cpp.
References Singleton< T >::Inst().
Here is the call graph for this function:
void cdWarnings | ( | FILE * | ) |
These routines produce lists of warnings, cautions, notes, surprises These are the routines that are called by cdErrors. Normally cdErrors and not these routines would be called by the user.
Definition at line 211 of file cddrive.cpp.
References t_warnings::chWarnln, DEBUG_ENTRY, t_warnings::nwarn, and warnings.
Referenced by cdErrors(), optimize_func(), PunLineIntensity(), punResults(), and ShowMe().
long debugLine | ( | realnum | wavelength | ) |
debugLine provides a debugging hook into the main line array loops over whole array and finds every line that matches length, the wavelength, the argument to the function put breakpoint inside if test return value is number of matches, also prints all matches
[in] | the | emission line wavelength |
[out] | the | number of matches |
Definition at line 1205 of file cddrive.cpp.
References LineSave, LineSv, t_LineSave::nsum, and WavlenErrorGet().
Here is the call graph for this function:
FeII.bands[n][3], where n is the number of bands in fe2bands.dat these bands are defined in fe2bands.dat and read in at startup of calculation
Definition at line 109 of file atom_feii.cpp.
Referenced by FeIIBandsCreate(), and lines_lv1_k_zn().
FeII_Cont[n][3], where n is the number of cells needed these bands are defined in cdGetFeIIBands
Definition at line 115 of file atom_feii.cpp.
Referenced by FeIIContCreate(), and lines_lv1_k_zn().
bool lgcdInitCalled |
this is the value that will be set true when cdInit is called. Other routines will check that this is true when they are called, to verify that cdInit was called first. Definition is in cdInit.cpp
Definition at line 41 of file cdinit.cpp.
Referenced by cdDrive(), cdGetLineList(), cdInit(), and cdRead().
long int nFeIIBands |
this is the number of bands read in from bands_Fe2.dat
Definition at line 118 of file atom_feii.cpp.
Referenced by FeIIBandsCreate(), and lines_lv1_k_zn().
long int nFeIIConBins |
number of bands in continuum array
Definition at line 121 of file atom_feii.cpp.
Referenced by FeIIContCreate(), and lines_lv1_k_zn().