Skip to content

Commit

Permalink
Fix timeout in OWC MCR test on windows runners (#75)
Browse files Browse the repository at this point in the history
* Reduce number of cases in OWC mcr run to avoid timeout on windows runner.

* Format README
  • Loading branch information
H0R5E committed Sep 19, 2024
1 parent df5e04b commit e8cacc3
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 23 deletions.
20 changes: 10 additions & 10 deletions OWC/OrificeModel/TestOWC.m
Original file line number Diff line number Diff line change
@@ -1,37 +1,37 @@
classdef TestOWC < matlab.unittest.TestCase

properties
OriginalDefault
testDir
h5Dir = 'hydroData'
h5Name = 'test17a.h5'
end

methods (Access = 'public')
function obj = TestOWC
obj.testDir = fileparts(mfilename('fullpath'));
end
end

methods (TestMethodSetup)
function killPlots (~)
set(0,'DefaultFigureVisible','off');
end
end

methods(TestClassSetup)
methods(TestClassSetup)
function captureVisibility(testCase)
testCase.OriginalDefault = get(0,'DefaultFigureVisible');
end
function runBemio(testCase)
end
function runBemio(testCase)
cd(testCase.h5Dir);
if isfile(testCase.h5Name)
fprintf('runBemio skipped, *.h5 already exists\n')
else
bemio
end
cd(testCase.testDir)
end
cd(testCase.testDir)
end
end

methods(TestMethodTeardown)
Expand All @@ -40,11 +40,11 @@ function returnHome(testCase)
end
end

methods(TestClassTeardown)
methods(TestClassTeardown)
function checkVisibilityRestored(testCase)
set(0,'DefaultFigureVisible',testCase.OriginalDefault);
testCase.assertEqual(get(0,'DefaultFigureVisible'), ...
testCase.OriginalDefault);
testCase.OriginalDefault);
end
end

Expand Down
Binary file modified OWC/OrificeModel/mcrOrifice.mat
Binary file not shown.
23 changes: 10 additions & 13 deletions OWC/README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,17 @@
# Oscillating Water Column

**Author:** Dominic Forbush
**Author:** Dominic Forbush

**Version:** WEC-Sim v5.0
**Version:** WEC-Sim v5.0

**Geometry** Cylinder Moonpool, WAMIT Test 17 geometry
**Geometry:** Cylinder Moonpool, WAMIT Test 17 geometry

**Dependencies:**
**Dependencies:** Control System Toolbox --> for tf() function

Control System Toolbox --> for tf() function
OWC example modeling an orifice for a floating body cylindrical OWC. Body has a
broken link to couple the GBM mode representing the heaving free surface to the
rigid body heave mode. Intended to demonstrate ways user can modify library
blocks to meet OWC modeling needs.

OWC example modeling an orifice for a floating body cylindrical OWC.
Body has a broken link to couple the GBM mode representing the heaving
free surface to the rigid body heave mode.
Intended to demonstrate ways user can modify library blocks to
meet OWC modeling needs.

Run wecSimMCR for orifice area study in mcrOrifice.mat
which will work with the userDefinedFunctions.m
Run wecSimMCR for orifice area study in mcrOrifice.mat which will work with the
userDefinedFunctions.m

0 comments on commit e8cacc3

Please sign in to comment.