Skip to content

Commit 5ce88f5

Browse files
committed
Apply clang format
1 parent 5f53d48 commit 5ce88f5

22 files changed

+1004
-1188
lines changed

src/EnergyPlus/AirflowNetwork/src/Solver.cpp

Lines changed: 14 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -3583,7 +3583,8 @@ namespace AirflowNetwork {
35833583
for (int i = 1; i <= AirflowNetworkNumOfSurfaces; ++i) {
35843584
int j = MultizoneSurfaceData(i).SurfNum;
35853585
auto const &surf = m_state.dataSurface->Surface(j);
3586-
if (surf.OriginalClass == SurfaceClass::Window || surf.OriginalClass == SurfaceClass::Door || surf.OriginalClass == SurfaceClass::GlassDoor) {
3586+
if (surf.OriginalClass == SurfaceClass::Window || surf.OriginalClass == SurfaceClass::Door ||
3587+
surf.OriginalClass == SurfaceClass::GlassDoor) {
35873588
for (n = 1; n <= AirflowNetworkNumOfZones; ++n) {
35883589
if (MultizoneZoneData(n).ZoneNum == m_state.dataSurface->Surface(j).Zone) {
35893590
if (MultizoneZoneData(n).OccupantVentilationControlNum > 0 && MultizoneSurfaceData(i).OccupantVentilationControlNum == 0) {
@@ -4621,7 +4622,7 @@ namespace AirflowNetwork {
46214622
AirflowNetworkLinkageData(count).CompNum = compnum;
46224623

46234624
auto &surf = m_state.dataSurface->Surface(MultizoneSurfaceData(count).SurfNum);
4624-
4625+
46254626
switch (AirflowNetworkLinkageData(count).element->type()) {
46264627
case ComponentType::DOP: {
46274628
// if (AirflowNetworkLinkageData(count).CompName ==
@@ -4638,17 +4639,15 @@ namespace AirflowNetwork {
46384639
ShowContinueError(m_state, "10 deg of being horizontal. Airflows through large horizontal openings are poorly");
46394640
ShowContinueError(m_state, "modeled in the AirflowNetwork model resulting in only one-way airflow.");
46404641
}
4641-
if (!(surf.OriginalClass == SurfaceClass::Window ||
4642-
surf.OriginalClass == SurfaceClass::GlassDoor ||
4643-
surf.OriginalClass == SurfaceClass::Door ||
4644-
surf.IsAirBoundarySurf)) {
4642+
if (!(surf.OriginalClass == SurfaceClass::Window || surf.OriginalClass == SurfaceClass::GlassDoor ||
4643+
surf.OriginalClass == SurfaceClass::Door || surf.IsAirBoundarySurf)) {
46454644
ShowSevereError(m_state,
46464645
format(RoutineName) +
46474646
"AirflowNetworkComponent: The opening must be assigned to a window, door, glassdoor or air boundary at " +
46484647
AirflowNetworkLinkageData(count).Name);
46494648
ErrorsFound = true;
46504649
}
4651-
4650+
46524651
if (surf.OriginalClass == SurfaceClass::Door || surf.OriginalClass == SurfaceClass::GlassDoor) {
46534652
if (MultizoneCompDetOpeningData(AirflowNetworkCompData(compnum).TypeNum).LVOType == 2) {
46544653
ShowSevereError(m_state,
@@ -4671,10 +4670,8 @@ namespace AirflowNetwork {
46714670
ErrorsFound = true;
46724671
}
46734672

4674-
if (!(surf.OriginalClass == SurfaceClass::Window ||
4675-
surf.OriginalClass == SurfaceClass::GlassDoor ||
4676-
surf.OriginalClass == SurfaceClass::Door ||
4677-
surf.IsAirBoundarySurf)) {
4673+
if (!(surf.OriginalClass == SurfaceClass::Window || surf.OriginalClass == SurfaceClass::GlassDoor ||
4674+
surf.OriginalClass == SurfaceClass::Door || surf.IsAirBoundarySurf)) {
46784675
ShowSevereError(m_state,
46794676
format(RoutineName) +
46804677
"AirflowNetworkComponent: The opening must be assigned to a window, door, glassdoor or air boundary at " +
@@ -4721,10 +4718,8 @@ namespace AirflowNetwork {
47214718
"with the object of AirflowNetwork:Multizone:Component:HorizontalOpening = " +
47224719
AirflowNetworkCompData(compnum).Name);
47234720
}
4724-
if (!(surf.OriginalClass == SurfaceClass::Window ||
4725-
surf.OriginalClass == SurfaceClass::GlassDoor ||
4726-
surf.OriginalClass == SurfaceClass::Door ||
4727-
surf.IsAirBoundarySurf)) {
4721+
if (!(surf.OriginalClass == SurfaceClass::Window || surf.OriginalClass == SurfaceClass::GlassDoor ||
4722+
surf.OriginalClass == SurfaceClass::Door || surf.IsAirBoundarySurf)) {
47284723
ShowSevereError(m_state,
47294724
format(RoutineName) +
47304725
"AirflowNetworkComponent: The opening must be assigned to a window, door, glassdoor or air boundary at " +
@@ -6429,8 +6424,7 @@ namespace AirflowNetwork {
64296424
if (MultizoneSurfaceData(i).OccupantVentilationControlNum == 0) MultizoneSurfaceData(i).OpenFactor = 0.0;
64306425
j = MultizoneSurfaceData(i).SurfNum;
64316426
auto const &surf = m_state.dataSurface->Surface(j);
6432-
if (surf.OriginalClass == SurfaceClass::Window ||
6433-
surf.OriginalClass == SurfaceClass::Door ||
6427+
if (surf.OriginalClass == SurfaceClass::Window || surf.OriginalClass == SurfaceClass::Door ||
64346428
surf.OriginalClass == SurfaceClass::GlassDoor || surf.IsAirBoundarySurf) {
64356429
if (MultizoneSurfaceData(i).OccupantVentilationControlNum > 0) {
64366430
if (MultizoneSurfaceData(i).OpeningStatus == OpenStatus::FreeOperation) {
@@ -6511,8 +6505,7 @@ namespace AirflowNetwork {
65116505
if (i > AirflowNetworkNumOfSurfaces - NumOfLinksIntraZone) continue;
65126506
j = MultizoneSurfaceData(i).SurfNum;
65136507
auto const &surf = m_state.dataSurface->Surface(j);
6514-
if (surf.OriginalClass == SurfaceClass::Window ||
6515-
surf.OriginalClass == SurfaceClass::Door ||
6508+
if (surf.OriginalClass == SurfaceClass::Window || surf.OriginalClass == SurfaceClass::Door ||
65166509
surf.OriginalClass == SurfaceClass::GlassDoor) {
65176510
if (MultizoneSurfaceData(i).HybridCtrlGlobal) {
65186511
MultizoneSurfaceData(i).OpenFactor = GlobalOpenFactor;
@@ -11301,7 +11294,7 @@ namespace AirflowNetwork {
1130111294
for (ANSurfaceNum = 1; ANSurfaceNum <= AirflowNetworkNumOfSurfaces; ++ANSurfaceNum) {
1130211295
SurfNum = MultizoneSurfaceData(ANSurfaceNum).SurfNum;
1130311296
auto const &surf = m_state.dataSurface->Surface(SurfNum);
11304-
11297+
1130511298
if (surf.Zone == ActualZoneNum) {
1130611299
if (VentilationCtrl == HybridVentCtrl_Close) {
1130711300
MultizoneSurfaceData(ANSurfaceNum).HybridVentClose = true;
@@ -11312,8 +11305,7 @@ namespace AirflowNetwork {
1131211305
if (ControlType == GlobalCtrlType) {
1131311306
MultizoneSurfaceData(ANSurfaceNum).HybridCtrlGlobal = true;
1131411307
if (HybridVentSysAvailMaster(SysAvailNum) == ActualZoneNum) {
11315-
if ((surf.OriginalClass == SurfaceClass::Window ||
11316-
surf.OriginalClass == SurfaceClass::Door ||
11308+
if ((surf.OriginalClass == SurfaceClass::Window || surf.OriginalClass == SurfaceClass::Door ||
1131711309
surf.OriginalClass == SurfaceClass::GlassDoor) &&
1131811310
surf.ExtBoundCond == ExternalEnvironment) {
1131911311
MultizoneSurfaceData(ANSurfaceNum).HybridCtrlMaster = true;

src/EnergyPlus/CostEstimateManager.cc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -880,8 +880,7 @@ namespace CostEstimateManager {
880880
} break;
881881
case ParentObject::DaylightingControls: {
882882
if (state.dataCostEstimateManager->CostLineItem(Item).ParentObjName == "*") { // wildcard, apply to all such components
883-
state.dataCostEstimateManager->CostLineItem(Item).Qty =
884-
sum(state.dataDayltg->ZoneDaylight, &Dayltg::ZoneDaylightCalc::totRefPts);
883+
state.dataCostEstimateManager->CostLineItem(Item).Qty = sum(state.dataDayltg->ZoneDaylight, &Dayltg::ZoneDaylightCalc::totRefPts);
885884
} else if (!state.dataCostEstimateManager->CostLineItem(Item).ParentObjName.empty()) {
886885
ThisZoneID = Util::FindItem(state.dataCostEstimateManager->CostLineItem(Item).ParentObjName, Zone);
887886
if (ThisZoneID > 0) {

src/EnergyPlus/DElightManagerF.cc

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -260,14 +260,14 @@ namespace DElightManagerF {
260260
refPt.absCoords = {0.0, 0.0, 0.0};
261261
refPt.lums[(int)Lum::Illum] = 0.0;
262262
refPt.glareIndex = 0.0;
263-
}
263+
}
264264

265265
// RJH 2008-03-07: Allocate and Init DaylIllumAtRefPt array for this DElight zone
266-
//znDayl.DaylIllumAtRefPt.allocate(znDayl.TotalDaylRefPoints);
267-
//znDayl.DaylIllumAtRefPt = 0.0;
266+
// znDayl.DaylIllumAtRefPt.allocate(znDayl.TotalDaylRefPoints);
267+
// znDayl.DaylIllumAtRefPt = 0.0;
268268
// The following not used in DElight but allocated for convenience
269-
//znDayl.GlareIndexAtRefPt.allocate(znDayl.TotalDaylRefPoints);
270-
//znDayl.GlareIndexAtRefPt = 0.0;
269+
// znDayl.GlareIndexAtRefPt.allocate(znDayl.TotalDaylRefPoints);
270+
// znDayl.GlareIndexAtRefPt = 0.0;
271271

272272
// Increment counter of Thermal Zones with valid hosted DElight object
273273
++iNumDElightZones;
@@ -585,7 +585,7 @@ namespace DElightManagerF {
585585
RefPt_WCS_Coord.x = Xb * CosBldgRelNorth - Yb * SinBldgRelNorth;
586586
RefPt_WCS_Coord.y = Xb * SinBldgRelNorth + Yb * CosBldgRelNorth;
587587
RefPt_WCS_Coord.z = refPt.coords.z + thisZone.OriginZ;
588-
if (ldoTransform) { // Geometry transform
588+
if (ldoTransform) { // Geometry transform
589589
Xo = RefPt_WCS_Coord.x; // world coordinates.... shifted by relative north angle...
590590
Yo = RefPt_WCS_Coord.y;
591591
// next derotate the building

src/EnergyPlus/DataDaylighting.hh

Lines changed: 26 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ namespace EnergyPlus {
6565
namespace Dayltg {
6666

6767
using DataSurfaces::Lum;
68-
68+
6969
// Two kinds of reference points: used directly in daylighting, used to show illuminance map of zone
7070
constexpr int MaxMapRefPoints(2500); // Maximum number of Illuminance Map Ref Points
7171

@@ -83,7 +83,7 @@ namespace Dayltg {
8383
{
8484
std::array<Real64, (int)SkyType::Num> sky = {0.0, 0.0, 0.0, 0.0};
8585
Real64 sun = 0.0;
86-
Real64 sunDisk = 0.0;
86+
Real64 sunDisk = 0.0;
8787
};
8888

8989
enum class ExtWinType
@@ -158,12 +158,13 @@ namespace Dayltg {
158158
EPVector<int> daylightControlIndexes; // Indexes to daylighting:controls object operating in this enclosure
159159
};
160160

161-
struct DaylRefPtExtWin {
161+
struct DaylRefPtExtWin
162+
{
162163
Real64 solidAng = 0.0;
163164
Real64 solidAngWtd = 0.0;
164165
std::array<std::array<Real64, (int)DataSurfaces::WinCover::Num>, (int)Lum::Num> lums;
165166
};
166-
167+
167168
struct DaylRefPt
168169
{
169170
int num = 0;
@@ -179,7 +180,7 @@ namespace Dayltg {
179180

180181
Array1D<DaylRefPtExtWin> extWins;
181182
};
182-
183+
183184
struct DaylightingControl
184185
{
185186
std::string Name; // Name of the daylighting:controls object
@@ -190,20 +191,20 @@ namespace Dayltg {
190191
Dayltg::DaylightingMethod DaylightMethod = DaylightingMethod::None; // Type of Daylighting (1=SplitFlux, 2=DElight)
191192
int AvailSchedNum = 0; // pointer to availability schedule if present
192193
int TotalExtWindows = 0;
193-
int TotalDaylRefPoints = 0; // Number of daylighting reference points for this control
194+
int TotalDaylRefPoints = 0; // Number of daylighting reference points for this control
194195

195-
Array1D<DaylRefPt> refPts; // Points 1 and 2 are the control reference points
196+
Array1D<DaylRefPt> refPts; // Points 1 and 2 are the control reference points
196197
Real64 sumFracLights = 0.0; // Sum of lighting control fractions for this daylighting control
197198
LtgCtrlType LightControlType = LtgCtrlType::Continuous; // Lighting control type (same for all reference points)
198-
int glareRefPtNumber = 0; // from field: Glare Calculation Daylighting Reference Point Name
199-
Real64 ViewAzimuthForGlare = 0.0; // View direction relative to window for glare calculation (deg)
200-
int MaxGlareallowed = 0; // Maximum allowable discomfort glare index
201-
Real64 MinPowerFraction = 0.0; // Minimum fraction of power input that continuous dimming system can dim down to
202-
Real64 MinLightFraction = 0.0; // Minimum fraction of light output that continuous dimming system can dim down to
203-
int LightControlSteps = 0; // Number of levels (excluding zero) of stepped control system
204-
Real64 LightControlProbability = 0.0; // For manual control of stepped systems, probability that lighting will
205-
Real64 PowerReductionFactor = 1.0; // Electric power reduction factor for this control due to daylighting
206-
Real64 DElightGriddingResolution = 0.0; // Field: Delight Gridding Resolution
199+
int glareRefPtNumber = 0; // from field: Glare Calculation Daylighting Reference Point Name
200+
Real64 ViewAzimuthForGlare = 0.0; // View direction relative to window for glare calculation (deg)
201+
int MaxGlareallowed = 0; // Maximum allowable discomfort glare index
202+
Real64 MinPowerFraction = 0.0; // Minimum fraction of power input that continuous dimming system can dim down to
203+
Real64 MinLightFraction = 0.0; // Minimum fraction of light output that continuous dimming system can dim down to
204+
int LightControlSteps = 0; // Number of levels (excluding zero) of stepped control system
205+
Real64 LightControlProbability = 0.0; // For manual control of stepped systems, probability that lighting will
206+
Real64 PowerReductionFactor = 1.0; // Electric power reduction factor for this control due to daylighting
207+
Real64 DElightGriddingResolution = 0.0; // Field: Delight Gridding Resolution
207208

208209
// Allocatable daylight factor arrays
209210
// Arguments (dimensions) for Dayl---Sky are:
@@ -213,8 +214,8 @@ namespace Dayltg {
213214
// 3: Reference point number (1 to Total Daylighting Reference Points)
214215
// 4: Sky type (1 to 4; 1 = clear, 2 = clear turbid, 3 = intermediate, 4 = overcast
215216
// 5: Daylit window number (1 to NumOfDayltgExtWins)
216-
std::array<Array3D<std::array<Dayltg::Illums, (int)Lum::Num>>, (int)Constant::HoursInDay+1> daylFac;
217-
217+
std::array<Array3D<std::array<Dayltg::Illums, (int)Lum::Num>>, (int)Constant::HoursInDay + 1> daylFac;
218+
218219
// Time exceeding daylight illuminance setpoint at reference points (hours)
219220
// Array1D<Real64> TimeExceedingDaylightIlluminanceSPAtRefPt;
220221
std::vector<std::vector<int>> ShadeDeployOrderExtWins; // describes how the fenestration surfaces should deploy the shades.
@@ -239,7 +240,7 @@ namespace Dayltg {
239240

240241
Array1D<std::array<Real64, (int)DataSurfaces::WinCover::Num>> winLums;
241242
};
242-
243+
243244
struct IllumMap
244245
{
245246
// Members
@@ -260,22 +261,22 @@ namespace Dayltg {
260261
int HeaderXLineLength = 0; // actual length of this X header line
261262
std::string pointsHeader; // part of the header that lists the reference points in the same zone
262263

263-
int TotalMapRefPoints = 0; // Number of illuminance map reference points in this zone (up to 100)
264-
Array1D<DaylMapPt> refPts;
264+
int TotalMapRefPoints = 0; // Number of illuminance map reference points in this zone (up to 100)
265+
Array1D<DaylMapPt> refPts;
265266
// Arguments (dimensions) for Dayl---Sky are:
266267
// 1: Sun position index / HourOfDay (1 to 24)
267268
// 2: Daylit window number (1 to NumOfDayltgExtWins)
268269
// 3: Reference point number (1 to Total Map Reference Points)
269270
// 4: Shading index (1 to MaxSlatAngs+1; 1 = bare window; 2 = with shade, or, if blinds
270271
// 2 = first slat position, 3 = second position, ..., MaxSlatAngs+1 = last position)
271-
std::array<Array3D<Dayltg::Illums>, (int)Constant::HoursInDay+1> daylFac;
272+
std::array<Array3D<Dayltg::Illums>, (int)Constant::HoursInDay + 1> daylFac;
272273
};
273274

274275
struct RefPointData
275276
{
276-
std::string Name; // Map name
277-
int ZoneNum = 0; // Pointer to zone being referenced
278-
Vector3<Real64> coords = {0.0, 0.0, 0.0}; // x coordinate
277+
std::string Name; // Map name
278+
int ZoneNum = 0; // Pointer to zone being referenced
279+
Vector3<Real64> coords = {0.0, 0.0, 0.0}; // x coordinate
279280
int indexToFracAndIllum = 0;
280281
};
281282

0 commit comments

Comments
 (0)