comparison +grid/funcToComponentsTest.m @ 820:501750fbbfdb

Merge with feature/grids
author Jonatan Werpers <jonatan@werpers.com>
date Fri, 07 Sep 2018 14:40:58 +0200
parents 3ea2ae2a3d15
children
comparison
equal deleted inserted replaced
819:fdf0ef9150f4 820:501750fbbfdb
1 function tests = funcToComponentsTest()
2 tests = functiontests(localfunctions);
3 end
4
5
6 function testScalarGf(testCase)
7 g = getTestGrid();
8 gf_in = [1; 2; 3];
9
10 testCase.verifyEqual(grid.funcToComponents(g, gf_in), gf_in);
11 end
12
13 function testVectorGf(testCase)
14 g = getTestGrid();
15 gf_in = [1; 2; 3; 4; 5; 6];
16 out = [1 2; 3 4; 5 6];
17
18 testCase.verifyEqual(grid.funcToComponents(g, gf_in), out);
19 end
20
21 function g = getTestGrid()
22 g = grid.equidistant(3,{0,2});
23 end