Skip to content

Commit

Permalink
More reverts
Browse files Browse the repository at this point in the history
  • Loading branch information
rraustad committed Aug 20, 2024
1 parent a0f066f commit 266dfa2
Showing 1 changed file with 9 additions and 11 deletions.
20 changes: 9 additions & 11 deletions src/EnergyPlus/FluidProperties.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2039,7 +2039,6 @@ namespace FluidProperties {
// for the refrigerant properties.
// Most properties requested (e.g., Specific Heat) must be > 0 but the tables may
// be set up for symmetry and not be limited to just valid values.

auto const &df = state.dataFluidProps;

for (auto *refrig : df->refrigs) {
Expand Down Expand Up @@ -2811,7 +2810,6 @@ namespace FluidProperties {
)
{
// Wrapper for RefrigProps::getSatPressure()

auto &df = state.dataFluidProps;

if (RefrigIndex == 0) {
Expand Down Expand Up @@ -2906,7 +2904,6 @@ namespace FluidProperties {
)
{
// Wrapper for RefrigProps::getSatTemperature()

auto &df = state.dataFluidProps;

if (RefrigIndex == 0) {
Expand Down Expand Up @@ -2957,7 +2954,6 @@ namespace FluidProperties {
)
{
// Wrapper for RefrigProps::getSatEnthalpy()

auto &df = state.dataFluidProps;

if (RefrigIndex == 0) {
Expand Down Expand Up @@ -3081,7 +3077,6 @@ namespace FluidProperties {
)
{
// Wrapper for RefrigProps::getSatDensity()

auto &df = state.dataFluidProps;

if (RefrigIndex == 0) {
Expand Down Expand Up @@ -3142,7 +3137,6 @@ namespace FluidProperties {
{

// Wrapper for RefrigProps::getSpecificHeat()

auto &df = state.dataFluidProps;

if (RefrigIndex == 0) {
Expand Down Expand Up @@ -4613,8 +4607,9 @@ namespace FluidProperties {

GlycolRawProps *GetGlycolRaw(EnergyPlusData &state, std::string_view const glycolRawName)
{
auto &df = state.dataFluidProps;
int glycolRawNum = GetGlycolRawNum(state, glycolRawName);
return (glycolRawNum > 0) ? state.dataFluidProps->glycolsRaw(glycolRawNum) : nullptr;
return (glycolRawNum > 0) ? df->glycolsRaw(glycolRawNum) : nullptr;
}

//*****************************************************************************
Expand All @@ -4640,8 +4635,9 @@ namespace FluidProperties {
// Check to see if this glycol shows up in the glycol data
// ArrayLength = SIZE(GlycolData)

if (Idx > 0 && Idx <= state.dataFluidProps->glycols.isize()) {
return state.dataFluidProps->glycols(Idx)->Name;
auto &df = state.dataFluidProps;
if (Idx > 0 && Idx <= df->glycols.isize()) {
return df->glycols(Idx)->Name;
} else { // return blank - error checking in calling proceedure
return "";
}
Expand Down Expand Up @@ -4871,7 +4867,9 @@ namespace FluidProperties {
bool NeedOrphanMessage = true;
int NumUnusedRefrig = 0;

for (auto const *refrig : state.dataFluidProps->refrigs) {
auto const &df = state.dataFluidProps;

for (auto const *refrig : df->refrigs) {
if (refrig->used) continue;
if (refrig->Name == "STEAM") continue;
if (NeedOrphanMessage && state.dataGlobal->DisplayUnusedObjects) {
Expand All @@ -4888,7 +4886,7 @@ namespace FluidProperties {

int NumUnusedGlycol = 0;

for (auto const *glycol : state.dataFluidProps->glycols) {
for (auto const *glycol : df->glycols) {
if (glycol->used) continue;
if (glycol->Name == "WATER") continue;
if (glycol->Name == "ETHYLENEGLYCOL") continue;
Expand Down

4 comments on commit 266dfa2

@nrel-bot
Copy link

Choose a reason for hiding this comment

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

CppCheck-FluidProperties (rraustad) - Win64-Windows-10-VisualStudio-16: OK (2871 of 2871 tests passed, 0 test warnings)

Build Badge Test Badge

@nrel-bot-2c
Copy link

Choose a reason for hiding this comment

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

CppCheck-FluidProperties (rraustad) - x86_64-Linux-Ubuntu-22.04-gcc-11.4: OK (3706 of 3706 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.

CppCheck-FluidProperties (rraustad) - x86_64-Linux-Ubuntu-22.04-gcc-11.4-UnitTestsCoverage-Debug: OK (2077 of 2077 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.

CppCheck-FluidProperties (rraustad) - x86_64-Linux-Ubuntu-22.04-gcc-11.4-IntegrationCoverage-Debug: OK (797 of 797 tests passed, 0 test warnings)

Build Badge Test Badge Coverage Badge

Please sign in to comment.