Skip to content

Commit

Permalink
Initial PollutionModule cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
amirroth committed Jul 31, 2023
1 parent a8b7444 commit efa3209
Show file tree
Hide file tree
Showing 11 changed files with 662 additions and 7,680 deletions.
4 changes: 2 additions & 2 deletions src/EnergyPlus/Data/EnergyPlusData.cc
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ EnergyPlusData::EnergyPlusData()
this->dataPlantValves = std::make_unique<PlantValvesData>();
this->dataPlnt = std::make_unique<DataPlantData>();
this->dataPluginManager = std::make_unique<PluginManagerData>();
this->dataPollutionModule = std::make_unique<PollutionModuleData>();
this->dataPollution = std::make_unique<PollutionData>();
this->dataPondGHE = std::make_unique<PondGroundHeatExchangerData>();
this->dataPowerInductionUnits = std::make_unique<PoweredInductionUnitsData>();
this->dataPsychrometrics = std::make_unique<PsychrometricsData>();
Expand Down Expand Up @@ -469,7 +469,7 @@ void EnergyPlusData::clear_state()
this->dataPlantValves->clear_state();
this->dataPlnt->clear_state();
this->dataPluginManager->clear_state();
this->dataPollutionModule->clear_state();
this->dataPollution->clear_state();
this->dataPondGHE->clear_state();
this->dataPowerInductionUnits->clear_state();
this->dataPsychrometrics->clear_state();
Expand Down
4 changes: 2 additions & 2 deletions src/EnergyPlus/Data/EnergyPlusData.hh
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ struct PlantPressureSysData;
struct PlantUtilitiesData;
struct PlantValvesData;
struct PluginManagerData;
struct PollutionModuleData;
struct PollutionData;
struct PondGroundHeatExchangerData;
struct PoweredInductionUnitsData;
struct PsychrometricsData;
Expand Down Expand Up @@ -485,7 +485,7 @@ struct EnergyPlusData : BaseGlobalStruct
std::unique_ptr<PlantUtilitiesData> dataPlantUtilities;
std::unique_ptr<PlantValvesData> dataPlantValves;
std::unique_ptr<PluginManagerData> dataPluginManager;
std::unique_ptr<PollutionModuleData> dataPollutionModule;
std::unique_ptr<PollutionData> dataPollution;
std::unique_ptr<PondGroundHeatExchangerData> dataPondGHE;
std::unique_ptr<PoweredInductionUnitsData> dataPowerInductionUnits;
std::unique_ptr<PsychrometricsData> dataPsychrometrics;
Expand Down
2 changes: 1 addition & 1 deletion src/EnergyPlus/HVACManager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,7 @@ void ManageHVAC(EnergyPlusData &state)
if (!state.dataGlobal->WarmupFlag) {
if (state.dataGlobal->DoOutputReporting && !state.dataGlobal->ZoneSizingCalc) {
NodeInputManager::CalcMoreNodeInfo(state);
PollutionModule::CalculatePollution(state);
Pollution::CalculatePollution(state);
SystemReports::InitEnergyReports(state);
SystemReports::ReportSystemEnergyUse(state);
}
Expand Down
2 changes: 1 addition & 1 deletion src/EnergyPlus/OutputProcessor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6169,7 +6169,7 @@ void SetInitialMeterReportingAndOutputNames(EnergyPlusData &state,
}
}

int GetMeterIndex(EnergyPlusData &state, std::string const &MeterName)
int GetMeterIndex(EnergyPlusData &state, std::string_view const MeterName)
{

// FUNCTION INFORMATION:
Expand Down
2 changes: 1 addition & 1 deletion src/EnergyPlus/OutputProcessor.hh
Original file line number Diff line number Diff line change
Expand Up @@ -889,7 +889,7 @@ void SetInitialMeterReportingAndOutputNames(EnergyPlusData &state,
bool CumulativeIndicator // true if this is a Cumulative meter reporting
);

int GetMeterIndex(EnergyPlusData &state, std::string const &MeterName);
int GetMeterIndex(EnergyPlusData &state, std::string_view const MeterName);

std::string GetMeterResourceType(EnergyPlusData &state, int MeterNumber); // Which Meter Number (from GetMeterIndex)

Expand Down
4 changes: 2 additions & 2 deletions src/EnergyPlus/OutputReportTabular.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2820,8 +2820,8 @@ void GetInputFuelAndPollutionFactors(EnergyPlusData &state)
// na

// Using/Aliasing
using PollutionModule::GetEnvironmentalImpactFactorInfo;
using PollutionModule::GetFuelFactorInfo;
using Pollution::GetEnvironmentalImpactFactorInfo;
using Pollution::GetFuelFactorInfo;

// Locals
// SUBROUTINE ARGUMENT DEFINITIONS:
Expand Down
6,582 changes: 395 additions & 6,187 deletions src/EnergyPlus/PollutionModule.cc

Large diffs are not rendered by default.

Loading

5 comments on commit efa3209

@nrel-bot
Copy link

Choose a reason for hiding this comment

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

Pollution1 (amirroth) - Win64-Windows-10-VisualStudio-16: OK (2668 of 2668 tests passed, 0 test warnings)

Build Badge Test Badge

@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.

Pollution1 (amirroth) - x86_64-MacOS-10.17-clang-13.0.0: OK (3337 of 3441 tests passed, 668 test warnings)

Messages:\n

  • 771 tests had: AUD diffs.
  • 757 tests had: MDD diffs.
  • 771 tests had: MTD diffs.
  • 757 tests had: RDD diffs.
  • 17 tests had: EIO diffs.
  • 75 tests had: ESO big diffs.
  • 67 tests had: MTR big diffs.
  • 15 tests had: SSZ big diffs.
  • 15 tests had: ZSZ big diffs.
  • 101 tests had: Table big diffs.
  • 11 tests had: ERR diffs.
  • 1 test had: ESO small diffs.
  • 2 tests had: Table small diffs.

Failures:\n

regression Test Summary

  • Passed: 668
  • Failed: 104

Build Badge Test Badge

@nrel-bot-2b
Copy link

Choose a reason for hiding this comment

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

Pollution1 (amirroth) - x86_64-Linux-Ubuntu-22.04-gcc-11.3: OK (3378 of 3482 tests passed, 672 test warnings)

Messages:\n

  • 775 tests had: AUD diffs.
  • 761 tests had: MDD diffs.
  • 775 tests had: MTD diffs.
  • 761 tests had: RDD diffs.
  • 17 tests had: EIO diffs.
  • 75 tests had: ESO big diffs.
  • 67 tests had: MTR big diffs.
  • 15 tests had: SSZ big diffs.
  • 15 tests had: ZSZ big diffs.
  • 101 tests had: Table big diffs.
  • 11 tests had: ERR diffs.
  • 1 test had: ESO small diffs.
  • 2 tests had: Table small diffs.

Failures:\n

regression Test Summary

  • Passed: 688
  • Failed: 104

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.

Pollution1 (amirroth) - x86_64-Linux-Ubuntu-22.04-gcc-11.3-UnitTestsCoverage-Debug: OK (1849 of 1895 tests passed, 0 test warnings)

Failures:\n

API Test Summary

  • Passed: 5
  • Failed: 1
  • Subprocess aborted: 9

EnergyPlusFixture Test Summary

  • Passed: 1403
  • Subprocess aborted: 34

SQLiteFixture Test Summary

  • Passed: 94
  • Subprocess aborted: 2

Build Badge Test Badge Coverage Badge

@nrel-bot-2b
Copy link

Choose a reason for hiding this comment

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

Pollution1 (amirroth) - x86_64-Linux-Ubuntu-22.04-gcc-11.3-IntegrationCoverage-Debug: Tests Failed (2 of 776 tests passed, 0 test warnings)

Failures:\n

integration Test Summary

  • Passed: 2
  • Failed: 774

Build Badge Test Badge Coverage Badge

Please sign in to comment.