/*coladd add coolants to the cooling stack, called in evaluation of cooling function */ #include #include "cddefines.h" #include "coolants.h" #include "coladd.h" void coladd(char *chLabel, long int lambda, double cool) { # ifdef DEBUG_FUN fputs( "<+>coladd()\n", debug_fp ); # endif /* this can be done with an assert since these results cannot possibly * depend on user input */ assert( Coolants.ncltot < NCOLNT ); /* copy coolant label into stack */ strcpy( chCoolants.chClntLab[Coolants.ncltot], chLabel); /* now the wavelength */ Coolants.collam[Coolants.ncltot] = lambda; /* normal line cooling */ Coolants.cooling[Coolants.ncltot] = MAX2(0.,cool); /* possible line heating - not supposed to be done this way! * this is intrinsic positive number, to be added to heating */ Coolants.heatnt[Coolants.ncltot] = MAX2(0.,-cool); /* now increment counter, this is the number of coolants entered */ Coolants.ncltot += 1; # ifdef DEBUG_FUN fputs( " <->coladd()\n", debug_fp ); # endif return; }