46 static bool lgPntEval =
false;
57 fprintf(
ioQQQ,
" ContCreateMesh called, not evaluating.\n" );
72 fprintf(
ioQQQ,
" ContCreateMesh called first time.\n" );
125 fprintf(
ioQQQ,
" Currently the arrays that hold interpolated tables can only hold %i points.\n",
NCELL);
126 fprintf(
ioQQQ,
" This continuum mesh really needs to have %li points.\n",
rfield.
nupper);
127 fprintf(
ioQQQ,
" Please increase the value of NCELL in rfield.h and recompile.\n Sorry.");
276 ASSERT( fenlo>0. && fenhi>0. && resolv>0. );
279 nbin = (
long int)(log(10.)*log10(fenhi/fenlo)/resolv + 1);
290 fprintf(
ioQQQ,
" FILL improper bounds.\n" );
291 fprintf(
ioQQQ,
" ipnt=%3ld fenlo=%11.4e filbnd(ipnt)=%11.4e\n",
318 fprintf(
ioQQQ,
" Fill would need %ld cells to get to an energy of %.3e\n",
320 fprintf(
ioQQQ,
" This is a major logical error in fill.\n");
326 for( i=0; i < nbin; i++ )
329 aaa = pow( 10. , bbb );
343 " FILL range%2ld from%10.3e to%10.3eR in%4ld cell; ener res=%10.3e WIDTOT=%10.3e\n",
351 fprintf(
ioQQQ,
" The requested range was%10.3e%10.3e The requested resolution was%10.3e\n",
352 fenlo, fenhi, resolv );
382 fprintf(
ioQQQ,
" ChckFill middle test low fail\n" );
392 fprintf(
ioQQQ,
" ChckFill middle test high fail\n" );
401 fprintf(
ioQQQ,
" ChckFill low test low fail\n" );
407 fprintf(
ioQQQ,
" ChckFill low test high fail\n" );
417 fprintf(
ioQQQ,
" ChckFill high test low fail\n" );
426 fprintf(
ioQQQ,
" ChckFill high test high fail\n" );
474 double TeLowestFineOpacity = 1e4;
585 for( i = 1; i <=
LIMELM; i++ )
669 fprintf(
ioQQQ,
" read_continuum_mesh opening continuum_mesh.ini:");
671 ioDATA =
open_data(
"continuum_mesh.ini",
"r" );
676 fprintf(
ioQQQ,
" read_continuum_mesh could not read first line of continuum_mesh.ini.\n");
682 while(
read_whole_line( chLine , (
int)
sizeof(chLine) , ioDATA ) != NULL )
686 if( chLine[0] !=
'#')
706 if( fseek( ioDATA , 0 , SEEK_SET ) != 0 )
708 fprintf(
ioQQQ,
" read_continuum_mesh could not rewind continuum_mesh.ini.\n");
715 fprintf(
ioQQQ,
" read_continuum_mesh could not read first line of continuum_mesh.ini.\n");
721 i1 = (long)
FFmtRead(chLine,&i,
sizeof(chLine),&lgEOL);
722 i2 = (long)
FFmtRead(chLine,&i,
sizeof(chLine),&lgEOL);
723 i3 = (long)
FFmtRead(chLine,&i,
sizeof(chLine),&lgEOL);
728 if( i1 == 1 && i2 == 9 && i3 == 29 )
732 else if( i1 == 10 && i2 == 8 && i3 == 8 )
739 " read_continuum_mesh: the version of continuum_mesh.ini is not supported.\n" );
741 " I found version number %li %li %li.\n" ,
743 fprintf(
ioQQQ,
"Here is the line image:\n==%s==\n", chLine );
750 while(
read_whole_line( chLine , (
int)
sizeof(chLine) , ioDATA ) != NULL )
753 if( chLine[0] !=
'#')
764 fprintf(
ioQQQ,
"DISASTER PROBLEM continuum_mesh.ini has a non-positive number.\n");
788 " read_continuum_mesh: The continuum definition array energies must be in increasing order.\n" );
795 " read_continuum_mesh: The last continuum array energies must be zero.\n" );
815 unsigned long n=(
unsigned long)(ihi-lo+1);
847 memset(&
opac.
albedo[lo] , 0 , n*
sizeof(
double) );
855 for( i=lo; i <= ihi; i++ )
const int INPUT_LINE_LENGTH
double FFmtRead(const char *chCard, long int *ipnt, long int last, bool *lgEOL)
char * read_whole_line(char *chLine, int nChar, FILE *ioIN)
NORETURN void TotalInsanity(void)
#define DEBUG_ENTRY(funcname)
STATIC void rfield_opac_malloc(void)
STATIC void fill(double fenlo, double fenhi, double resolv, long int *n0, long int *ipnt, bool lgCount)
void rfield_opac_zero(long lo, long ihi)
void ContCreateMesh(void)
STATIC void read_continuum_mesh(void)
STATIC void ChckFill(void)
long ipoint(double energy_ryd)
FILE * open_data(const char *fname, const char *mode, access_scheme scheme)
UNUSED const double SPEEDLIGHT
UNUSED const double BOLTZMANN
UNUSED const double ATOMIC_MASS_UNIT
double ResolutionScaleFactor
double * StoredResolution
realnum AtomicWeight[LIMELM]
double * opacity_sct_savzon1
double * opacity_abs_savzon1
realnum * OccNumbContEmitOut
realnum * OccNumbIncidCont
realnum * ConOTS_local_photons
void resetCoarseTransCoef()
realnum fine_opac_velocity_width
long int fine_opac_nresolv
realnum * ConOTS_local_OTS_rate
long int ipFineConVelShift
realnum ** flux_total_incident
realnum * flux_isotropic_save
realnum * DiffuseLineEmission
realnum * flux_time_beam_save
realnum * flux_beam_const
realnum * ExtinguishFactor
realnum * OccNumbBremsCont
void setCoarseTransCoefPtr(realnum *ptr)
realnum * OccNumbDiffCont
realnum ** ConSourceFcnLocal
long int * ipnt_coarse_2_fine
realnum * flux_beam_const_save