46 static bool lgPntEval =
false;
57 fprintf(
ioQQQ,
" ContCreateMesh called, not evaluating.\n" );
71 fprintf(
ioQQQ,
" ContCreateMesh called first time.\n" );
124 fprintf(
ioQQQ,
" Currently the arrays that hold interpolated tables can only hold %i points.\n",
NCELL);
125 fprintf(
ioQQQ,
" This continuum mesh really needs to have %li points.\n",
rfield.
nupper);
126 fprintf(
ioQQQ,
" Please increase the value of NCELL in rfield.h and recompile.\n Sorry.");
275 ASSERT( fenlo>0. && fenhi>0. && resolv>0. );
278 nbin = (
long int)(log(10.)*log10(fenhi/fenlo)/resolv + 1);
289 fprintf(
ioQQQ,
" FILL improper bounds.\n" );
290 fprintf(
ioQQQ,
" ipnt=%3ld fenlo=%11.4e filbnd(ipnt)=%11.4e\n",
317 fprintf(
ioQQQ,
" Fill would need %ld cells to get to an energy of %.3e\n",
319 fprintf(
ioQQQ,
" This is a major logical error in fill.\n");
325 for( i=0; i < nbin; i++ )
328 aaa = pow( 10. , bbb );
342 " FILL range%2ld from%10.3e to%10.3eR in%4ld cell; ener res=%10.3e WIDTOT=%10.3e\n",
350 fprintf(
ioQQQ,
" The requested range was%10.3e%10.3e The requested resolution was%10.3e\n",
351 fenlo, fenhi, resolv );
381 fprintf(
ioQQQ,
" ChckFill middle test low fail\n" );
391 fprintf(
ioQQQ,
" ChckFill middle test high fail\n" );
400 fprintf(
ioQQQ,
" ChckFill low test low fail\n" );
406 fprintf(
ioQQQ,
" ChckFill low test high fail\n" );
416 fprintf(
ioQQQ,
" ChckFill high test low fail\n" );
425 fprintf(
ioQQQ,
" ChckFill high test high fail\n" );
473 double TeLowestFineOpacity = 1e4;
584 for( i = 1; i <=
LIMELM; i++ )
668 fprintf(
ioQQQ,
" read_continuum_mesh opening continuum_mesh.ini:");
670 ioDATA =
open_data(
"continuum_mesh.ini",
"r" );
675 fprintf(
ioQQQ,
" read_continuum_mesh could not read first line of continuum_mesh.ini.\n");
681 while(
read_whole_line( chLine , (
int)
sizeof(chLine) , ioDATA ) != NULL )
685 if( chLine[0] !=
'#')
705 if( fseek( ioDATA , 0 , SEEK_SET ) != 0 )
707 fprintf(
ioQQQ,
" read_continuum_mesh could not rewind continuum_mesh.ini.\n");
714 fprintf(
ioQQQ,
" read_continuum_mesh could not read first line of continuum_mesh.ini.\n");
720 i1 = (long)
FFmtRead(chLine,&i,
sizeof(chLine),&lgEOL);
721 i2 = (long)
FFmtRead(chLine,&i,
sizeof(chLine),&lgEOL);
722 i3 = (long)
FFmtRead(chLine,&i,
sizeof(chLine),&lgEOL);
727 if( i1 == 1 && i2 == 9 && i3 == 29 )
731 else if( i1 == 10 && i2 == 8 && i3 == 8 )
738 " read_continuum_mesh: the version of continuum_mesh.ini is not supported.\n" );
740 " I found version number %li %li %li.\n" ,
742 fprintf(
ioQQQ,
"Here is the line image:\n==%s==\n", chLine );
749 while(
read_whole_line( chLine , (
int)
sizeof(chLine) , ioDATA ) != NULL )
752 if( chLine[0] !=
'#')
763 fprintf(
ioQQQ,
"DISASTER PROBLEM continuum_mesh.ini has a non-positive number.\n");
787 " read_continuum_mesh: The continuum definition array energies must be in increasing order.\n" );
794 " read_continuum_mesh: The last continuum array energies must be zero.\n" );
814 unsigned long n=(
unsigned long)(ihi-lo+1);
846 memset(&
opac.
albedo[lo] , 0 , n*
sizeof(
double) );
854 for( i=lo; i <= ihi; i++ )
STATIC void ChckFill(void)
double * opacity_abs_savzon1
realnum ** ConSourceFcnLocal
FILE * open_data(const char *fname, const char *mode, access_scheme scheme)
realnum * ConOTS_local_OTS_rate
long int fine_opac_nresolv
NORETURN void TotalInsanity(void)
realnum * flux_beam_const_save
realnum * DiffuseLineEmission
void rfield_opac_zero(long lo, long ihi)
realnum ** flux_total_incident
realnum fine_opac_velocity_width
realnum * OccNumbContEmitOut
STATIC void read_continuum_mesh(void)
realnum * ConOTS_local_photons
void resetCoarseTransCoef()
long ipoint(double energy_ryd)
STATIC void fill(double fenlo, double fenhi, double resolv, long int *n0, long int *ipnt, bool lgCount)
realnum * flux_time_beam_save
double ResolutionScaleFactor
double * StoredResolution
void ContCreateMesh(void)
const int INPUT_LINE_LENGTH
long int ipFineConVelShift
realnum AtomicWeight[LIMELM]
STATIC void rfield_opac_malloc(void)
realnum * OccNumbIncidCont
double * opacity_sct_savzon1
realnum * flux_isotropic_save
#define DEBUG_ENTRY(funcname)
realnum * OccNumbDiffCont
long int * ipnt_coarse_2_fine
void setCoarseTransCoefPtr(realnum *ptr)
realnum * ExtinguishFactor
realnum * OccNumbBremsCont
char * read_whole_line(char *chLine, int nChar, FILE *ioIN)
realnum * flux_beam_const
const double ATOMIC_MASS_UNIT
double FFmtRead(const char *chCard, long int *ipnt, long int last, bool *lgEOL)