Skip to content

Commit

Permalink
move state out of AirProperties ctor
Browse files Browse the repository at this point in the history
  • Loading branch information
mitchute committed Oct 21, 2020
1 parent fdf0d8a commit 53aa631
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ namespace AirflowNetwork {
Real64 sqrtDensity{0.0};
Real64 viscosity{AIRDYNAMICVISCOSITY(20.0)};

explicit AirProperties(EnergyPlusData &state);
explicit AirProperties(double const airDensity);
};

// Forward declaration
Expand Down
8 changes: 4 additions & 4 deletions src/EnergyPlus/AirflowNetwork/src/Solver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -152,10 +152,10 @@ namespace AirflowNetwork {

// Functions

AirProperties::AirProperties(EnergyPlusData &state)
AirProperties::AirProperties(double const airDensity)
{
this->density = AIRDENSITY(state, 20.0, 101325.0, 0.0);
this->sqrtDensity = sqrt(AIRDENSITY(state, 20.0, 101325.0, 0.0));
this->density = airDensity;
this->sqrtDensity = sqrt(airDensity);
}

void Solver::allocate(EnergyPlusData &state)
Expand Down Expand Up @@ -221,7 +221,7 @@ namespace AirflowNetwork {
// VISCZ.allocate(NetworkNumOfNodes);
SUMAF.allocate(NetworkNumOfNodes);

for (int it = 1; it < NetworkNumOfNodes + 1; ++it) properties.emplace_back(state);
for (int it = 1; it < NetworkNumOfNodes + 1; ++it) properties.emplace_back(AIRDENSITY(state, 20.0, 101325.0, 0.0));

ID.allocate(NetworkNumOfNodes);
IK.allocate(NetworkNumOfNodes + 1);
Expand Down

4 comments on commit 53aa631

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

global_utility_routines (mitchute) - x86_64-MacOS-10.15-clang-11.0.0: Build Failed

Failures:\n

API Test Summary

  • Failed: 6
  • notrun: 3

integration Test Summary

  • Passed: 2
  • Failed: 717

regression Test Summary

  • Passed: 715
  • Failed: 2

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.

global_utility_routines (mitchute) - x86_64-Linux-Ubuntu-18.04-gcc-7.5: Build Failed

Failures:\n

API Test Summary

  • Failed: 6
  • notrun: 3

integration Test Summary

  • Passed: 2
  • Failed: 720

regression Test Summary

  • Passed: 735
  • Failed: 2

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.

global_utility_routines (mitchute) - x86_64-Linux-Ubuntu-18.04-gcc-7.5-UnitTestsCoverage-Debug: Build Failed

Failures:\n

API Test Summary

  • Failed: 6
  • notrun: 3

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.

global_utility_routines (mitchute) - x86_64-Linux-Ubuntu-18.04-gcc-7.5-IntegrationCoverage-Debug: Build Failed

Failures:\n

integration Test Summary

  • Passed: 2
  • Failed: 720

Build Badge Test Badge Coverage Badge

Please sign in to comment.