Skip to content

Commit

Permalink
Merge pull request #8646 from NREL/groundEnergyPlusErrorsFound
Browse files Browse the repository at this point in the history
Remove Statics from ErrorsFound, some "W" files.
  • Loading branch information
Myoldmopar authored Mar 23, 2021
2 parents 9b8155b + f0f1bb6 commit b338a95
Show file tree
Hide file tree
Showing 54 changed files with 565 additions and 487 deletions.
6 changes: 3 additions & 3 deletions src/EnergyPlus/DXCoils.cc
Original file line number Diff line number Diff line change
Expand Up @@ -12440,7 +12440,7 @@ namespace EnergyPlus::DXCoils {
OutletAirDryBulbTemp = LSOutletAirDryBulbTemp;
OutletAirEnthalpy = LSOutletAirEnthalpy;
}

// get low speed EIR at current conditions
EIRTempModFacLS = CurveValue(state, state.dataDXCoils->DXCoil(DXCoilNum).MSEIRFTemp(SpeedNum), InletAirWetBulbC, CondInletTemp);
EIRFlowModFacLS = CurveValue(state, state.dataDXCoils->DXCoil(DXCoilNum).MSEIRFFlow(SpeedNum), AirMassFlowRatioLS);
Expand Down Expand Up @@ -13556,7 +13556,7 @@ namespace EnergyPlus::DXCoils {
int Iter;
Real64 ExternalStatic;
Real64 FanStaticPressureRise;
static bool ErrorsFound(false);
bool ErrorsFound(false);
Real64 FanHeatCorrection;
Real64 FanPowerCorrection;
Real64 FanPowerPerEvapAirFlowRate;
Expand Down Expand Up @@ -14001,7 +14001,7 @@ namespace EnergyPlus::DXCoils {
int AirSysNum;
int BranchNum;
int CompNum;
static bool ErrorsFound(false);
bool ErrorsFound(false);

FoundBranch = 0;
FoundAirSysNum = 0;
Expand Down
32 changes: 17 additions & 15 deletions src/EnergyPlus/DaylightingDevices.cc
Original file line number Diff line number Diff line change
Expand Up @@ -448,14 +448,14 @@ namespace DaylightingDevices {
using General::SafeDivide;

// SUBROUTINE LOCAL VARIABLE DECLARATIONS:
static bool ErrorsFound(false); // Set to true if errors in input, fatal at end of routine
int IOStatus; // Used in GetObjectItem
int NumAlphas; // Number of Alphas for each GetObjectItem call
int NumNumbers; // Number of Numbers for each GetObjectItem call
int PipeNum; // TDD pipe object number
int SurfNum; // Dome or diffuser surface
int TZoneNum; // Transition zone loop
std::string TZoneName; // Transition zone name
bool ErrorsFound(false); // Set to true if errors in input, fatal at end of routine
int IOStatus; // Used in GetObjectItem
int NumAlphas; // Number of Alphas for each GetObjectItem call
int NumNumbers; // Number of Numbers for each GetObjectItem call
int PipeNum; // TDD pipe object number
int SurfNum; // Dome or diffuser surface
int TZoneNum; // Transition zone loop
std::string TZoneName; // Transition zone name
Real64 PipeArea;

auto & cCurrentModuleObject = state.dataIPShortCut->cCurrentModuleObject;
Expand Down Expand Up @@ -718,15 +718,17 @@ namespace DaylightingDevices {
// Using/Aliasing

// SUBROUTINE LOCAL VARIABLE DECLARATIONS:
static bool ErrorsFound(false); // Set to true if errors in input, fatal at end of routine
int IOStatus; // Used in GetObjectItem
int NumAlphas; // Number of Alphas for each GetObjectItem call
int NumNumbers; // Number of Numbers for each GetObjectItem call
int ShelfNum; // Daylighting shelf object number
int SurfNum; // Window, inside, or outside shelf surfaces
int ConstrNum; // Outside shelf construction object number
bool ErrorsFound(false); // Set to true if errors in input, fatal at end of routine
int IOStatus; // Used in GetObjectItem
int NumAlphas; // Number of Alphas for each GetObjectItem call
int NumNumbers; // Number of Numbers for each GetObjectItem call
int ShelfNum; // Daylighting shelf object number
int SurfNum; // Window, inside, or outside shelf surfaces
int ConstrNum; // Outside shelf construction object number


auto & cCurrentModuleObject = state.dataIPShortCut->cCurrentModuleObject;

cCurrentModuleObject = "DaylightingDevice:Shelf";
state.dataDaylightingDevicesData->NumOfShelf = inputProcessor->getNumObjectsFound(state, cCurrentModuleObject);

Expand Down
8 changes: 4 additions & 4 deletions src/EnergyPlus/DesiccantDehumidifiers.cc
Original file line number Diff line number Diff line change
Expand Up @@ -335,9 +335,9 @@ namespace DesiccantDehumidifiers {
int NumAlphas; // Number of Alphas for each GetObjectItem call
int NumNumbers; // Number of Numbers for each GetObjectItem call
int IOStatus; // Used in GetObjectItem
static bool ErrorsFound(false); // Set to true if errors in input, fatal at end of routine
static bool ErrorsFound2(false); // Set to true if errors in input, fatal at end of routine
static bool ErrorsFoundGeneric(false); // Set to true if errors in input, fatal at end of routine
bool ErrorsFound(false); // Set to true if errors in input, fatal at end of routine
bool ErrorsFound2(false); // Set to true if errors in input, fatal at end of routine
bool ErrorsFoundGeneric(false); // Set to true if errors in input, fatal at end of routine
bool IsNotOK; // Flag to verify name
bool OANodeError; // Flag for check on outside air node
std::string RegenFanInlet; // Desiccant system regeneration air fan inlet node
Expand Down Expand Up @@ -1755,7 +1755,7 @@ namespace DesiccantDehumidifiers {
static Array1D_bool MyEnvrnFlag;
static Array1D_bool MyPlantScanFlag; // Used for init plant component for heating coils

static bool ErrorsFound(false); // Set to true if errors in input, fatal at end of routine
bool ErrorsFound(false); // Set to true if errors in input, fatal at end of routine
int SteamIndex; // steam coil index
Real64 FluidDensity; // steam or water coil fluid density
Real64 CoilMaxVolFlowRate; // water or steam max volumetric water flow rate
Expand Down
2 changes: 1 addition & 1 deletion src/EnergyPlus/DualDuct.cc
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ namespace DualDuct {
static Array1D_bool lAlphaBlanks(7, true); // Logical array, alpha field input BLANK = .TRUE.
static Array1D_bool lNumericBlanks(2, true); // Logical array, numeric field input BLANK = .TRUE.
std::string CurrentModuleObject; // for ease in getting objects
static bool ErrorsFound(false); // If errors detected in input
bool ErrorsFound(false); // If errors detected in input
int CtrlZone; // controlled zone do loop index
int SupAirIn; // controlled zone supply air inlet index
int ADUNum; // loop control to search Air Distribution Units
Expand Down
2 changes: 1 addition & 1 deletion src/EnergyPlus/EMSManager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,7 @@ namespace EMSManager {
int NumNums; // Number of elements in the numeric array
int AlphaNum;
int IOStat; // IO Status when calling get input subroutine
static bool ErrorsFound(false);
bool ErrorsFound(false);
Array1D_string cAlphaFieldNames;
Array1D_string cNumericFieldNames;
Array1D_bool lNumericFieldBlanks;
Expand Down
2 changes: 1 addition & 1 deletion src/EnergyPlus/ExteriorEnergyUse.cc
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ namespace ExteriorEnergyUse {
int NumAlphas; // Number of Alphas for each GetObjectItem call
int NumNumbers; // Number of Numbers for each GetObjectItem call
int IOStatus; // Used in GetObjectItem
static bool ErrorsFound(false); // Set to true if errors in input, fatal at end of routine
bool ErrorsFound(false); // Set to true if errors in input, fatal at end of routine
int NumFuelEq; // Temporary -- number of ExteriorFuelEquipment statements
int NumWtrEq; // Temporary -- number of ExteriorWaterEquipment statements
std::string TypeString; // Fuel Type string (returned from Validation)
Expand Down
2 changes: 1 addition & 1 deletion src/EnergyPlus/HVACCooledBeam.cc
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ namespace HVACCooledBeam {
static int TotalArgs(0); // Total number of alpha and numeric arguments (max) for a
// certain object in the input file
int IOStatus; // Used in GetObjectItem
static bool ErrorsFound(false); // Set to true if errors in input, fatal at end of routine
bool ErrorsFound(false); // Set to true if errors in input, fatal at end of routine
int CtrlZone; // controlled zome do loop index
int SupAirIn; // controlled zone supply air inlet index
bool AirNodeFound;
Expand Down
2 changes: 1 addition & 1 deletion src/EnergyPlus/HVACDXSystem.cc
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ namespace HVACDXSystem {
int NumNums;
int IOStat;
static std::string const RoutineName("GetDXCoolingSystemInput: "); // include trailing blank space
static bool ErrorsFound(false); // If errors detected in input
bool ErrorsFound(false); // If errors detected in input
static bool ErrFound(false); // used for mining functions
bool IsNotOK; // Flag to verify name
int DXCoolSysNum;
Expand Down
4 changes: 2 additions & 2 deletions src/EnergyPlus/HVACDuct.cc
Original file line number Diff line number Diff line change
Expand Up @@ -204,8 +204,8 @@ namespace HVACDuct {
int NumAlphas; // Number of Alphas for each GetObjectItem call
int NumNumbers; // Number of Numbers for each GetObjectItem call
int IOStatus; // Used in GetObjectItem
static bool ErrorsFound(false); // Set to true if errors in input, fatal at end of routine
auto & cCurrentModuleObject = state.dataIPShortCut->cCurrentModuleObject;
bool ErrorsFound(false); // Set to true if errors in input, fatal at end of routine
auto& cCurrentModuleObject = state.dataIPShortCut->cCurrentModuleObject;
cCurrentModuleObject = "Duct";
NumDucts = inputProcessor->getNumObjectsFound(state, cCurrentModuleObject);
Duct.allocate(NumDucts);
Expand Down
2 changes: 1 addition & 1 deletion src/EnergyPlus/HVACFourPipeBeam.cc
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ namespace FourPipeBeam {
// certain object in the input file
int IOStatus; // Used in GetObjectItem
bool errFlag = false;
static bool ErrorsFound(false); // Set to true if errors in input, fatal at end of routine
bool ErrorsFound(false); // Set to true if errors in input, fatal at end of routine
bool found = false;
int ctrlZone; // controlled zome do loop index
int supAirIn; // controlled zone supply air inlet index
Expand Down
2 changes: 1 addition & 1 deletion src/EnergyPlus/HVACHXAssistedCoolingCoil.cc
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ namespace HVACHXAssistedCoolingCoil {
int NumAlphas; // Number of alpha inputs
int NumNums; // Number of number inputs
int IOStat; // Return status from GetObjectItem call
static bool ErrorsFound(false); // set TRUE if errors detected in input
bool ErrorsFound(false); // set TRUE if errors detected in input
int NumHXAssistedDXCoils; // Number of HXAssistedCoolingCoil objects using a DX coil
int NumHXAssistedWaterCoils; // Number of HXAssistedCoolingCoil objects using a chilled water coil
// LOGICAL :: FanErrFlag ! Error flag for fan operating mode mining call
Expand Down
2 changes: 1 addition & 1 deletion src/EnergyPlus/HVACSingleDuctInduc.cc
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ namespace HVACSingleDuctInduc {
static int TotalArgs(0); // Total number of alpha and numeric arguments (max) for a
// certain object in the input file
int IOStatus; // Used in GetObjectItem
static bool ErrorsFound(false); // Set to true if errors in input, fatal at end of routine
bool ErrorsFound(false); // Set to true if errors in input, fatal at end of routine
bool IsNotOK; // Flag to verify name
int CtrlZone; // controlled zome do loop index
int SupAirIn; // controlled zone supply air inlet index
Expand Down
2 changes: 1 addition & 1 deletion src/EnergyPlus/HWBaseboardRadiator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ namespace HWBaseboardRadiator {
int NumNumbers; // Number of Numbers for each GetobjectItem call
int SurfNum; // Surface number Do loop counter
int IOStat;
static bool ErrorsFound(false); // If errors detected in input
bool ErrorsFound(false); // If errors detected in input

auto & NumHWBaseboards = state.dataHWBaseboardRad->NumHWBaseboards;
auto & NumHWBaseboardDesignObjs = state.dataHWBaseboardRad->NumHWBaseboardDesignObjs;
Expand Down
2 changes: 1 addition & 1 deletion src/EnergyPlus/HeatBalFiniteDiffManager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ namespace HeatBalFiniteDiffManager {
int MaterialNumAlpha; // Number of material alpha names being passed
int MaterialNumProp; // Number of material properties being passed
Array1D<Real64> MaterialProps(40); // Temporary array to transfer material properties
static bool ErrorsFound(false); // If errors detected in input
bool ErrorsFound(false); // If errors detected in input
int Loop;
int NumAlphas;
int NumNumbers;
Expand Down
2 changes: 1 addition & 1 deletion src/EnergyPlus/HeatBalanceIntRadExchange.cc
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,7 @@ namespace HeatBalanceIntRadExchange {
// SUBROUTINE LOCAL VARIABLE DECLARATIONS:
bool NoUserInputF; // Logical flag signifying no input F's for zone
static bool ViewFactorReport; // Flag to output view factor report in eio file
static bool ErrorsFound(false);
bool ErrorsFound(false);
Real64 CheckValue1;
Real64 CheckValue2;
Real64 FinalCheckValue;
Expand Down
2 changes: 1 addition & 1 deletion src/EnergyPlus/HeatPumpWaterToWaterHEATING.cc
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ namespace EnergyPlus::HeatPumpWaterToWaterHEATING {
Array1D_string AlphArray(5); // character string data
Array1D<Real64> NumArray(23); // numeric data

static bool ErrorsFound(false);
bool ErrorsFound(false);

state.dataHPWaterToWaterHtg->NumGSHPs = inputProcessor->getNumObjectsFound(state, ModuleCompName);

Expand Down
2 changes: 1 addition & 1 deletion src/EnergyPlus/HeatPumpWaterToWaterSimple.cc
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ namespace EnergyPlus::HeatPumpWaterToWaterSimple {
int NumNums; // Number of elements in the numeric array
int IOStat; // IO Status when calling get input subroutine

static bool ErrorsFound(false);
bool ErrorsFound(false);

NumCoolCoil = inputProcessor->getNumObjectsFound(state, HPEqFitCoolingUC);
NumHeatCoil = inputProcessor->getNumObjectsFound(state, HPEqFitHeatingUC);
Expand Down
4 changes: 2 additions & 2 deletions src/EnergyPlus/HeatRecovery.cc
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ namespace HeatRecovery {
// External function calls

// Functions

void SimHeatRecovery(EnergyPlusData &state,
std::string const &CompName, // name of the heat exchanger unit
bool const FirstHVACIteration, // TRUE if 1st HVAC simulation of system timestep
Expand Down Expand Up @@ -307,7 +307,7 @@ namespace HeatRecovery {
int NumAlphas; // Number of Alphas for each GetObjectItem call
int NumNumbers; // Number of Numbers for each GetObjectItem call
int IOStatus; // Used in GetObjectItem
static bool ErrorsFound(false); // Set to true if errors in input, fatal at end of routine
bool ErrorsFound(false); // Set to true if errors in input, fatal at end of routine
static std::string HeatExchPerfType; // Desiccant balanced heat exchanger performance data type
constexpr const char * RoutineName("GetHeatRecoveryInput: "); // include trailing blank space
auto & cCurrentModuleObject = state.dataIPShortCut->cCurrentModuleObject;
Expand Down
4 changes: 2 additions & 2 deletions src/EnergyPlus/Humidifiers.cc
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ namespace Humidifiers {
int MaxNums; // maximum Number of Numbers for each GetObjectItem call
int MaxAlphas; // maximum Number of Numbers for each GetObjectItem call
int IOStatus; // Used in GetObjectItem
static bool ErrorsFound(false); // Set to true if errors in input, fatal at end of routine
bool ErrorsFound(false); // Set to true if errors in input, fatal at end of routine
std::string CurrentModuleObject; // for ease in getting objects
Array1D_string Alphas; // Alpha input items for object
Array1D_string cAlphaFields; // Alpha field names
Expand Down Expand Up @@ -711,7 +711,7 @@ namespace Humidifiers {
Real64 WaterSatEnthalpy; // enthalpy of saturated water at 100C, J/kg
bool IsAutoSize; // Indicator to autosize
bool HardSizeNoDesRun; // Indicator to a hard-sized field with no design sizing data
static bool ErrorsFound(false); // TRUE if errors detected in input
bool ErrorsFound(false); // TRUE if errors detected in input
Real64 NomPowerDes; // Autosized nominal power for reporting
Real64 NomPowerUser; // Hardsized nominal power for reporting
Real64 MassFlowDes; // Design air mass flow rate
Expand Down
2 changes: 1 addition & 1 deletion src/EnergyPlus/HybridUnitaryAirConditioners.cc
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,7 @@ namespace EnergyPlus::HybridUnitaryAirConditioners {
int NumNumbers; // Number of Numbers for each GetObjectItem call
int NumFields; // Total number of fields in object
int IOStatus; // Used in GetObjectItem
static bool ErrorsFound(false); // Set to true if errors in input, fatal at end of routine
bool ErrorsFound(false); // Set to true if errors in input, fatal at end of routine
bool IsNotOK; // Flag to verify name
bool IsBlank; // Flag for blank name
int UnitLoop;
Expand Down
2 changes: 1 addition & 1 deletion src/EnergyPlus/ICEngineElectricGenerator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ namespace ICEngineElectricGenerator {
int IOStat; // IO Status when calling get input subroutine
Array1D_string AlphArray(10); // character string data
Array1D<Real64> NumArray(11); // numeric data
static bool ErrorsFound(false); // error flag
bool ErrorsFound(false); // error flag


state.dataIPShortCut->cCurrentModuleObject = "Generator:InternalCombustionEngine";
Expand Down
2 changes: 1 addition & 1 deletion src/EnergyPlus/IntegratedHeatPump.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1916,7 +1916,7 @@ namespace EnergyPlus::IntegratedHeatPump {
using VariableSpeedCoils::SimVariableSpeedCoils;
using VariableSpeedCoils::SizeVarSpeedCoil;

static bool ErrorsFound(false); // If errors detected in input
bool ErrorsFound(false); // If errors detected in input
Real64 RatedCapacity(0.0); // rated building cooling load

// Obtains and Allocates AS-IHP related parameters from input file
Expand Down
2 changes: 1 addition & 1 deletion src/EnergyPlus/MatrixDataManager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ namespace MatrixDataManager {
int NumAlphas; // Number of Alphas for each GetObjectItem call
int NumNumbers; // Number of Numbers for each GetObjectItem call
int IOStatus; // Used in GetObjectItem
static bool ErrorsFound(false); // Set to true if errors in input, fatal at end of routine
bool ErrorsFound(false); // Set to true if errors in input, fatal at end of routine
int NumRows;
int NumCols;
int NumElements;
Expand Down
Loading

4 comments on commit b338a95

@nrel-bot-3
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

develop (Myoldmopar) - x86_64-MacOS-10.15-clang-11.0.0: OK (2349 of 2349 tests passed, 0 test warnings)

Build Badge Test Badge

@nrel-bot-2
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

develop (Myoldmopar) - x86_64-Linux-Ubuntu-18.04-gcc-7.5: OK (2369 of 2369 tests passed, 0 test warnings)

Build Badge Test Badge

@nrel-bot-2
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

develop (Myoldmopar) - x86_64-Linux-Ubuntu-18.04-gcc-7.5-UnitTestsCoverage-Debug: OK (1625 of 1625 tests passed, 0 test warnings)

Build Badge Test Badge Coverage Badge

@nrel-bot-2
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

develop (Myoldmopar) - x86_64-Linux-Ubuntu-18.04-gcc-7.5-IntegrationCoverage-Debug: OK (726 of 727 tests passed, 0 test warnings)

Failures:\n

integration Test Summary

  • Passed: 726
  • Timeout: 1

Build Badge Test Badge Coverage Badge

Please sign in to comment.