Skip to content

Commit

Permalink
Final fixes for prototype branch.
Browse files Browse the repository at this point in the history
  • Loading branch information
nealkruis committed Oct 30, 2016
1 parent 8c42d64 commit 2f89682
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/EnergyPlus/HeatBalanceKivaManager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ void KivaManager::setupKivaInstances() {
if (Surfaces(wl).Vertex[i].z > maxZ) {maxZ = Surfaces(wl).Vertex[i].z;}
}
Real64 surfHeight = maxZ - minZ;
if (std::abs(surfHeight - wallHeight) > 0.00001) {
if (std::abs(surfHeight - wallHeight) > 0.001) {
// TODO Kiva: all walls must be the same height
ShowSevereError( "all walls must be the same height" );
ShowFatalError( "KivaManager: Program terminates due to preceding conditions." );
Expand Down
23 changes: 17 additions & 6 deletions src/EnergyPlus/SurfaceGeometry.cc
Original file line number Diff line number Diff line change
Expand Up @@ -5869,6 +5869,7 @@ namespace SurfaceGeometry {
using InputProcessor::SameString;
using DataSurfaces::Surface;
using General::TrimSigDigits;
using General::RoundSigDigits;

int IOStatus; // Used in GetObjectItem
int NumAlphas;
Expand Down Expand Up @@ -5896,7 +5897,18 @@ namespace SurfaceGeometry {
Data data;
data.useDetailedExposedPerimeter = true;
int optionsUsed = 0;
if ( !lNumericFieldBlanks( numF ) ) {data.exposedFraction = rNumericArgs( numF ) / Surface(Found).Perimeter; data.useDetailedExposedPerimeter = false; optionsUsed++;} numF++;
if ( !lNumericFieldBlanks( numF ) ) {
data.exposedFraction = rNumericArgs( numF ) / Surface(Found).Perimeter;
if (data.exposedFraction > 1.0) {
ShowWarningError( cCurrentModuleObject + ": " + Surface(Found).Name + ", "+ cNumericFieldNames( numF ) + " is greater than the perimeter of " + Surface(Found).Name);
ShowContinueError( Surface(Found).Name + " perimeter = " + RoundSigDigits(Surface(Found).Perimeter) + ", " + cCurrentModuleObject + " exposed perimeter = " + RoundSigDigits(rNumericArgs( numF )) );
ShowContinueError( cNumericFieldNames( numF ) + " will be set equal to " + Surface(Found).Name + " perimeter");
data.exposedFraction = 1.0;
}

data.useDetailedExposedPerimeter = false;
optionsUsed++;
} numF++;
if ( !lNumericFieldBlanks( numF ) ) {data.exposedFraction = rNumericArgs( numF ); data.useDetailedExposedPerimeter = false; optionsUsed++;} numF++;

int numRemainingFields = NumAlphas - (alpF - 1) + NumNumbers - (numF -1);
Expand All @@ -5917,11 +5929,10 @@ namespace SurfaceGeometry {
ErrorsFound = true;
} alpF++;
}
} else {
if (lNumericFieldBlanks( numF - 1 )) {
ShowSevereError( cCurrentModuleObject + ": " + Surface(Found).Name + ", must define either \"" + cAlphaFieldNames( alpF ) + "\" or \"" + cNumericFieldNames(numF - 1) +"\"");
ErrorsFound = true;
}
}
if (optionsUsed == 0) {
ShowSevereError( cCurrentModuleObject + ": " + Surface(Found).Name + ", must define at least one of \"" + cNumericFieldNames( 1 ) + "\", \"" + cNumericFieldNames( 2 ) + "\", or \"" + cAlphaFieldNames( 2 ) + "\"");
ErrorsFound = true;
}

if (optionsUsed > 1) {
Expand Down
1 change: 1 addition & 0 deletions third_party/cmake/kiva.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ execute_process(COMMAND ${CMAKE_COMMAND} --build . WORKING_DIRECTORY ${CMAKE_BIN
add_subdirectory("${CMAKE_SOURCE_DIR}/third_party/kiva/vendor/lis-1.5.66/")
add_subdirectory("${CMAKE_SOURCE_DIR}/third_party/kiva/src/libkiva/")
if (BUILD_GROUND_PLOT)
add_definitions("-DBOOST_ALL_NO_LIB")
include_directories( SYSTEM "${CMAKE_SOURCE_DIR}/third_party/kiva/vendor/mathgl-2.3.5.1/include/")
include_directories( SYSTEM "${CMAKE_BINARY_DIR}/third_party/kiva/vendor/mathgl-2.3.5.1/include/")
add_subdirectory("${CMAKE_SOURCE_DIR}/third_party/kiva/vendor/zlib-1.2.8/")
Expand Down

8 comments on commit 2f89682

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

kiva (nealkruis) - x86_64-MacOS-10.9-clang: OK (1771 of 1771 tests passed, 0 test warnings)

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

kiva (nealkruis) - x86_64-Linux-Ubuntu-14.04-gcc-4.8: OK (1791 of 1791 tests passed, 0 test warnings)

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

kiva (nealkruis) - x86_64-Linux-Ubuntu-14.04-cppcheck-1.61: OK (0 of 0 tests passed, 0 test warnings)

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

kiva (nealkruis) - i386-Windows-7-VisualStudio-12: OK (1774 of 1774 tests passed, 0 test warnings)

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

kiva (nealkruis) - x86_64-Linux-Ubuntu-14.04-gcc-4.8-UnitTestsCoverage-Debug: OK (1197 of 1197 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.

kiva (nealkruis) - Win64-Windows-7-VisualStudio-12: OK (1774 of 1774 tests passed, 0 test warnings)

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

kiva (nealkruis) - x86_64-Linux-Ubuntu-14.04-gcc-4.8-IntegrationCoverage-Debug: OK (1774 of 1774 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.

kiva (nealkruis) - x86_64-Linux-Ubuntu-14.04-custom_check: OK (0 of 0 tests passed, 0 test warnings)

Build Badge

Please sign in to comment.