Skip to content

Commit

Permalink
Unify illum, back, and source in enum-indexed array
Browse files Browse the repository at this point in the history
  • Loading branch information
amirroth committed Dec 26, 2023
1 parent 4403dd9 commit 2ccf245
Show file tree
Hide file tree
Showing 4 changed files with 506 additions and 565 deletions.
25 changes: 17 additions & 8 deletions src/EnergyPlus/DataDaylighting.hh
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,14 @@ namespace Dayltg {
Real64 sunDisk = 0.0;
};

enum class Lum {
Invalid = -1,
Illum,
Back,
Source,
Num
};

enum class ExtWinType
{
Invalid = -1,
Expand Down Expand Up @@ -194,11 +202,14 @@ namespace Dayltg {
Array1D<Real64> BacLum; // =0.0 ! Background luminance at each reference point (cd/m2)
Array2D<Real64> SolidAngAtRefPt; // (Number of Zones, Total Daylighting Reference Points)
Array2D<Real64> SolidAngAtRefPtWtd; // (Number of Zones, Total Daylighting Reference Points)
Array2D<std::array<Real64, (int)DataSurfaces::WinCover::Num>> IllumFromWinAtRefPt; // (Number of Zones, 2, Total Daylighting Reference Points)
Array2D<std::array<Real64, (int)DataSurfaces::WinCover::Num>>
BackLumFromWinAtRefPt; // (Number of Zones, 2, Total Daylighting Reference Points)
Array2D<std::array<Real64, (int)DataSurfaces::WinCover::Num>>
SourceLumFromWinAtRefPt; // (Number of Zones, 2, Total Daylighting Reference Points)
Array2D<std::array<std::array<Real64, (int)DataSurfaces::WinCover::Num>, (int)Lum::Num>> DaylFromWinAtRefPt; // (Number of Zones, 2, Total Daylighting Reference Points)


// Array2D<std::array<Real64, (int)DataSurfaces::WinCover::Num>> IllumFromWinAtRefPt; // (Number of Zones, 2, Total Daylighting Reference Points)
// Array2D<std::array<Real64, (int)DataSurfaces::WinCover::Num>>
//BackLumFromWinAtRefPt; // (Number of Zones, 2, Total Daylighting Reference Points)
// Array2D<std::array<Real64, (int)DataSurfaces::WinCover::Num>>
// SourceLumFromWinAtRefPt; // (Number of Zones, 2, Total Daylighting Reference Points)
Array1D<Real64> TimeExceedingGlareIndexSPAtRefPt;
// Allocatable daylight factor arrays
// Arguments (dimensions) for Dayl---Sky are:
Expand All @@ -208,9 +219,7 @@ namespace Dayltg {
// 3: Reference point number (1 to Total Daylighting Reference Points)
// 4: Sky type (1 to 4; 1 = clear, 2 = clear turbid, 3 = intermediate, 4 = overcast
// 5: Daylit window number (1 to NumOfDayltgExtWins)
Array4D<Dayltg::Illums> DaylIllumFac;
Array4D<Dayltg::Illums> DaylSourceFac;
Array4D<Dayltg::Illums> DaylBackFac;
Array4D<std::array<Dayltg::Illums, (int)Lum::Num>> DaylFac;

// Time exceeding daylight illuminance setpoint at reference points (hours)
Array1D<Real64> TimeExceedingDaylightIlluminanceSPAtRefPt;
Expand Down
Loading

4 comments on commit 2ccf245

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

Dayltg3 (amirroth) - x86_64-Linux-Ubuntu-22.04-gcc-11.4: OK (3587 of 3587 tests passed, 0 test warnings)

Build Badge Test Badge

@nrel-bot
Copy link

Choose a reason for hiding this comment

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

Dayltg3 (amirroth) - Win64-Windows-10-VisualStudio-16: OK (2759 of 2759 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.

Dayltg3 (amirroth) - x86_64-Linux-Ubuntu-22.04-gcc-11.4-UnitTestsCoverage-Debug: OK (1972 of 1972 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.

Dayltg3 (amirroth) - x86_64-Linux-Ubuntu-22.04-gcc-11.4-IntegrationCoverage-Debug: OK (785 of 790 tests passed, 0 test warnings)

Failures:\n

integration Test Summary

  • Passed: 785
  • Failed: 5

Build Badge Test Badge Coverage Badge

Please sign in to comment.