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

Reduce use of Array1S objects #7813

Merged
merged 17 commits into from
Mar 2, 2020
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
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
execute_process( COMMAND "${EnergyPlus_embeddable_epJSON_schema}" "${EnergyPlus_RUNTIME_OUTPUT_DIRECTORY}/Energy+.schema.epJSON" TIMEOUT 30 RESULT_VARIABLE generate_embedded_epJSON_schema OUTPUT_VARIABLE embedded_epJSON_schema)
execute_process( COMMAND "${EnergyPlus_embeddable_epJSON_schema}" "${EnergyPlus_RUNTIME_OUTPUT_DIRECTORY}/Energy+.schema.epJSON" TIMEOUT 90 RESULT_VARIABLE generate_embedded_epJSON_schema OUTPUT_VARIABLE embedded_epJSON_schema)
if( ${generate_embedded_epJSON_schema} MATCHES ".*timeout.*" )
message(FATAL_ERROR "Generating embedded epJSON Schema from epJSON Schema failed: ${generate_embedded_epJSON_schema}")
endif()
Expand Down
46 changes: 23 additions & 23 deletions src/EnergyPlus/BranchInputManager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ namespace BranchInputManager {
void GetBranchList(std::string const &LoopName, // Name of Loop Branch List is on
std::string const &BranchListName, // Branch List Name from Input
int &NumBranchNames, // Number of Branches for this Branch List
Array1S_string BranchNames, // Names of Branches on this Branch List
Array1D_string &BranchNames, // Names of Branches on this Branch List
std::string const &LoopType // Type of Loop Branch list is on
)
{
Expand Down Expand Up @@ -325,17 +325,17 @@ namespace BranchInputManager {
return NumBranchesInBranchList;
}

void GetBranchData(std::string const &LoopName, // Loop Name of this Branch
std::string const &BranchName, // Requested Branch Name
int &PressCurveType, // Index of a pressure curve object
int &PressCurveIndex, // Index of a pressure curve object
int &NumComps, // Number of Components on Branch
Array1S_string CompType, // Component Type for each item on Branch
Array1S_string CompName, // Component Name for each item on Branch
Array1S_string CompInletNodeNames, // Component Inlet Node IDs for each item on Branch
Array1S_int CompInletNodeNums, // Component Inlet Node Numbers for each item on Branch
Array1S_string CompOutletNodeNames, // Component Outlet Node IDs for each item on Branch
Array1S_int CompOutletNodeNums, // Component Outlet Node Numbers for each item on Branch
void GetBranchData(std::string const &LoopName, // Loop Name of this Branch
std::string const &BranchName, // Requested Branch Name
int &PressCurveType, // Index of a pressure curve object
int &PressCurveIndex, // Index of a pressure curve object
int &NumComps, // Number of Components on Branch
Array1D_string &CompType, // Component Type for each item on Branch
Array1D_string &CompName, // Component Name for each item on Branch
Array1D_string &CompInletNodeNames, // Component Inlet Node IDs for each item on Branch
Array1D_int &CompInletNodeNums, // Component Inlet Node Numbers for each item on Branch
Array1D_string &CompOutletNodeNames, // Component Outlet Node IDs for each item on Branch
Array1D_int &CompOutletNodeNums, // Component Outlet Node Numbers for each item on Branch
bool &ErrorsFound)
{

Expand Down Expand Up @@ -603,13 +603,13 @@ namespace BranchInputManager {
}
}

void GetInternalBranchData(std::string const &LoopName, // Loop Name for Branch
std::string const &BranchName, // Requested Branch Name
int &PressCurveType, // Index of pressure curve object
int &PressCurveIndex, // Index of pressure curve object
int &NumComps, // Number of Components on Branch
Array1S<ComponentData> BComponents, // Component data returned
bool &ErrorsFound // True when Loop Name is already assigned and this not same loop
void GetInternalBranchData(std::string const &LoopName, // Loop Name for Branch
std::string const &BranchName, // Requested Branch Name
int &PressCurveType, // Index of pressure curve object
int &PressCurveIndex, // Index of pressure curve object
int &NumComps, // Number of Components on Branch
Array1D<ComponentData> &BComponents, // Component data returned
bool &ErrorsFound // True when Loop Name is already assigned and this not same loop
)
{

Expand Down Expand Up @@ -839,8 +839,8 @@ namespace BranchInputManager {
std::string &OutletNodeName, // Outlet Node ID
int &OutletNodeNum, // Outlet Node Number
int &NumInletNodes, // Number of Inlet Nodes
Array1S_string InletNodeNames, // Inlet Node IDs
Array1S_int InletNodeNums, // Inlet Node Numbers
Array1D_string &InletNodeNames, // Inlet Node IDs
Array1D_int &InletNodeNums, // Inlet Node Numbers
bool &ErrorsFound,
Optional_int_const ConnectorNumber, // number of the current item in connector list
Optional_int MixerNumber // Mixer number for this specific splitter
Expand Down Expand Up @@ -999,8 +999,8 @@ namespace BranchInputManager {
std::string &InletNodeName, // Inlet Node ID
int &InletNodeNum, // Inlet Node Number
int &NumOutletNodes, // Number of Outlet Nodes
Array1S_string OutletNodeNames, // Outlet Node IDs
Array1S_int OutletNodeNums, // Outlet Node Numbers
Array1D_string &OutletNodeNames, // Outlet Node IDs
Array1D_int &OutletNodeNums, // Outlet Node Numbers
bool &ErrorsFound,
Optional_int_const ConnectorNumber, // number of the current item in connector list
Optional_int SplitterNumber // splitter number for this specific splitter
Expand Down
47 changes: 23 additions & 24 deletions src/EnergyPlus/BranchInputManager.hh
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@

// ObjexxFCL Headers
#include <ObjexxFCL/Array1D.hh>
#include <ObjexxFCL/Array1S.hh>
#include <ObjexxFCL/Optional.hh>

// EnergyPlus Headers
Expand Down Expand Up @@ -210,23 +209,23 @@ namespace BranchInputManager {
void GetBranchList(std::string const &LoopName, // Name of Loop Branch List is on
std::string const &BranchListName, // Branch List Name from Input
int &NumBranchNames, // Number of Branches for this Branch List
Array1S_string BranchNames, // Names of Branches on this Branch List
Array1D_string &BranchNames, // Names of Branches on this Branch List
std::string const &LoopType // Type of Loop Branch list is on
);

int NumBranchesInBranchList(std::string const &BranchListName);

void GetBranchData(std::string const &LoopName, // Loop Name of this Branch
std::string const &BranchName, // Requested Branch Name
int &PressCurveType, // Index of a pressure curve object
int &PressCurveIndex, // Index of a pressure curve object
int &NumComps, // Number of Components on Branch
Array1S_string CompType, // Component Type for each item on Branch
Array1S_string CompName, // Component Name for each item on Branch
Array1S_string CompInletNodeNames, // Component Inlet Node IDs for each item on Branch
Array1S_int CompInletNodeNums, // Component Inlet Node Numbers for each item on Branch
Array1S_string CompOutletNodeNames, // Component Outlet Node IDs for each item on Branch
Array1S_int CompOutletNodeNums, // Component Outlet Node Numbers for each item on Branch
void GetBranchData(std::string const &LoopName, // Loop Name of this Branch
std::string const &BranchName, // Requested Branch Name
int &PressCurveType, // Index of a pressure curve object
int &PressCurveIndex, // Index of a pressure curve object
int &NumComps, // Number of Components on Branch
Array1D_string &CompType, // Component Type for each item on Branch
Array1D_string &CompName, // Component Name for each item on Branch
Array1D_string &CompInletNodeNames, // Component Inlet Node IDs for each item on Branch
Array1D_int &CompInletNodeNums, // Component Inlet Node Numbers for each item on Branch
Array1D_string &CompOutletNodeNames, // Component Outlet Node IDs for each item on Branch
Array1D_int &CompOutletNodeNums, // Component Outlet Node Numbers for each item on Branch
bool &ErrorsFound);

int NumCompsInBranch(std::string const &BranchName);
Expand All @@ -238,13 +237,13 @@ namespace BranchInputManager {
bool &ErrFound // Set to true if error found, false otherwise
);

void GetInternalBranchData(std::string const &LoopName, // Loop Name for Branch
std::string const &BranchName, // Requested Branch Name
int &PressCurveType, // Index of pressure curve object
int &PressCurveIndex, // Index of pressure curve object
int &NumComps, // Number of Components on Branch
Array1S<ComponentData> BComponents, // Component data returned
bool &ErrorsFound // True when Loop Name is already assigned and this not same loop
void GetInternalBranchData(std::string const &LoopName, // Loop Name for Branch
std::string const &BranchName, // Requested Branch Name
int &PressCurveType, // Index of pressure curve object
int &PressCurveIndex, // Index of pressure curve object
int &NumComps, // Number of Components on Branch
Array1D<ComponentData> &BComponents, // Component data returned
bool &ErrorsFound // True when Loop Name is already assigned and this not same loop
);

void GetNumSplitterMixerInConntrList(std::string const &LoopName, // Loop Name for this Splitter (used in error message)
Expand All @@ -266,8 +265,8 @@ namespace BranchInputManager {
std::string &OutletNodeName, // Outlet Node ID
int &OutletNodeNum, // Outlet Node Number
int &NumInletNodes, // Number of Inlet Nodes
Array1S_string InletNodeNames, // Inlet Node IDs
Array1S_int InletNodeNums, // Inlet Node Numbers
Array1D_string &InletNodeNames, // Inlet Node IDs
Array1D_int &InletNodeNums, // Inlet Node Numbers
bool &ErrorsFound,
Optional_int_const ConnectorNumber = _, // number of the current item in connector list
Optional_int MixerNumber = _ // Mixer number for this specific splitter
Expand All @@ -280,8 +279,8 @@ namespace BranchInputManager {
std::string &InletNodeName, // Inlet Node ID
int &InletNodeNum, // Inlet Node Number
int &NumOutletNodes, // Number of Outlet Nodes
Array1S_string OutletNodeNames, // Outlet Node IDs
Array1S_int OutletNodeNums, // Outlet Node Numbers
Array1D_string &OutletNodeNames, // Outlet Node IDs
Array1D_int &OutletNodeNums, // Outlet Node Numbers
bool &ErrorsFound,
Optional_int_const ConnectorNumber = _, // number of the current item in connector list
Optional_int SplitterNumber = _ // splitter number for this specific splitter
Expand Down
12 changes: 6 additions & 6 deletions src/EnergyPlus/BranchNodeConnections.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1193,12 +1193,12 @@ namespace BranchNodeConnections {
void GetChildrenData(std::string const &ComponentType,
std::string const &ComponentName,
int &NumChildren,
Array1S_string ChildrenCType,
Array1S_string ChildrenCName,
Array1S_string InletNodeName,
Array1S_int InletNodeNum,
Array1S_string OutletNodeName,
Array1S_int OutletNodeNum,
Array1D_string &ChildrenCType,
Array1D_string &ChildrenCName,
Array1D_string &InletNodeName,
Array1D_int &InletNodeNum,
Array1D_string &OutletNodeName,
Array1D_int &OutletNodeNum,
bool &ErrorsFound)
{

Expand Down
13 changes: 6 additions & 7 deletions src/EnergyPlus/BranchNodeConnections.hh
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@
// ObjexxFCL Headers
#include <ObjexxFCL/Array1A.hh>
#include <ObjexxFCL/Array1D.hh>
#include <ObjexxFCL/Array1S.hh>
#include <ObjexxFCL/Optional.hh>

// EnergyPlus Headers
Expand Down Expand Up @@ -142,12 +141,12 @@ namespace BranchNodeConnections {
void GetChildrenData(std::string const &ComponentType,
std::string const &ComponentName,
int &NumChildren,
Array1S_string ChildrenCType,
Array1S_string ChildrenCName,
Array1S_string InletNodeName,
Array1S_int InletNodeNum,
Array1S_string OutletNodeName,
Array1S_int OutletNodeNum,
Array1D_string &ChildrenCType,
Array1D_string &ChildrenCName,
Array1D_string &InletNodeName,
Array1D_int &InletNodeNum,
Array1D_string &OutletNodeName,
Array1D_int &OutletNodeNum,
bool &ErrorsFound);

void SetUpCompSets(std::string const &ParentType, // Parent Object Type
Expand Down
16 changes: 8 additions & 8 deletions src/EnergyPlus/ConvectionCoefficients.cc
Original file line number Diff line number Diff line change
Expand Up @@ -243,8 +243,8 @@ namespace ConvectionCoefficients {

// Functions

void InitInteriorConvectionCoeffs(Array1S<Real64> const SurfaceTemperatures, // Temperature of surfaces for evaluation of HcIn
Optional_int_const ZoneToResimulate // if passed in, then only calculate surfaces that have this zone
void InitInteriorConvectionCoeffs(const Array1D<Real64> &SurfaceTemperatures, // Temperature of surfaces for evaluation of HcIn
Optional_int_const ZoneToResimulate // if passed in, then only calculate surfaces that have this zone
)
{

Expand Down Expand Up @@ -3931,8 +3931,8 @@ namespace ConvectionCoefficients {
}

void CalcDetailedHcInForDVModel(int const SurfNum, // surface number for which coefficients are being calculated
Array1S<Real64> const SurfaceTemperatures, // Temperature of surfaces for evaluation of HcIn
Array1S<Real64> HcIn, // Interior Convection Coeff Array
const Array1D<Real64> &SurfaceTemperatures, // Temperature of surfaces for evaluation of HcIn
Array1D<Real64> &HcIn, // Interior Convection Coeff Array
Optional<Array1S<Real64> const> Vhc // Velocity array for forced convection coeff calculation
)
{
Expand Down Expand Up @@ -4153,7 +4153,7 @@ namespace ConvectionCoefficients {
}

void CalcCeilingDiffuserIntConvCoeff(int const ZoneNum,
Array1S<Real64> const SurfaceTemperatures) // zone number for which coefficients are being calculated
const Array1D<Real64> &SurfaceTemperatures) // zone number for which coefficients are being calculated
{

Real64 ACH = CalcCeilingDiffuserACH(ZoneNum);
Expand Down Expand Up @@ -4186,7 +4186,7 @@ namespace ConvectionCoefficients {
// ever be made to work correctly with the inlet air temperature.

void CalcCeilingDiffuserInletCorr(int const ZoneNum, // Zone number
Array1S<Real64> const SurfaceTemperatures // For CalcASHRAEDetailed, if called
const Array1S<Real64> &SurfaceTemperatures // For CalcASHRAEDetailed, if called
)
{

Expand Down Expand Up @@ -4286,8 +4286,8 @@ namespace ConvectionCoefficients {
if (ACH > 100.0) ShowWarningError("CeilingDiffuser convection correlation is out of range: ACH > 100");
}

void CalcTrombeWallIntConvCoeff(int const ZoneNum, // Zone number for which coefficients are being calculated
Array1S<Real64> const SurfaceTemperatures // Temperature of surfaces for evaluation of HcIn
void CalcTrombeWallIntConvCoeff(int const ZoneNum, // Zone number for which coefficients are being calculated
const Array1D<Real64> &SurfaceTemperatures // Temperature of surfaces for evaluation of HcIn
)
{

Expand Down
Loading