Skip to content

Commit

Permalink
clang, unused function, std::fill, reduce
Browse files Browse the repository at this point in the history
  • Loading branch information
rraustad committed Sep 22, 2024
1 parent 711bf5c commit f1aaafb
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 41 deletions.
2 changes: 1 addition & 1 deletion src/EnergyPlus/SimulationManager.hh
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ struct SimulationManagerData : BaseGlobalStruct
void Resimulate(EnergyPlusData &state,
bool const ResimExt, // Flag to resimulate the exterior energy use simulation
bool const ResimHB, // Flag to resimulate the heat balance simulation (including HVAC)
bool &ResimHVAC // Flag to resimulate the HVAC simulation
bool &ResimHVAC // Flag to resimulate the HVAC simulation
);

} // namespace EnergyPlus
Expand Down
28 changes: 0 additions & 28 deletions src/EnergyPlus/SingleDuct.cc
Original file line number Diff line number Diff line change
Expand Up @@ -5998,34 +5998,6 @@ void GetATMixer(EnergyPlusData &state,
}
}

void SetATMixerPriFlow(EnergyPlusData &state,
int const ATMixerNum, // Air terminal mixer index
ObjexxFCL::Optional<Real64 const> PriAirMassFlowRate // Air terminal mixer primary air mass flow rate [kg/s]
)
{

// SUBROUTINE INFORMATION:
// AUTHOR Fred Buhl
// DATE WRITTEN April 2012

// PURPOSE OF THIS SUBROUTINE:
// This Subroutine sets the primary air mass flow rate on the primary air inlet
// node of a terminal unit mixer component.

// METHODOLOGY EMPLOYED:
// The flow is set to either the input PriAirMassFlowRate if this optional input
// parameter is present, or to the maximum available mass flow rate of the primary
// air inlet node.

if (ATMixerNum <= 0) return;
int const PriAirNode = state.dataSingleDuct->SysATMixer(ATMixerNum).PriInNode; // air terminal mixer primary air inlet node number
if (present(PriAirMassFlowRate)) {
state.dataLoopNodes->Node(PriAirNode).MassFlowRate = PriAirMassFlowRate;
} else {
state.dataLoopNodes->Node(PriAirNode).MassFlowRate = state.dataLoopNodes->Node(PriAirNode).MassFlowRateMaxAvail;
}
}

void setATMixerSizingProperties(EnergyPlusData &state,
int const inletATMixerIndex, // index to ATMixer at inlet of zone equipment
int const controlledZoneNum, // controlled zone number
Expand Down
5 changes: 0 additions & 5 deletions src/EnergyPlus/SingleDuct.hh
Original file line number Diff line number Diff line change
Expand Up @@ -343,11 +343,6 @@ namespace SingleDuct {
int ZoneEquipOutletNode // zone equipment outlet node (used with inlet side mixers)
);

void SetATMixerPriFlow(EnergyPlusData &state,
int ATMixerNum, // Air terminal mixer index
ObjexxFCL::Optional<Real64 const> PriAirMassFlowRate = _ // Air terminal mixer primary air mass flow rate [kg/s]
);

void setATMixerSizingProperties(EnergyPlusData &state,
int inletATMixerIndex, // index to ATMixer at inlet of zone equipment
int controlledZoneNum, // controlled zone number
Expand Down
10 changes: 3 additions & 7 deletions src/EnergyPlus/SizingAnalysisObjects.cc
Original file line number Diff line number Diff line change
Expand Up @@ -278,10 +278,7 @@ Real64 SizingLog::GetLogVariableDataAtTimestamp(ZoneTimestepObject tmpztStepStam
void SizingLog::ReInitLogForIteration()
{
ZoneTimestepObject tmpNullztStepObj;

for (auto &zt : ztStepObj) {
zt = tmpNullztStepObj;
}
std::fill(ztStepObj.begin(), ztStepObj.end(), tmpNullztStepObj);
}

void SizingLog::SetupNewEnvironment(int const seedEnvrnNum, int const newEnvrnNum)
Expand All @@ -291,8 +288,7 @@ void SizingLog::SetupNewEnvironment(int const seedEnvrnNum, int const newEnvrnNu

int SizingLoggerFramework::SetupVariableSizingLog(EnergyPlusData &state, Real64 &rVariable, int stepsInAverage)
{
int VectorLength(0);
int constexpr HoursPerDay(24);
int constexpr HoursPerDay = 24;

SizingLog tmpLog(rVariable);
tmpLog.NumOfEnvironmentsInLogSet = 0;
Expand Down Expand Up @@ -333,7 +329,7 @@ int SizingLoggerFramework::SetupVariableSizingLog(EnergyPlusData &state, Real64

tmpLog.timeStepsInAverage = stepsInAverage;

VectorLength = stepSum;
int VectorLength = stepSum;

tmpLog.NumOfStepsInLogSet = VectorLength;
tmpLog.ztStepObj.resize(VectorLength);
Expand Down

4 comments on commit f1aaafb

@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-SetPointManager (rraustad) - Win64-Windows-10-VisualStudio-16: Tests Failed (0 of 0 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.

CppCheck-SetPointManager (rraustad) - x86_64-Linux-Ubuntu-22.04-gcc-11.4: OK (2913 of 2913 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-SetPointManager (rraustad) - x86_64-Linux-Ubuntu-22.04-gcc-11.4-UnitTestsCoverage-RelWithDebInfo: OK (2097 of 2097 tests passed, 0 test warnings)

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.

CppCheck-SetPointManager (rraustad) - x86_64-Linux-Ubuntu-22.04-gcc-11.4-IntegrationCoverage-RelWithDebInfo: OK (799 of 799 tests passed, 0 test warnings)

Build Badge Test Badge Coverage Badge

Please sign in to comment.