Mercurial > repos > public > sbplib
diff +grid/CurvilinearTest.m @ 173:f7bb2a94d291 feature/grids
Added functionallity for storing grid scaling on structured grids.
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Fri, 26 Feb 2016 16:06:03 +0100 |
parents | 62b5f3c34bcb |
children | c5ca9bbfed41 |
line wrap: on
line diff
--- a/+grid/CurvilinearTest.m Thu Feb 25 11:30:05 2016 +0100 +++ b/+grid/CurvilinearTest.m Fri Feb 26 16:06:03 2016 +0100 @@ -69,3 +69,14 @@ function testMappingInputError(testCase) testCase.assumeFail(); end + +function testScaling(testCase) + in = {{1:2, 1:3}, {[1 2 3 4 5 6]', [7 8 9 10 11 12]'}}; + g = grid.Curvilinear(in{2},in{1}{:}); + + testCase.verifyError(@()g.scaling(),'grid:Curvilinear:NoScalingSet'); + + g.logicalGrid.h = [2 1]; + testCase.verifyEqual(g.scaling(),[2 1]); +end +