/*fndstr search cooling stack to find strongest values */ #include #include #include "cddefines.h" #include "zonecnt.h" #include "phycon.h" #include "heat.h" #include "coolants.h" #include "trace.h" #include "dmpast.h" #include "fndstr.h" void fndstr(double tot, double dc) { char chStrngLab[5]; long int i, ip; double str, strong; # ifdef DEBUG_FUN fputs( "<+>fndstr()\n", debug_fp ); # endif strong = 0.; ip = -LONG_MAX; for( i=0; i < Coolants.ncltot; i++ ) { if( fabs(Coolants.cooling[i]) > strong ) { /* this is the wavelength of the coolant, 0 for a continuum*/ ip = Coolants.collam[i]; /* make sure labels are all valid*/ assert( strlen( chCoolants.chClntLab[i] ) == 4 ); strcpy( chStrngLab, chCoolants.chClntLab[i] ); strong = fabs(Coolants.cooling[i]); } } str = strong; fprintf( ioQQQ, " FndStr cool: TE=%10.4e Ne=%10.4e C=%10.3e H=%10.3e dC/dT=%10.2e ABS(%4.4s%5ld)=%10.2e nz=%5ld\n", phycon.te, phycon.eden, tot, heat.htot, dc, chStrngLab , ip, str, ZoneCnt.nzone ); /* option for extensive printout of lines */ if( trace.lgCoolTr ) { dmpast(); } # ifdef DEBUG_FUN fputs( " <->fndstr()\n", debug_fp ); # endif return; }