Cloudy
Spectral Synthesis Code for Astrophysics
Loading...
Searching...
No Matches
grains.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void GrainDrive ()
 
void GrainDrift ()
 
void GrainStartIter ()
 
void GrainRestartIter ()
 
void SetNChrgStates (long)
 
void GrainsInit ()
 
void GrainMakeDiffuse ()
 
void qheat (vector< double > &, vector< double > &, long *, size_t)
 
void InitEnthalpy ()
 
void mie_write_opc (const char *, const char *, long int)
 
void mie_read_opc (const char *, const GrainPar &)
 
void gauss_init (long int, double, double, const vector< double > &, const vector< double > &, vector< double > &, vector< double > &)
 
void gauss_legendre (long int, vector< double > &, vector< double > &)
 
void find_arr (double, const vector< double > &, long int, long int *, bool *)
 

Function Documentation

◆ find_arr()

void find_arr ( double x,
const vector< double > & xa,
long int n,
long int * ind,
bool * lgOutOfBounds )

find index ind such that min(xa[ind],xa[ind+1]) <= x <= max(xa[ind],xa[ind+1]). xa is assumed to be strictly monotically increasing or decreasing. if x is outside the range spanned by xa, lgOutOfBounds is raised and ind is set to -1 n is the number of elements in xa.

Parameters
x
xa[]
n
[out]*ind
[out]*lgOutOfBounds

References cdEXIT, DEBUG_ENTRY, EXIT_FAILURE, fprintf(), ioQQQ, max(), min(), and sign3().

Referenced by init_eps(), mie_calc_ial(), mie_cs(), size_distr(), and tbl_fun().

Here is the call graph for this function:

◆ gauss_init()

void gauss_init ( long int nn,
double xbot,
double xtop,
const vector< double > & x,
const vector< double > & a,
vector< double > & rr,
vector< double > & ww )

set up Gaussian quadrature for arbitrary interval

Parameters
nn
xbot
xtop
x[]
a[]
rr[]
ww[]

References DEBUG_ENTRY.

Referenced by DebyeDeriv(), and mie_integrate().

◆ gauss_legendre()

void gauss_legendre ( long int nn,
vector< double > & x,
vector< double > & a )

set up abscissas and weights for Gauss-Legendre intergration of arbitrary even order

Parameters
nn
x[]
a[]

References cdEXIT, DEBUG_ENTRY, EXIT_FAILURE, fprintf(), ioQQQ, pow2, and SAFETY.

Referenced by DebyeDeriv(), and mie_integrate().

Here is the call graph for this function:

◆ GrainDrift()

void GrainDrift ( )

GrainDrift computes grains drift velocity

References ASSERT, DEBUG_ENTRY, dense, fprintf(), gv, ioQQQ, ipHELIUM, ipHYDROGEN, phycon, POW2, POW3, rfield, and trace.

Referenced by ConvPresTempEdenIoniz().

Here is the call graph for this function:

◆ GrainDrive()

void GrainDrive ( )

GrainDrive main routine to converge grains thermal solution

References chrg2pot(), conv, DEBUG_ENTRY, dense, fp_equal(), fprintf(), GrainChargeTemp(), GrainUpdateRadius1(), GrainUpdateRadius2(), gv, hmi, ioQQQ, ipHYDROGEN, LIMELM, nzone, phycon, pow(), SDIV(), thermal, and trace.

Referenced by ConvBase(), and mole_h2_grain_form().

Here is the call graph for this function:

◆ GrainMakeDiffuse()

void GrainMakeDiffuse ( )

main routine for generating the grain diffuse emission

References ASSERT, CONSERV_TOL, avx_ptr< T, lgBC >::data(), DEBUG_ENTRY, dense, get_ptr(), GrainMakeDiffuseSingle(), gv, hmi, ipHYDROGEN, max(), MAX2, NQGRID, pow2, qheat(), rfield, STRG_CAR, STRG_SIL, thermal, and TotalInsanity().

Referenced by RT_diffuse().

Here is the call graph for this function:

◆ GrainRestartIter()

void GrainRestartIter ( )

this routine is called by IterRestart()

References DEBUG_ENTRY, and gv.

Referenced by IterRestart().

◆ GrainsInit()

◆ GrainStartIter()

void GrainStartIter ( )

this routine is called by IterStart()

References DEBUG_ENTRY, and gv.

Referenced by IterStart().

◆ InitEnthalpy()

void InitEnthalpy ( )

initialize interpolation arrays for grain enthalpy

References DEBUG_ENTRY, GRAIN_TMIN, gv, log_integral(), NDEMS, spline(), tlim, uderiv(), and vlog().

Referenced by GrainsInit().

Here is the call graph for this function:

◆ mie_read_opc()

void mie_read_opc ( const char * chFile,
const GrainPar & gp )

read in the *.opc file with opacities and other relevant information

Parameters
*chFile
gp

References ASSERT, called, cdEXIT, cpu, DEBUG_ENTRY, dense, GrainPar::dep, EXIT_FAILURE, fp_equal_tol(), fprintf(), gv, ioQQQ, LABELSIZE, GrainPar::lgForbidQHeating, GrainPar::lgGreyGrain, GrainPar::lgRequestQHeating, LIMELM, MAGIC_OPC, mie_next_data(), mie_next_line(), mie_read_number(), mie_read_word(), min(), GrainPar::nDustFunc, NULL, open_data(), pow(), pow2, rfield, and strstr_s().

Referenced by ParseGrain().

Here is the call graph for this function:

◆ mie_write_opc()

◆ qheat()

void qheat ( vector< double > & ,
vector< double > & ,
long * ,
size_t  )

main routine for quantum heating

Referenced by mole_h2_grain_form().

◆ SetNChrgStates()

void SetNChrgStates ( long nChrg)

this routine is called by ParseSet()

References ASSERT, DEBUG_ENTRY, gv, and NCHU.

Referenced by ParseSet().