Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/develop' into AFN-Default-Behavi…
Browse files Browse the repository at this point in the history
…or-Enhancements
  • Loading branch information
Myoldmopar committed Apr 29, 2021
2 parents ad272b6 + 2381b24 commit 449da84
Show file tree
Hide file tree
Showing 136 changed files with 8,628 additions and 8,407 deletions.
10 changes: 5 additions & 5 deletions .decent_ci-Linux.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
compilers:
- name: "gcc"
version: "7.5"
cmake_extra_flags: -DLINK_WITH_PYTHON=ON -DBUILD_FORTRAN=ON -DBUILD_TESTING:BOOL=ON -DENABLE_REGRESSION_TESTING:BOOL=ON -DREGRESSION_BASELINE_PATH:PATH=$REGRESSION_BASELINE -DREGRESSION_SCRIPT_PATH:PATH=$REGRESSION_DIR -DREGRESSION_BASELINE_SHA:STRING=$REGRESSION_BASELINE_SHA -DCOMMIT_SHA=$COMMIT_SHA -DENABLE_GTEST_DEBUG_MODE:BOOL=OFF -DBUILD_PERFORMANCE_TESTS:BOOL=ON -DVALGRIND_ANALYZE_PERFORMANCE_TESTS:BOOL=ON
cmake_extra_flags: -DLINK_WITH_PYTHON=ON -DBUILD_FORTRAN=ON -DBUILD_TESTING:BOOL=ON -DENABLE_REGRESSION_TESTING:BOOL=ON -DREGRESSION_BASELINE_PATH:PATH=$REGRESSION_BASELINE -DREGRESSION_SCRIPT_PATH:PATH=$REGRESSION_DIR -DREGRESSION_BASELINE_SHA:STRING=$REGRESSION_BASELINE_SHA -DCOMMIT_SHA=$COMMIT_SHA -DENABLE_GTEST_DEBUG_MODE:BOOL=OFF -DBUILD_PERFORMANCE_TESTS:BOOL=ON -DVALGRIND_ANALYZE_PERFORMANCE_TESTS:BOOL=ON -DENABLE_PCH:BOOL=OFF
collect_performance_results: true
s3_upload_bucket: energyplus

- name: "gcc"
version: "7.5"
build_type: Debug
cmake_extra_flags: -DLINK_WITH_PYTHON=ON -DBUILD_FORTRAN=ON -DBUILD_TESTING:BOOL=ON -DENABLE_REGRESSION_TESTING:BOOL=OFF -DCOMMIT_SHA=$COMMIT_SHA -DENABLE_COVERAGE:BOOL=ON -DENABLE_GTEST_DEBUG_MODE:BOOL=OFF
cmake_extra_flags: -DLINK_WITH_PYTHON=ON -DBUILD_FORTRAN=ON -DBUILD_TESTING:BOOL=ON -DENABLE_REGRESSION_TESTING:BOOL=OFF -DCOMMIT_SHA=$COMMIT_SHA -DENABLE_COVERAGE:BOOL=ON -DENABLE_GTEST_DEBUG_MODE:BOOL=OFF -DENABLE_PCH:BOOL=OFF
coverage_enabled: true
coverage_base_dir: src/EnergyPlus
coverage_pass_limit: 41.0
Expand All @@ -22,11 +22,11 @@ compilers:
- name: "gcc"
version: "7.5"
build_type: Debug
cmake_extra_flags: -DLINK_WITH_PYTHON=ON -DBUILD_FORTRAN=ON -DBUILD_TESTING:BOOL=ON -DENABLE_REGRESSION_TESTING:BOOL=OFF -DCOMMIT_SHA=$COMMIT_SHA -DENABLE_COVERAGE:BOOL=ON -DENABLE_GTEST_DEBUG_MODE:BOOL=OFF
cmake_extra_flags: -DLINK_WITH_PYTHON=ON -DBUILD_FORTRAN=ON -DBUILD_TESTING:BOOL=ON -DENABLE_REGRESSION_TESTING:BOOL=OFF -DCOMMIT_SHA=$COMMIT_SHA -DENABLE_COVERAGE:BOOL=ON -DENABLE_GTEST_DEBUG_MODE:BOOL=OFF -DENABLE_PCH:BOOL=OFF
coverage_enabled: true
coverage_base_dir: src/EnergyPlus
coverage_pass_limit: 67.8
coverage_warn_limit: 67.7
coverage_pass_limit: 66.0
coverage_warn_limit: 67.0
coverage_s3_bucket: energyplus
build_tag: IntegrationCoverage
ctest_filter: -R "integration.*"
Expand Down
19 changes: 19 additions & 0 deletions .github/workflows/clang-format-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: clang-format
on: [push, pull_request]
jobs:
formatting-check:
name: Formatting Check
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
path:
- 'src/EnergyPlus'
- 'tst/EnergyPlus/unit'
steps:
- uses: actions/checkout@v2
- name: Run clang-format style check for C/C++ programs.
uses: jidicula/clang-format-action@v3.2.0
with:
clang-format-version: '10'
check-path: ${{ matrix.path }}
7 changes: 4 additions & 3 deletions .github/workflows/linux_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,10 @@ jobs:
-DLINK_WITH_PYTHON=OFF \
-DUSE_PSYCHROMETRICS_CACHING=OFF \
-DUSE_GLYCOL_CACHING=OFF \
-OPENGL_REQUIRED=OFF \
-USE_PSYCH_STATS=ON \
-USE_PSYCH_ERRORS=OFF \
-DOPENGL_REQUIRED=OFF \
-DUSE_PSYCH_STATS=ON \
-DUSE_PSYCH_ERRORS=OFF \
-DENABLE_PCH=OFF \
../
- name: Build EnergyPlus
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/linux_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:
run: |
cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE \
-DLINK_WITH_PYTHON=ON -DBUILD_FORTRAN=ON -DBUILD_PACKAGE:BOOL=ON \
-DDOCUMENTATION_BUILD="BuildWithAll" -DTEX_INTERACTION="batchmode" \
-DDOCUMENTATION_BUILD="BuildWithAll" -DTEX_INTERACTION="batchmode" -DENABLE_PCH=OFF \
../
- name: Build Package
Expand Down
15 changes: 15 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,21 @@ set_property(GLOBAL PROPERTY USE_FOLDERS ON)
add_library(project_options INTERFACE)
target_compile_features(project_options INTERFACE cxx_std_17)

add_library(cpp_pch_files INTERFACE)
option(ENABLE_PCH "Enable Precompiled Headers" ON)
if(ENABLE_PCH)
# This sets a global PCH parameter, each project will build its own PCH, which is a good idea if any #define's change
#
# consider breaking this out per project as necessary
target_precompile_headers(
cpp_pch_files
INTERFACE
"${PROJECT_SOURCE_DIR}/src/EnergyPlus/Data/EnergyPlusData.hh"
"${PROJECT_SOURCE_DIR}/third_party/ObjexxFCL/src/ObjexxFCL/Array.functions.hh"
"${PROJECT_SOURCE_DIR}/third_party/nlohmann/json.hpp"
)
endif()

add_library(project_fp_options INTERFACE)

add_library(project_warnings INTERFACE)
Expand Down
7 changes: 7 additions & 0 deletions cmake/CompilerFlags.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,13 @@ endif()

# Make sure expat is compiled as a static library
target_compile_definitions(project_options INTERFACE -DXML_STATIC)
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
option(BUILD_TIME_TRACE "Enable -ftime-trace for investigating build times on clang" OFF)
mark_as_advanced(BUILD_TIME_TRACE)
if (BUILD_TIME_TRACE)
target_compile_options(project_options INTERFACE -ftime-trace)
endif()
endif()

if(APPLE)
# Force no auto ptr
Expand Down
2 changes: 1 addition & 1 deletion cmake/ProjectMacros.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ macro(CREATE_TEST_TARGETS BASE_NAME SRC DEPENDENCIES)
if(BUILD_TESTING)

add_executable(${BASE_NAME}_tests ${SRC})
target_link_libraries(${BASE_NAME}_tests PRIVATE project_options project_warnings)
target_link_libraries(${BASE_NAME}_tests PRIVATE cpp_pch_files project_options project_warnings)
if(ENABLE_GTEST_DEBUG_MODE)
target_compile_definitions(${BASE_NAME}_tests PRIVATE ENABLE_GTEST_DEBUG_MODE)
endif()
Expand Down
24 changes: 21 additions & 3 deletions doc/input-output-reference/src/overview/group-airflow-network.tex
Original file line number Diff line number Diff line change
Expand Up @@ -2595,6 +2595,12 @@ \subsubsection{Outputs}\label{outputs-002}
HVAC,Sum,AFN Zone Infiltration Mass {[}kg{]}
\item
HVAC,Average,AFN Zone Infiltration Air Change Rate {[}ach{]}
\item
HVAC,Sum,AFN Zone Ventilation Volume {[}m3{]}
\item
HVAC,Sum,AFN Zone Ventilation Mass {[}kg{]}
\item
HVAC,Average,AFN Zone Ventilation Air Change Rate {[}ach{]}
\item
HVAC,Sum,AFN Zone Mixing Volume {[}m3{]}
\item
Expand Down Expand Up @@ -3136,15 +3142,27 @@ \subsubsection{Outputs}\label{outputs-002}

\paragraph{AFN Zone Infiltration Volume {[}m3{]}}\label{afn-zone-infiltration-volume-m3}

The volume of outdoor air flow into the zone from window/door openings and cracks in the exterior surfaces of the zone (i.e., the sum of ventilation and crack flows from the exterior into the zone). The zone air density is used to calculate the zone infiltration volume based on the mass flow rate. Note that AirflowNetwork Zone Infiltration Volume will be zero if all of the flows through the zone's exterior surfaces are out of the zone. When a Fan:OnOff object is used, the reported value is weighted by the system fan part-load ratio using the infiltration volume calculated during the fan on and off periods for the simulation timestep.
The volume of outdoor air flow into the zone from window/door cracks in the exterior surfaces of the zone from both AirflowNetwork:MultiZone:Surface:Crack and AirflowNetwork:MultiZone:Surface:EffectiveLeakageArea only averaged over the reporting period (i.e., the sum of infiltration and crack flows from the exterior into the zone). The zone air density is used to calculate the zone infiltration volume based on the mass flow rate. Note that AirflowNetwork Zone Infiltration Volume will be zero if all of the flows through the zone's exterior surfaces are out of the zone. When a Fan:OnOff object is used, the reported value is weighted by the system fan part-load ratio using the infiltration volume calculated during the fan on and off periods for the simulation timestep.

\paragraph{AFN Zone Infiltration Mass {[}kg{]}}\label{afn-zone-infiltration-mass-kg}

The mass of air corresponding to the AirflowNetwork Zone Infiltration Volume. When a Fan:OnOff object is used, the reported value is weighted by the system fan part-load ratio using the infiltration mass calculated during the fan on and off periods for the simulation timestep.
The mass of air corresponding to the AirflowNetwork Zone Infiltration Volume from both AirflowNetwork:MultiZone:Surface:Crack and AirflowNetwork:MultiZone:Surface:EffectiveLeakageArea only averaged over the reporting period. When a Fan:OnOff object is used, the reported value is weighted by the system fan part-load ratio using the infiltration mass calculated during the fan on and off periods for the simulation timestep.

\paragraph{AFN Zone Infiltration Air Change Rate {[}ach{]}}\label{afn-zone-infiltration-air-change-rate-ach}

The number of air changes per hour produced by outdoor air flow into the zone from window/door openings and cracks in the exterior surfaces of the zone (i.e.~the sum of ventilation and crack flows from the exterior into the zone). The target zone air density is used to calculate the zone infiltration air change rate based on the mass flow rate Note that, like Zone Infiltration Volume, Zone Infiltration Air Change Rate will be zero if all flows through the zone's exterior surfaces are out of the zone. When a Fan:OnOff object is used, the reported value is weighted by the system fan part-load ratio using the infiltration air change rate calculated during the fan on and off periods for the simulation timestep.
The number of air changes per hour produced by outdoor air flow into the zone from window/door cracks in the exterior surfaces of the zone from both AirflowNetwork:MultiZone:Surface:Crack and AirflowNetwork:MultiZone:Surface:EffectiveLeakageArea only averaged over the reporting period (i.e.~the sum of infiltration and crack flows from the exterior into the zone). The target zone air density is used to calculate the zone infiltration air change rate based on the mass flow rate Note that, like Zone Infiltration Volume, Zone Infiltration Air Change Rate will be zero if all flows through the zone's exterior surfaces are out of the zone. When a Fan:OnOff object is used, the reported value is weighted by the system fan part-load ratio using the infiltration air change rate calculated during the fan on and off periods for the simulation timestep.

\paragraph{AFN Zone Ventilation Volume {[}m3{]}}\label{afn-zone-ventilation-volume-m3}

The volume of outdoor air flow into the zone from window/door openings in the exterior surfaces of the zone from AirflowNetwork:MultiZone:Component:DetailedOpening, AirflowNetwork:MultiZone:Component:SimpleOpening, and AirflowNetwork:MultiZone:Component:HorizontalOpening only averaged over the reporting period (i.e., the sum of ventilation and opening flows from the exterior into the zone). The zone air density is used to calculate the zone ventilation volume based on the mass flow rate. Note that AirflowNetwork Zone Ventilation Volume will be zero if all of the flows through the zone's exterior surfaces are out of the zone. When a Fan:OnOff object is used, the reported value is weighted by the system fan part-load ratio using the ventilation volume calculated during the fan on and off periods for the simulation timestep.

\paragraph{AFN Zone Ventilation Mass {[}kg{]}}\label{afn-zone-ventilation-mass-kg}

The mass of air corresponding to the AirflowNetwork Zone Ventilation Volume from AirflowNetwork:MultiZone:Component:DetailedOpening, AirflowNetwork:MultiZone:Component:SimpleOpening, and AirflowNetwork:MultiZone:Component:HorizontalOpening only averaged over the reporting period. When a Fan:OnOff object is used, the reported value is weighted by the system fan part-load ratio using the ventilation mass calculated during the fan on and off periods for the simulation timestep.

\paragraph{AFN Zone Ventilation Air Change Rate {[}ach{]}}\label{afn-zone-ventilation-air-change-rate-ach}

The number of air changes per hour produced by outdoor air flow into the zone from window/door openings in the exterior surfaces of the zone from AirflowNetwork:MultiZone:Component:DetailedOpening, AirflowNetwork:MultiZone:Component:SimpleOpening, and AirflowNetwork:MultiZone:Component:HorizontalOpening only averaged over the reporting period (i.e.~the sum of ventilation and opening flows from the exterior into the zone). The target zone air density is used to calculate the zone ventilation air change rate based on the mass flow rate Note that, like Zone Ventilation Volume, Zone Ventilation Air Change Rate will be zero if all flows through the zone's exterior surfaces are out of the zone. When a Fan:OnOff object is used, the reported value is weighted by the system fan part-load ratio using the ventilation air change rate calculated during the fan on and off periods for the simulation timestep.

\paragraph{AFN Zone Mixing Volume {[}m3{]}}\label{afn-zone-mixing-volume-m3}

Expand Down
2 changes: 1 addition & 1 deletion scripts/dev/apply_formatting.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash

find src tst -name "*.hpp" -o -name "*.h" -o -name "*.hh" -o -name "*.cc" -o -name "*.cpp" -o -name "*.c" | xargs -n 1 -I '{}' clang-format-3.9 -i "{}"
find src tst -name "*.hpp" -o -name "*.h" -o -name "*.hh" -o -name "*.cc" -o -name "*.cpp" -o -name "*.c" | xargs -n 1 -I '{}' clang-format -i "{}"

21 changes: 0 additions & 21 deletions scripts/dev/verify_file_formatting.sh

This file was deleted.

27 changes: 0 additions & 27 deletions scripts/dev/verify_formatting.sh

This file was deleted.

12 changes: 5 additions & 7 deletions src/ConvertInputFormat/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,14 +70,12 @@ enum class OutputTypes
BSON
};

template <typename T>
void displayMessage(T t)
template <typename T> void displayMessage(T t)
{
std::cout << t << '\n';
}

template<typename T, typename... Args>
void displayMessage(T t, Args... args) // recursive variadic function
template <typename T, typename... Args> void displayMessage(T t, Args... args) // recursive variadic function
{
std::cout << t;
displayMessage(args...);
Expand Down Expand Up @@ -147,7 +145,8 @@ void cleanEPJSON(json &epjson)
}
}

bool processInput(std::string const &inputFilePath, json const &schema, OutputTypes outputType, std::string outputDirectory, std::string & outputTypeStr)
bool processInput(
std::string const &inputFilePath, json const &schema, OutputTypes outputType, std::string outputDirectory, std::string &outputTypeStr)
{
auto validation(std::unique_ptr<Validation>(new Validation(&schema)));
auto idf_parser(std::unique_ptr<IdfParser>(new IdfParser()));
Expand Down Expand Up @@ -503,8 +502,7 @@ int main(int argc, const char *argv[])
#endif

#ifdef _OPENMP
#pragma omp parallel default(none) \
shared(files, number_files, fileCount, schema, outputType, outputTypeStr, output_directory)
#pragma omp parallel default(none) shared(files, number_files, fileCount, schema, outputType, outputTypeStr, output_directory)
{
#pragma omp for
for (int i = 0; i < number_files; ++i) {
Expand Down
1 change: 1 addition & 0 deletions src/EnergyPlus/AirLoopHVACDOAS.hh
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@

// EnergyPlus Headers
#include <EnergyPlus/Data/BaseData.hh>
#include <EnergyPlus/EPVector.hh>
#include <EnergyPlus/EnergyPlus.hh>

namespace EnergyPlus {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1493,6 +1493,8 @@ namespace AirflowNetwork {
Real64 TotalLat;
Real64 SumMCp;
Real64 SumMCpT;
Real64 SumMVCp;
Real64 SumMVCpT;
Real64 SumMHr;
Real64 SumMHrW;
Real64 SumMMCp;
Expand All @@ -1509,8 +1511,8 @@ namespace AirflowNetwork {
// Default Constructor
AirflowNetworkExchangeProp()
: MultiZoneSen(0.0), MultiZoneLat(0.0), LeakSen(0.0), LeakLat(0.0), CondSen(0.0), DiffLat(0.0), RadGain(0.0), TotalSen(0.0),
TotalLat(0.0), SumMCp(0.0), SumMCpT(0.0), SumMHr(0.0), SumMHrW(0.0), SumMMCp(0.0), SumMMCpT(0.0), SumMMHr(0.0), SumMMHrW(0.0),
SumMHrCO(0.0), SumMMHrCO(0.0), TotalCO2(0.0), SumMHrGC(0.0), SumMMHrGC(0.0), TotalGC(0.0)
TotalLat(0.0), SumMCp(0.0), SumMCpT(0.0), SumMVCp(0.0), SumMVCpT(0.0), SumMHr(0.0), SumMHrW(0.0), SumMMCp(0.0), SumMMCpT(0.0),
SumMMHr(0.0), SumMMHrW(0.0), SumMHrCO(0.0), SumMMHrCO(0.0), TotalCO2(0.0), SumMHrGC(0.0), SumMMHrGC(0.0), TotalGC(0.0)
{
}
};
Expand Down
Loading

5 comments on commit 449da84

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

AFN-Default-Behavior-Enhancements (Myoldmopar) - x86_64-Linux-Ubuntu-18.04-gcc-7.5: OK (3122 of 3122 tests passed, 0 test warnings)

Build Badge Test Badge

@nrel-bot-3
Copy link

Choose a reason for hiding this comment

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

AFN-Default-Behavior-Enhancements (Myoldmopar) - x86_64-MacOS-10.15-clang-11.0.0: OK (3082 of 3082 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.

AFN-Default-Behavior-Enhancements (Myoldmopar) - x86_64-Linux-Ubuntu-18.04-gcc-7.5-UnitTestsCoverage-Debug: OK (1636 of 1636 tests passed, 0 test warnings)

Build Badge Test Badge Coverage 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.

AFN-Default-Behavior-Enhancements (Myoldmopar) - Win64-Windows-10-VisualStudio-16: OK (2331 of 2331 tests passed, 0 test warnings)

Build Badge Test Badge

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

AFN-Default-Behavior-Enhancements (Myoldmopar) - x86_64-Linux-Ubuntu-18.04-gcc-7.5-IntegrationCoverage-Debug: OK (726 of 726 tests passed, 0 test warnings)

Build Badge Test Badge Coverage Badge

Please sign in to comment.