From 53aa631d9e2fb404c5953a70567e72aa04329e0f Mon Sep 17 00:00:00 2001 From: Matt Mitchell Date: Wed, 21 Oct 2020 14:42:57 -0600 Subject: [PATCH] move state out of AirProperties ctor --- .../AirflowNetwork/include/AirflowNetwork/Solver.hpp | 2 +- src/EnergyPlus/AirflowNetwork/src/Solver.cpp | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/EnergyPlus/AirflowNetwork/include/AirflowNetwork/Solver.hpp b/src/EnergyPlus/AirflowNetwork/include/AirflowNetwork/Solver.hpp index 26c4cd901b2..f7913e99024 100644 --- a/src/EnergyPlus/AirflowNetwork/include/AirflowNetwork/Solver.hpp +++ b/src/EnergyPlus/AirflowNetwork/include/AirflowNetwork/Solver.hpp @@ -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 diff --git a/src/EnergyPlus/AirflowNetwork/src/Solver.cpp b/src/EnergyPlus/AirflowNetwork/src/Solver.cpp index 0cd969cc596..ecedceefaf9 100644 --- a/src/EnergyPlus/AirflowNetwork/src/Solver.cpp +++ b/src/EnergyPlus/AirflowNetwork/src/Solver.cpp @@ -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) @@ -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);