/*PutHetCol save heating, cooling, and temperature in stack for numerical derivatives */ #include "cddefines.h" #include "heatcool.h" #include "zonecnt.h" #include "showme.h" #include "puthetcol.h" void PutHetCol(double te, double htot, double ctot) { # ifdef DEBUG_FUN fputs( "<+>PutHetCol()\n", debug_fp ); # endif if( ZoneCnt.nzone == 0 ) { /* code is searching for first temp now - do not remember these numbers */ HeatCool.ipGrid = 0; } else { HeatCool.ipGrid += 1; if( HeatCool.ipGrid > NGRID ) HeatCool.ipGrid = 1; /*begin sanity checks */ if( HeatCool.ipGrid <= 0 || HeatCool.ipGrid > NGRID ) { fprintf( ioQQQ, " PutHetCol has insane ipGrid%5ld\n", HeatCool.ipGrid ); ShowMe(); } if( ZoneCnt.nzone <= 0 ) { fprintf( ioQQQ, " PutHetCol has insane nzone%5ld\n", ZoneCnt.nzone ); ShowMe(); } /*end sanity checks */ HeatCool.TeGrid[HeatCool.ipGrid-1] = (float)te; HeatCool.HtGrid[HeatCool.ipGrid-1] = (float)htot; HeatCool.ClGrid[HeatCool.ipGrid-1] = (float)ctot; HeatCool.nZonGrid[HeatCool.ipGrid-1] = ZoneCnt.nzone; } # ifdef DEBUG_FUN fputs( " <->PutHetCol()\n", debug_fp ); # endif return; }