Cleaning up include statements adding crtdbg.h
This commit is contained in:
31
src/input1.c
31
src/input1.c
@@ -3,7 +3,7 @@
|
||||
Project: OWA EPANET
|
||||
Version: 2.2
|
||||
Module: input1.c
|
||||
Description: retrieves network data from an EPANET input file
|
||||
Description: retrieves network data from an EPANET input file
|
||||
Authors: see AUTHORS
|
||||
Copyright: see AUTHORS
|
||||
License: see LICENSE
|
||||
@@ -11,18 +11,23 @@ Last Updated: 03/17/2019
|
||||
******************************************************************************
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#ifndef __APPLE__
|
||||
#include <malloc.h>
|
||||
#ifdef _DEBUG
|
||||
#define _CRTDBG_MAP_ALLOC
|
||||
#include <stdlib.h>
|
||||
#include <crtdbg.h>
|
||||
#else
|
||||
#include <stdlib.h>
|
||||
#endif
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <math.h>
|
||||
|
||||
#include "types.h"
|
||||
#include "funcs.h"
|
||||
#include "hash.h"
|
||||
#include "text.h"
|
||||
#include <math.h>
|
||||
|
||||
|
||||
// Default values
|
||||
#define MAXITER 200 // Default max. # hydraulic iterations
|
||||
@@ -56,7 +61,7 @@ int getdata(Project *pr)
|
||||
int errcode = 0;
|
||||
|
||||
// Assign default data values & reporting options
|
||||
setdefaults(pr);
|
||||
setdefaults(pr);
|
||||
initreport(&pr->report);
|
||||
|
||||
// Read in network data
|
||||
@@ -102,7 +107,7 @@ void setdefaults(Project *pr)
|
||||
parser->Pressflag = PSI; // Pressure units are psi
|
||||
out->Hydflag = SCRATCH; // No external hydraulics file
|
||||
rpt->Tstatflag = SERIES; // Generate time series output
|
||||
|
||||
|
||||
hyd->Formflag = HW; // Use Hazen-Williams formula
|
||||
hyd->Htol = HTOL; // Default head tolerance
|
||||
hyd->Qtol = QTOL; // Default flow tolerance
|
||||
@@ -353,7 +358,7 @@ int inittanks(Project *pr)
|
||||
*/
|
||||
{
|
||||
Network *net = &pr->network;
|
||||
|
||||
|
||||
int i, j, n = 0;
|
||||
double a;
|
||||
int errcode = 0, levelerr;
|
||||
@@ -546,7 +551,7 @@ void convertunits(Project *pr)
|
||||
Slink *link;
|
||||
Spump *pump;
|
||||
Scontrol *control;
|
||||
|
||||
|
||||
// Convert nodal elevations & initial WQ
|
||||
// (WQ source units are converted in QUALITY.C
|
||||
for (i = 1; i <= net->Nnodes; i++)
|
||||
@@ -644,7 +649,7 @@ void convertunits(Project *pr)
|
||||
pump->H0 /= pr->Ucf[HEAD];
|
||||
pump->R *= (pow(pr->Ucf[FLOW], pump->N) / pr->Ucf[HEAD]);
|
||||
}
|
||||
|
||||
|
||||
// Convert flow range & max. head units
|
||||
pump->Q0 /= pr->Ucf[FLOW];
|
||||
pump->Qmax /= pr->Ucf[FLOW];
|
||||
@@ -653,7 +658,7 @@ void convertunits(Project *pr)
|
||||
}
|
||||
else
|
||||
{
|
||||
// For flow control valves, convert flow setting
|
||||
// For flow control valves, convert flow setting
|
||||
// while for other valves convert pressure setting
|
||||
link->Diam /= pr->Ucf[DIAM];
|
||||
link->Km = 0.02517 * link->Km / SQR(link->Diam) / SQR(link->Diam);
|
||||
|
||||
Reference in New Issue
Block a user