Skip to content

Commit 09a6e22

Browse files
committed
Initial cleanup pass (kinda big, sorry)
1 parent 15f6491 commit 09a6e22

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+6850
-7271
lines changed

src/EnergyPlus/AirflowNetwork/src/Solver.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13381,9 +13381,9 @@ namespace AirflowNetwork {
1338113381
// REFERENCES:
1338213382
// na
1338313383

13384-
auto &NetworkNumOfLinks = ActualNumOfLinks;
1338513384
auto &NetworkNumOfNodes = ActualNumOfNodes;
13386-
13385+
auto &NetworkNumOfLinks = ActualNumOfLinks;
13386+
1338713387
// Argument array dimensioning (these used to be arguments, need to also test newAU and newIK)
1338813388
EP_SIZE_CHECK(IK, NetworkNumOfNodes + 1);
1338913389
EP_SIZE_CHECK(AD, NetworkNumOfNodes);

src/EnergyPlus/Construction.cc

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ void ConstructionProps::calculateTransferFunction(EnergyPlusData &state, bool &E
210210

211211
// Obtain thermal properties from the Material derived type
212212

213-
auto *thisMaterial = dynamic_cast<Material::MaterialChild *>(state.dataMaterial->Material(CurrentLayer));
213+
auto *thisMaterial = dynamic_cast<Material::MaterialChild *>(state.dataMaterial->materials(CurrentLayer));
214214
assert(thisMaterial != nullptr);
215215

216216
dl(Layer) = thisMaterial->Thickness;
@@ -289,7 +289,7 @@ void ConstructionProps::calculateTransferFunction(EnergyPlusData &state, bool &E
289289
// then use the "exact" approach to model a massless layer
290290
// based on the node equations for the state space method.
291291

292-
if ((Layer == 1) || (Layer == this->TotLayers) || (!state.dataMaterial->Material(this->LayerPoint(Layer))->ROnly)) {
292+
if ((Layer == 1) || (Layer == this->TotLayers) || (!state.dataMaterial->materials(this->LayerPoint(Layer))->ROnly)) {
293293
cp(Layer) = 1.007;
294294
rho(Layer) = 1.1614;
295295
rk(Layer) = 0.0263;
@@ -928,12 +928,12 @@ void ConstructionProps::calculateTransferFunction(EnergyPlusData &state, bool &E
928928
if (this->CTFTimeStep >= MaxAllowedTimeStep) {
929929
ShowSevereError(state, format("CTF calculation convergence problem for Construction=\"{}\".", this->Name));
930930
ShowContinueError(state, "...with Materials (outside layer to inside)");
931-
ShowContinueError(state, format("(outside)=\"{}\"", state.dataMaterial->Material(this->LayerPoint(1))->Name));
931+
ShowContinueError(state, format("(outside)=\"{}\"", state.dataMaterial->materials(this->LayerPoint(1))->Name));
932932
for (int Layer = 2; Layer <= this->TotLayers; ++Layer) {
933933
if (Layer != this->TotLayers) {
934-
ShowContinueError(state, format("(next)=\"{}\"", state.dataMaterial->Material(this->LayerPoint(Layer))->Name));
934+
ShowContinueError(state, format("(next)=\"{}\"", state.dataMaterial->materials(this->LayerPoint(Layer))->Name));
935935
} else {
936-
ShowContinueError(state, format("(inside)=\"{}\"", state.dataMaterial->Material(this->LayerPoint(Layer))->Name));
936+
ShowContinueError(state, format("(inside)=\"{}\"", state.dataMaterial->materials(this->LayerPoint(Layer))->Name));
937937
}
938938
}
939939
ShowContinueError(state,
@@ -1875,7 +1875,7 @@ void ConstructionProps::reportTransferFunction(EnergyPlusData &state, int const
18751875

18761876
for (int I = 1; I <= this->TotLayers; ++I) {
18771877
int Layer = this->LayerPoint(I);
1878-
auto const *thisMaterial = state.dataMaterial->Material(Layer);
1878+
auto const *thisMaterial = state.dataMaterial->materials(Layer);
18791879
switch (thisMaterial->group) {
18801880
case Material::Group::Air: {
18811881
static constexpr std::string_view Format_702(" Material:Air,{},{:12.4N}\n");
@@ -1927,8 +1927,8 @@ void ConstructionProps::reportLayers(EnergyPlusData &state)
19271927
if (state.dataOutRptPredefined->pdchOpqConsLayCol.size() > 0) {
19281928
for (int i = 1; i <= this->TotLayers; ++i) {
19291929
int layerIndex = this->LayerPoint(i);
1930-
auto &thisMaterial = state.dataMaterial->Material(layerIndex);
1931-
OutputReportPredefined::PreDefTableEntry(state, state.dataOutRptPredefined->pdchOpqConsLayCol[i - 1], this->Name, thisMaterial->Name);
1930+
auto const *mat = state.dataMaterial->materials(layerIndex);
1931+
OutputReportPredefined::PreDefTableEntry(state, state.dataOutRptPredefined->pdchOpqConsLayCol[i - 1], this->Name, mat->Name);
19321932
}
19331933
}
19341934
}
@@ -1942,10 +1942,10 @@ bool ConstructionProps::isGlazingConstruction(EnergyPlusData &state) const
19421942
// PURPOSE OF THIS SUBROUTINE:
19431943
// Commonly used routine in several places in EnergyPlus which examines if current
19441944
// construction is glazing construction
1945-
const Material::Group MaterialGroup = state.dataMaterial->Material(LayerPoint(1))->group;
1946-
return (MaterialGroup == Material::Group::WindowGlass) || (MaterialGroup == Material::Group::Shade) ||
1947-
(MaterialGroup == Material::Group::Screen) || (MaterialGroup == Material::Group::WindowBlind) ||
1948-
(MaterialGroup == Material::Group::WindowSimpleGlazing);
1945+
const Material::Group group = state.dataMaterial->materials(LayerPoint(1))->group;
1946+
return (group == Material::Group::WindowGlass) || (group == Material::Group::Shade) ||
1947+
(group == Material::Group::Screen) || (group == Material::Group::WindowBlind) ||
1948+
(group == Material::Group::WindowSimpleGlazing);
19491949
}
19501950

19511951
Real64 ConstructionProps::setThicknessPerpendicular(EnergyPlusData &state, Real64 userValue)

src/EnergyPlus/ConvectionCoefficients.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3628,7 +3628,7 @@ Real64 EvaluateExtHcModels(EnergyPlusData &state, int const SurfNum, HcExt const
36283628
}
36293629

36303630
Material::SurfaceRoughness Roughness =
3631-
state.dataMaterial->Material(state.dataConstruction->Construct(surface.Construction).LayerPoint(1))->Roughness;
3631+
state.dataMaterial->materials(state.dataConstruction->Construct(surface.Construction).LayerPoint(1))->Roughness;
36323632

36333633
switch (ForcedConvModelEqNum) {
36343634
case HcExt::None: {
@@ -6318,7 +6318,7 @@ Real64 CalcClearRoof(EnergyPlusData &state,
63186318
Real64 const RoofPerimeter)
63196319
{
63206320
Material::SurfaceRoughness const RoughnessIndex =
6321-
state.dataMaterial->Material(state.dataConstruction->Construct(state.dataSurface->Surface(SurfNum).Construction).LayerPoint(1))->Roughness;
6321+
state.dataMaterial->materials(state.dataConstruction->Construct(state.dataSurface->Surface(SurfNum).Construction).LayerPoint(1))->Roughness;
63226322
// find x, don't know x. avoid time consuming geometry algorithm
63236323
Real64 x = std::sqrt(RoofArea) / 2.0; // quick simplification, geometry routines to develop
63246324

src/EnergyPlus/DElightManagerF.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,7 @@ namespace DElightManagerF {
353353
// Get the outside visible reflectance of this material layer
354354
// (since Construct(iconstruct)%ReflectVisDiffFront always appears to == 0.0)
355355
auto const *thisMaterial =
356-
dynamic_cast<const Material::MaterialChild *>(state.dataMaterial->Material(iMatlLayer));
356+
dynamic_cast<const Material::MaterialChild *>(state.dataMaterial->materials(iMatlLayer));
357357
assert(thisMaterial != nullptr);
358358
rExtVisRefl = 1.0 - thisMaterial->AbsorpVisible;
359359
} else {

src/EnergyPlus/DataBSDFWindow.hh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,8 @@ namespace DataBSDFWindow {
7474
Num
7575
};
7676

77+
static constexpr std::array<std::string_view, (int)Basis::Num> basisNamesUC = {"LBNLWINDOW", "USERDEFINED"};
78+
7779
enum class BasisSymmetry
7880
{
7981
Invalid = -1,
@@ -82,6 +84,8 @@ namespace DataBSDFWindow {
8284
Num
8385
};
8486

87+
static constexpr std::array<std::string_view, (int)BasisSymmetry::Num> basisSymmetryNamesUC = {"AXISSYMMETRIC", "NONE"};
88+
8589
// Thermal calculations for complex fenestration can be used to generate reports for standard cases
8690
// noCondition is used when performing timestep calculations
8791
// 'Summer' will override certain parameters so that produced results are matching standard summer WINDOW = software results

0 commit comments

Comments
 (0)