/home66/gary/public_html/cloudy/c08_branch/source/parse_map.cpp

Go to the documentation of this file.
00001 /* This file is part of Cloudy and is copyright (C)1978-2008 by Gary J. Ferland and
00002  * others.  For conditions of distribution and use see copyright notice in license.txt */
00003 /*ParseMap parse map command to produce map of heating and cooling,
00004  * map is produced by calling punt(" map") */
00005 #include "cddefines.h"
00006 #include "hcmap.h"
00007 #include "parse.h"
00008 
00009 void ParseMap(char *chCard )
00010 {
00011         bool lgEOL, 
00012           lgLogOn;
00013         long int i;
00014 
00015         DEBUG_ENTRY( "ParseMap()" );
00016 
00017         /* say output goes to stdout */
00018         ioMAP = ( ioQQQ == NULL ) ? stdout : ioQQQ;
00019 
00020         /* do cooling space map for specified zones
00021          * if no number, or <0, do map and punch out without doing first zone */
00022         i = 5;
00023         hcmap.MapZone = (long)FFmtRead(chCard,&i,INPUT_LINE_LENGTH,&lgEOL);
00024         if( lgEOL )
00025         {
00026                 hcmap.MapZone = 0;
00027                 return;
00028         }
00029 
00030         if( nMatch("RANG",chCard) )
00031         {
00032                 hcmap.RangeMap[0] = (realnum)FFmtRead(chCard,&i,INPUT_LINE_LENGTH,&lgEOL);
00033                 if( hcmap.RangeMap[0] <= 10. )
00034                 {
00035                         hcmap.RangeMap[0] = (realnum)pow((realnum)10.f,hcmap.RangeMap[0]);
00036                         lgLogOn = true;
00037                 }
00038                 else
00039                 {
00040                         lgLogOn = false;
00041                 }
00042                 hcmap.RangeMap[1] = (realnum)FFmtRead(chCard,&i,INPUT_LINE_LENGTH,&lgEOL);
00043                 if( lgLogOn )
00044                         hcmap.RangeMap[1] = (realnum)pow((realnum)10.f,hcmap.RangeMap[1]);
00045 
00046                 if( lgEOL )
00047                 {
00048                         fprintf( ioQQQ, " There must be a zone number, followed by two temperatures, on this line.  Sorry.\n" );
00049                         cdEXIT(EXIT_FAILURE);
00050                 }
00051                 return;
00052         }
00053         return;
00054 }

Generated on Mon Feb 16 12:01:25 2009 for cloudy by  doxygen 1.4.7