cloudy
trunk
Main Page
Related Pages
Data Structures
Files
File List
Globals
All
Data Structures
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
source
parse_map.cpp
Go to the documentation of this file.
1
/* This file is part of Cloudy and is copyright (C)1978-2008 by Gary J. Ferland and
2
* others. For conditions of distribution and use see copyright notice in license.txt */
3
/*ParseMap parse map command to produce map of heating and cooling,
4
* map is produced by calling punt(" map") */
5
#include "
cddefines.h
"
6
#include "
hcmap.h
"
7
#include "
parse.h
"
8
9
void
ParseMap
(
char
*chCard )
10
{
11
bool
lgEOL,
12
lgLogOn;
13
long
int
i;
14
15
DEBUG_ENTRY
(
"ParseMap()"
);
16
17
/* say output goes to stdout */
18
ioMAP
= (
ioQQQ
== NULL ) ? stdout :
ioQQQ
;
19
20
/* do cooling space map for specified zones
21
* if no number, or <0, do map and punch out without doing first zone */
22
i = 5;
23
hcmap
.
MapZone
= (long)
FFmtRead
(chCard,&i,
INPUT_LINE_LENGTH
,&lgEOL);
24
if
( lgEOL )
25
{
26
hcmap
.
MapZone
= 0;
27
return
;
28
}
29
30
if
(
nMatch
(
"RANG"
,chCard) )
31
{
32
hcmap
.
RangeMap
[0] = (
realnum
)
FFmtRead
(chCard,&i,
INPUT_LINE_LENGTH
,&lgEOL);
33
if
(
hcmap
.
RangeMap
[0] <= 10. )
34
{
35
hcmap
.
RangeMap
[0] = (
realnum
)pow((
realnum
)10.f,
hcmap
.
RangeMap
[0]);
36
lgLogOn =
true
;
37
}
38
else
39
{
40
lgLogOn =
false
;
41
}
42
hcmap
.
RangeMap
[1] = (
realnum
)
FFmtRead
(chCard,&i,
INPUT_LINE_LENGTH
,&lgEOL);
43
if
( lgLogOn )
44
hcmap
.
RangeMap
[1] = (
realnum
)pow((
realnum
)10.f,
hcmap
.
RangeMap
[1]);
45
46
if
( lgEOL )
47
{
48
fprintf(
ioQQQ
,
" There must be a zone number, followed by two temperatures, on this line. Sorry.\n"
);
49
cdEXIT
(EXIT_FAILURE);
50
}
51
return
;
52
}
53
return
;
54
}
Generated for cloudy by
1.8.1.2