Skip to content

Commit

Permalink
Merge pull request #8211 from NREL/global_pimplDesign
Browse files Browse the repository at this point in the history
Global Pointer-to-Implementation Redesign
  • Loading branch information
mitchute authored Aug 27, 2020
2 parents 77bde52 + a344248 commit 9625800
Show file tree
Hide file tree
Showing 21 changed files with 609 additions and 459 deletions.
44 changes: 22 additions & 22 deletions src/EnergyPlus/AirLoopHVACDOAS.cc
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,10 @@ namespace AirLoopHVACDOAS {
{

// Obtains and Allocates unitary system related parameters from input file
if (state.dataAirLoopHVACDOAS.GetInputOnceFlag) {
if (state.dataAirLoopHVACDOAS->GetInputOnceFlag) {
// Get the AirLoopHVACDOAS input
getAirLoopDOASInput(state);
state.dataAirLoopHVACDOAS.GetInputOnceFlag = false;
state.dataAirLoopHVACDOAS->GetInputOnceFlag = false;
}

if (CompIndex == -1) {
Expand All @@ -118,13 +118,13 @@ namespace AirLoopHVACDOAS {
AirLoopMixer *AirLoopMixer::factory(EnergyPlusData &state, int object_num, std::string const &objectName)
{

if (state.dataAirLoopHVACDOAS.getAirLoopMixerInputOnceFlag) {
if (state.dataAirLoopHVACDOAS->getAirLoopMixerInputOnceFlag) {
AirLoopMixer::getAirLoopMixer(state);
state.dataAirLoopHVACDOAS.getAirLoopMixerInputOnceFlag = false;
state.dataAirLoopHVACDOAS->getAirLoopMixerInputOnceFlag = false;
}

int MixerNum = -1;
for (auto &dSpec : state.dataAirLoopHVACDOAS.airloopMixer) {
for (auto &dSpec : state.dataAirLoopHVACDOAS->airloopMixer) {
++MixerNum;
if (UtilityRoutines::SameString(dSpec.name, objectName) && dSpec.m_AirLoopMixer_Num == object_num) {
return &dSpec;
Expand Down Expand Up @@ -190,7 +190,7 @@ namespace AirLoopHVACDOAS {
}
}

state.dataAirLoopHVACDOAS.airloopMixer.push_back(thisMixer);
state.dataAirLoopHVACDOAS->airloopMixer.push_back(thisMixer);
}
if (errorsFound) {
ShowFatalError("getAirLoopMixer: Previous errors cause termination.");
Expand Down Expand Up @@ -227,14 +227,14 @@ namespace AirLoopHVACDOAS {
}

int getAirLoopMixerIndex(EnergyPlusData &state, std::string const &objectName) {
if (state.dataAirLoopHVACDOAS.getAirLoopMixerInputOnceFlag) {
if (state.dataAirLoopHVACDOAS->getAirLoopMixerInputOnceFlag) {
AirLoopMixer::getAirLoopMixer(state);
state.dataAirLoopHVACDOAS.getAirLoopMixerInputOnceFlag = false;
state.dataAirLoopHVACDOAS->getAirLoopMixerInputOnceFlag = false;
}

int index = -1;
for (std::size_t loop = 0; loop < state.dataAirLoopHVACDOAS.airloopMixer.size(); ++loop) {
AirLoopMixer *thisAirLoopMixerObjec = &state.dataAirLoopHVACDOAS.airloopMixer[loop];
for (std::size_t loop = 0; loop < state.dataAirLoopHVACDOAS->airloopMixer.size(); ++loop) {
AirLoopMixer *thisAirLoopMixerObjec = &state.dataAirLoopHVACDOAS->airloopMixer[loop];
if (UtilityRoutines::SameString(objectName, thisAirLoopMixerObjec->name)) {
index = loop;
return index;
Expand All @@ -247,13 +247,13 @@ namespace AirLoopHVACDOAS {
AirLoopSplitter *AirLoopSplitter::factory(EnergyPlusData &state, int object_num, std::string const &objectName)
{

if (state.dataAirLoopHVACDOAS.getAirLoopSplitterInputOnceFlag) {
if (state.dataAirLoopHVACDOAS->getAirLoopSplitterInputOnceFlag) {
AirLoopSplitter::getAirLoopSplitter(state);
state.dataAirLoopHVACDOAS.getAirLoopSplitterInputOnceFlag = false;
state.dataAirLoopHVACDOAS->getAirLoopSplitterInputOnceFlag = false;
}

int SplitterNum = -1;
for (auto &dSpec : state.dataAirLoopHVACDOAS.airloopSplitter) {
for (auto &dSpec : state.dataAirLoopHVACDOAS->airloopSplitter) {
SplitterNum++;
if (UtilityRoutines::SameString(dSpec.name, objectName) && dSpec.m_AirLoopSplitter_Num == object_num) {
return &dSpec;
Expand All @@ -274,14 +274,14 @@ namespace AirLoopHVACDOAS {
}

int getAirLoopSplitterIndex(EnergyPlusData &state, std::string const &objectName) {
if (state.dataAirLoopHVACDOAS.getAirLoopSplitterInputOnceFlag) {
if (state.dataAirLoopHVACDOAS->getAirLoopSplitterInputOnceFlag) {
AirLoopSplitter::getAirLoopSplitter(state);
state.dataAirLoopHVACDOAS.getAirLoopSplitterInputOnceFlag = false;
state.dataAirLoopHVACDOAS->getAirLoopSplitterInputOnceFlag = false;
}

int index = -1;
for (std::size_t loop = 0; loop < state.dataAirLoopHVACDOAS.airloopSplitter.size(); ++loop) {
AirLoopSplitter *thisAirLoopSplitterObjec = &state.dataAirLoopHVACDOAS.airloopSplitter[loop];
for (std::size_t loop = 0; loop < state.dataAirLoopHVACDOAS->airloopSplitter.size(); ++loop) {
AirLoopSplitter *thisAirLoopSplitterObjec = &state.dataAirLoopHVACDOAS->airloopSplitter[loop];
if (UtilityRoutines::SameString(objectName, thisAirLoopSplitterObjec->name)) {
index = loop;
return index;
Expand Down Expand Up @@ -340,7 +340,7 @@ namespace AirLoopHVACDOAS {
}
}

state.dataAirLoopHVACDOAS.airloopSplitter.push_back(thisSplitter);
state.dataAirLoopHVACDOAS->airloopSplitter.push_back(thisSplitter);
}
if (errorsFound) {
ShowFatalError("getAirLoopSplitter: Previous errors cause termination.");
Expand Down Expand Up @@ -769,7 +769,7 @@ namespace AirLoopHVACDOAS {
}

thisDOAS.m_AirLoopDOASNum = AirLoopDOASNum - 1;
state.dataAirLoopHVACDOAS.airloopDOAS.push_back(thisDOAS);
state.dataAirLoopHVACDOAS->airloopDOAS.push_back(thisDOAS);
}

// Check valid OA controller
Expand Down Expand Up @@ -950,9 +950,9 @@ namespace AirLoopHVACDOAS {

void getAirLoopHVACDOASInput(EnergyPlusData &state)
{
if (state.dataAirLoopHVACDOAS.GetInputOnceFlag) {
if (state.dataAirLoopHVACDOAS->GetInputOnceFlag) {
AirLoopDOAS::getAirLoopDOASInput(state);
state.dataAirLoopHVACDOAS.GetInputOnceFlag = false;
state.dataAirLoopHVACDOAS->GetInputOnceFlag = false;
}
}

Expand Down Expand Up @@ -1002,7 +1002,7 @@ namespace AirLoopHVACDOAS {
Real64 maxDiff;
Real64 Diff;
Real64 OldTemp;
for (auto & loop : state.dataAirLoopHVACDOAS.airloopDOAS) {
for (auto & loop : state.dataAirLoopHVACDOAS->airloopDOAS) {
maxDiff = 0.0;
Diff = std::abs(loop.m_CompPointerAirLoopSplitter->InletTemp -
DataLoopNode::Node(loop.m_CompPointerAirLoopSplitter->OutletNodeNum[0]).Temp);
Expand Down
Loading

14 comments on commit 9625800

@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 (mitchute) - x86_64-MacOS-10.15-clang-11.0.0: OK (2207 of 2208 tests passed, 0 test warnings)

Failures:\n

EnergyPlusFixture Test Summary

  • Passed: 1065
  • Failed: 1

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 (mitchute) - x86_64-Linux-Ubuntu-18.04-cppcheck: OK (0 of 0 tests passed, 0 test warnings)

Build 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 (mitchute) - x86_64-Linux-Ubuntu-18.04-custom_check: OK (13 of 13 tests passed, 0 test warnings)

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

develop (mitchute) - x86_64-Linux-Ubuntu-18.04-gcc-7.5: OK (2228 of 2228 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 (mitchute) - x86_64-Linux-Ubuntu-18.04-gcc-7.5-UnitTestsCoverage-Debug: OK (1490 of 1490 tests passed, 0 test warnings)

Build Badge Test Badge Coverage Badge

@nrel-bot
Copy link

Choose a reason for hiding this comment

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

develop (mitchute) - Win64-Windows-10-VisualStudio-16: OK (2183 of 2183 tests passed, 0 test warnings)

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.

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

Build Badge Test Badge Coverage 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.

8091-OscillatingWinterDDZoneLoadCeilingDiffuserModel (mitchute) - x86_64-MacOS-10.15-clang-11.0.0: OK (2924 of 2924 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.

8091-OscillatingWinterDDZoneLoadCeilingDiffuserModel (mitchute) - x86_64-Linux-Ubuntu-18.04-gcc-7.5: OK (2963 of 2964 tests passed, 0 test warnings)

Messages:\n

  • 1 test had: EIO diffs.
  • 1 test had: ESO small diffs.
  • 1 test had: MTR small diffs.
  • 1 test had: Table big diffs.

Failures:\n

regression Test Summary

  • Passed: 735
  • Failed: 1

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.

8091-OscillatingWinterDDZoneLoadCeilingDiffuserModel (mitchute) - x86_64-Linux-Ubuntu-18.04-cppcheck: OK (0 of 0 tests passed, 0 test warnings)

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

8091-OscillatingWinterDDZoneLoadCeilingDiffuserModel (mitchute) - x86_64-Linux-Ubuntu-18.04-custom_check: OK (13 of 13 tests passed, 0 test warnings)

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

8091-OscillatingWinterDDZoneLoadCeilingDiffuserModel (mitchute) - x86_64-Linux-Ubuntu-18.04-gcc-7.5-UnitTestsCoverage-Debug: OK (1490 of 1490 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.

8091-OscillatingWinterDDZoneLoadCeilingDiffuserModel (mitchute) - x86_64-Linux-Ubuntu-18.04-gcc-7.5-IntegrationCoverage-Debug: OK (721 of 721 tests passed, 0 test warnings)

Build Badge Test Badge Coverage Badge

@nrel-bot
Copy link

Choose a reason for hiding this comment

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

8091-OscillatingWinterDDZoneLoadCeilingDiffuserModel (mitchute) - Win64-Windows-10-VisualStudio-16: OK (2183 of 2183 tests passed, 0 test warnings)

Build Badge Test Badge

Please sign in to comment.