Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deglobalizes a bunch of files. #8630

Merged
merged 17 commits into from
Mar 17, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions src/EnergyPlus/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,6 @@ set(SRC
DataDefineEquip.hh
DataEnvironment.cc
DataEnvironment.hh
DataErrorTracking.cc
DataErrorTracking.hh
DataGenerators.hh
DataGlobalConstants.cc
Expand All @@ -189,7 +188,6 @@ set(SRC
DataIPShortCuts.cc
DataIPShortCuts.hh
DataLoopNode.hh
DataMoistureBalance.cc
DataMoistureBalance.hh
DataMoistureBalanceEMPD.hh
DataOutputs.cc
Expand All @@ -198,7 +196,6 @@ set(SRC
DataPhotovoltaics.hh
DataPrecisionGlobals.hh
DataReportingFlags.hh
DataRoomAirModel.cc
DataRoomAirModel.hh
DataRootFinder.hh
DataRuntimeLanguage.cc
Expand All @@ -218,13 +215,11 @@ set(SRC
DataSystemVariables.hh
DataTimings.cc
DataTimings.hh
DataUCSDSharedData.cc
DataUCSDSharedData.hh
DataVectorTypes.hh
DataViewFactorInformation.cc
DataViewFactorInformation.hh
DataWater.hh
DataWindowEquivalentLayer.cc
DataWindowEquivalentLayer.hh
DataZoneControls.hh
DataZoneEnergyDemands.hh
Expand Down
3 changes: 3 additions & 0 deletions src/EnergyPlus/Construction.hh
Original file line number Diff line number Diff line change
Expand Up @@ -329,10 +329,13 @@ namespace Construction {

struct ConstructionData : BaseGlobalStruct {
Array1D<Construction::ConstructionProps> Construct;
Array1D_int LayerPoint = Array1D<int>(Construction::MaxLayersInConstruct, 0);

void clear_state() override
{
this->Construct.deallocate();
this->LayerPoint.deallocate();
this->LayerPoint.dimension(Construction::MaxLayersInConstruct, 0);
}
};

Expand Down
77 changes: 38 additions & 39 deletions src/EnergyPlus/CrossVentMgr.cc

Large diffs are not rendered by default.

189 changes: 0 additions & 189 deletions src/EnergyPlus/DataErrorTracking.cc

This file was deleted.

122 changes: 119 additions & 3 deletions src/EnergyPlus/DataErrorTracking.hh
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,125 @@ namespace EnergyPlus {
namespace DataErrorTracking {

int constexpr SearchCounts(20);
extern Array1D_string const MessageSearch;
extern Array1D_string const Summaries;
extern Array1D_string const MoreDetails; // Details 16 applies to both temperature out of bounds | errors.

std::array<const char *, 21> constexpr MessageSearch({"", "InterZone Surface Areas",
"CAUTION -- Interzone",
"Node Connection Error",
"InterZone Surface Azimu",
"InterZone Surface Tilts",
"Suspected non-planar",
"Deprecated",
"Floor Tilt=",
"Roof/Ceiling Tilt=",
"View factors not",
"Unbalanced exhaust air",
"Loads Initialization",
"CalcDaylightMapPoints:",
"Zone Air Heat Balance",
"occupant density is ext",
"Temperature (low) out o",
"Temperature (high) out",
"nominally unused",
"InfraredTransparent",
"No reporting elements"});
std::array<const char *, 21> constexpr Summaries({"", "InterZone Surface Areas -- mismatch",
"Interzone surfaces - different zones",
"Node Connection Errors",
"InterZone Surface Azimuths -- mismatch",
"InterZone Surface Tilts -- mismatch",
"Likely non-planar surfaces",
"Deprecated Features or Key Values",
"Incorrect Floor Tilt",
"Incorrect Roof/Ceiling Tilt",
"Incomplete View factors",
"Unbalanced exhaust air flow",
"Loads Initialization did not Converge",
"CalcDaylightMapPoints: Window",
"Zone Air Heat Balance Warnings",
"Occupant density is extremely high",
"Temperature (low) out of bounds",
"Temperature (high) out of bounds",
"Nominally Unused Constructions",
"Material:InfraredTransparent usage",
"No Reporting Elements requested"});


// in below -- simple line end <CR>. End of Whole message <CRE>
auto constexpr MoreDetails_0("");
auto constexpr MoreDetails_1(
"Area mismatch errors happen when the interzone surface in zone A is<CR>not the same size as it's companion in zone B.<CRE>"); // InterZone
// Surface
// Areas --
// mismatch
auto constexpr MoreDetails_2(""); // Interzone surfaces - different zones
auto constexpr
MoreDetails_3("Node connection errors are often caused by spelling mistakes in a node name field.<CR>To track down the problem, search the "
"idf file for each node name listed to see if it<CR>occurs in the expected input fields.<CRE>"); // Node Connection Errors
auto constexpr MoreDetails_4("The azimuths (outward facing angle) of two interzone surfaces should not be the same.<CR>Normally, the absolute "
"difference between the two azimuths will be 180 degrees.<CR>You can turn on the report: "
"Output:Surfaces:List,Details; to inspect your surfaces.<CRE>"); // InterZone Surface Azimuths -- mismatch
auto constexpr MoreDetails_5(""); // InterZone Surface Tilts -- mismatch
auto constexpr MoreDetails_6("EnergyPlus Surfaces should be planar. If the error indicates a small increment for the<CR>out of planar bounds, "
"then the calculations are likely okay though you should try to fix<CR>the problem. If a greater increment, the "
"calculations will likely be incorrect.<CRE>"); // Likely non-planar surfaces
auto constexpr
MoreDetails_7("A deprecated feature warning/severe error indicates that you are using a feature which will be<CR>removed in a future "
"release. The new feature is likely included in the EnergyPlus version you are<CR>using. Consider switching now to avoid "
"future problems.<CR>A deprecated key value message indicates you are using an out-dated key value in your input "
"file.<CR>While EnergyPlus may continue to accept these values, some other input file readers may not.<CR>Consider changing to "
"values that are included as valid in the Energy+.idd for these objects.<CRE>"); // Deprecated Features or Key Values
auto constexpr MoreDetails_8("Floors are usually flat and \"tilted\" 180 degrees. If you get this error message,<CR>it's likely that you "
"need to reverse the vertices of the surface to remove the error.<CR>EnergyPlus will attempt to fix the vertices "
"for the running simulation.<CR>You can turn on the report: Output:Surfaces:List,Details; to inspect your "
"surfaces.<CRE>"); // Incorrect Floor Tilt
auto constexpr MoreDetails_9("Flat roofs/ceilings are \"tilted\" 0 degrees. Pitched roofs should be \"near\" 0 degrees.<CR>If you get this "
"error message, it's likely that you need to reverse the vertices of<CR>the surface to remove the error. "
"EnergyPlus will attempt to fix the vertices for the<CR>running simulation. You can turn on the report: "
"Output:Surfaces:List,Details;<CR>to inspect your surfaces.<CRE>"); // Incorrect Roof/Ceiling Tilt
auto constexpr
MoreDetails_10("Incomplete view factors can result from incorrect floor specifications (such as tilting 0<CR>instead of 180) or not enough "
"surfaces in a zone to make an enclosure. The error message<CR>also shows an enforced repciprocity value. You can decide if "
"you need to make geometry<CR>changes based on that value.<CRE>"); // Incomplete View factors
auto constexpr MoreDetails_11("Unbalanced exhaust air flow errors can occur when exhaust fans are running but there is no<CR>supply air. Turn "
"off exhaust fans when the system is not running may help resolve the problem.<CR>Time shown is first "
"occurrence of error.<CRE>"); // Unbalanced exhaust air flow
auto constexpr
MoreDetails_12("1) very high thermal mass such as very thick concrete (solution: increase max number of warmup<CR> days in the BUILDING "
"object);<CR>2) moderate mass and inadequate space conditioning such that the building keeps getting warmer<CR> and warmer "
"on successive days (solution: add HVAC, check building thermal properties,<CR> check if infiltration is included, make "
"sure HVAC properly controlled);<CR>3) a soil layer modeled below the concrete slab - (solution remove this layer and read "
"about<CR> ground temperatures in the Auxiliary Programs document).<CR>4) unreasonable (too small) limits in the BUILDING "
"object for temperature (.4 default) or<CR> loads tolerances (.04 default)<CRE>"); // Loads Initialization did not Converge
auto constexpr
MoreDetails_13("Window is too close to map points for accurate calculation. Suggested change is to create<CR>Output:IlluminanceMap "
"coordinates (x,y,z) that are more \"inside\" the zone<CRE>"); // CalcDaylightMapPoints: Window
auto constexpr MoreDetails_14("Zone Air Heat Balance out of Balance warnings are currently used by developers.<CR>Users can safely ignore "
"these warnings.<CRE>"); // Zone Air Heat Balance Warnings
auto constexpr MoreDetails_15("The occupant density warning is provided to alert you to potential conditions that can cause<CR>problems with "
"the heat balance calculations. Too high a density could be cause for severe<CR>temperature out of bounds "
"errors in a zone leading to program termination.<CRE>"); // Occupant density is extremely high
auto constexpr
MoreDetails_16("A temperature out of bounds problem can be caused by several things. The user should check:<CR>1) the weather environment "
"(including the horizontal IR from sky)<CR>2) the level of interal gains with respect to the zone<CR>3) the thermal "
"properties of their materials. And other things.<CR>A common cause is a building with no or little thermal mass - all "
"materials with Material:NoMass definitions.<CRE>"); // Temperature (low) out of bounds AND Temperature (high) out of bounds
auto constexpr
MoreDetails_18("The nominally unused constructions warning is provided to alert you to potential conditions that can cause<CR>extra time "
"during simulation. Each construction is calculated by the algorithm indicated in the HeatBalanceAlgorithm<CR>object. You may "
"remove the constructions indicated (when you use the DisplayExtraWarnings option).<CRE>"); // Nominally unused constructions
auto constexpr
MoreDetails_19("Using Material:InfraredTransparent materials in constructions are correctly used in interzone surface<CR>constructions. "
"Warnings are given if they are used in other kinds of surfaces.<CR>They CANNOT currently be used with "
"ConductionFiniteDifference algorithms.<CRE>"); // InfraredTransparent constructions in non-interzone surfaces
auto constexpr
MoreDetails_20("No Reporting elements have been requested. You will see no output values from your run.<CR>Add Output:Variable, "
"Output:Meter, Output:Table:SummaryReports, Output:Table:Monthly, Output:Table:TimeBins<CR>objects to your input file to "
"receive output values from the simulation.<CRE>"); // No reporting elements requested

std::array<const char *, 21> constexpr MoreDetails({MoreDetails_0, MoreDetails_1, MoreDetails_2, MoreDetails_3, MoreDetails_4, MoreDetails_5, MoreDetails_6,
MoreDetails_7, MoreDetails_8, MoreDetails_9, MoreDetails_10, MoreDetails_11, MoreDetails_12,
MoreDetails_13, MoreDetails_14, MoreDetails_15, MoreDetails_16, MoreDetails_16, MoreDetails_18,
MoreDetails_19, MoreDetails_20}); // Details 16 applies to both temperature out of bounds |

struct RecurringErrorData
{
Expand Down
23 changes: 11 additions & 12 deletions src/EnergyPlus/DataHeatBalance.cc
Original file line number Diff line number Diff line change
Expand Up @@ -785,7 +785,6 @@ namespace EnergyPlus::DataHeatBalance {
int NewConstrNum; // Reverse Construction Number

// FUNCTION LOCAL VARIABLE DECLARATIONS:
static Array1D_int LayerPoint(Construction::MaxLayersInConstruct, 0); // Pointer array which refers back to
int nLayer;
int Loop;
bool Found;
Expand All @@ -798,18 +797,18 @@ namespace EnergyPlus::DataHeatBalance {

state.dataConstruction->Construct(ConstrNum).IsUsed = true;
nLayer = 0;
LayerPoint = 0;
state.dataConstruction->LayerPoint = 0;
for (Loop = state.dataConstruction->Construct(ConstrNum).TotLayers; Loop >= 1; --Loop) {
++nLayer;
LayerPoint(nLayer) = state.dataConstruction->Construct(ConstrNum).LayerPoint(Loop);
state.dataConstruction->LayerPoint(nLayer) = state.dataConstruction->Construct(ConstrNum).LayerPoint(Loop);
}

// now, got thru and see if there is a match already....
NewConstrNum = 0;
for (Loop = 1; Loop <= state.dataHeatBal->TotConstructs; ++Loop) {
Found = true;
for (nLayer = 1; nLayer <= Construction::MaxLayersInConstruct; ++nLayer) {
if (state.dataConstruction->Construct(Loop).LayerPoint(nLayer) != LayerPoint(nLayer)) {
if (state.dataConstruction->Construct(Loop).LayerPoint(nLayer) != state.dataConstruction->LayerPoint(nLayer)) {
Found = false;
break;
}
Expand All @@ -836,9 +835,9 @@ namespace EnergyPlus::DataHeatBalance {
state.dataConstruction->Construct(state.dataHeatBal->TotConstructs).Name = "iz-" + state.dataConstruction->Construct(ConstrNum).Name;
state.dataConstruction->Construct(state.dataHeatBal->TotConstructs).TotLayers = state.dataConstruction->Construct(ConstrNum).TotLayers;
for (nLayer = 1; nLayer <= Construction::MaxLayersInConstruct; ++nLayer) {
state.dataConstruction->Construct(state.dataHeatBal->TotConstructs).LayerPoint(nLayer) = LayerPoint(nLayer);
if (LayerPoint(nLayer) != 0) {
state.dataHeatBal->NominalRforNominalUCalculation(state.dataHeatBal->TotConstructs) += state.dataHeatBal->NominalR(LayerPoint(nLayer));
state.dataConstruction->Construct(state.dataHeatBal->TotConstructs).LayerPoint(nLayer) = state.dataConstruction->LayerPoint(nLayer);
if (state.dataConstruction->LayerPoint(nLayer) != 0) {
state.dataHeatBal->NominalRforNominalUCalculation(state.dataHeatBal->TotConstructs) += state.dataHeatBal->NominalR(state.dataConstruction->LayerPoint(nLayer));
}
}

Expand Down Expand Up @@ -1413,11 +1412,11 @@ namespace EnergyPlus::DataHeatBalance {
using DataSurfaces::ExternalEnvironment;

// SUBROUTINE LOCAL VARIABLE DECLARATIONS:
static int loopSurfNum(0); // surface index
static int ConstrNum(0); // construction index
static int NumLayers(0); // number of material layers in a construction
static int Layer(0); // construction material layer index
static int MaterNum(0); // construction material index
int loopSurfNum(0); // surface index
int ConstrNum(0); // construction index
int NumLayers(0); // number of material layers in a construction
int Layer(0); // construction material layer index
int MaterNum(0); // construction material index

for (loopSurfNum = 1; loopSurfNum <= state.dataSurface->TotSurfaces; ++loopSurfNum) {

Expand Down
Loading