Mercurial > repos > public > sbplib
comparison +grid/CartesianTest.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 | ba1ae5b2c45e |
children | c5ca9bbfed41 |
comparison
equal
deleted
inserted
replaced
172:c3483685116a | 173:f7bb2a94d291 |
---|---|
182 g2 = grid.Cartesian(inG2{i}{:}); | 182 g2 = grid.Cartesian(inG2{i}{:}); |
183 testCase.verifyEqual(g1.restrictFunc(inGf{i}, g2), outGf{i}); | 183 testCase.verifyEqual(g1.restrictFunc(inGf{i}, g2), outGf{i}); |
184 end | 184 end |
185 end | 185 end |
186 | 186 |
187 function testScaling(testCase) | |
188 in = {[1 2 3], [1 2]}; | |
189 g = grid.Cartesian(in{:}); | |
190 | |
191 testCase.verifyError(@()g.scaling(),'grid:Cartesian:NoScalingSet'); | |
192 | |
193 g.h = [2 1]; | |
194 testCase.verifyEqual(g.scaling(),[2 1]); | |
195 | |
196 end |