Mercurial > repos > public > sbplib
comparison +grid/funcToComponentsTest.m @ 886:8894e9c49e40 feature/timesteppers
Merge with default for latest changes
author | Vidar Stiernström <vidar.stiernstrom@it.uu.se> |
---|---|
date | Thu, 15 Nov 2018 16:36:21 -0800 |
parents | 3ea2ae2a3d15 |
children |
comparison
equal
deleted
inserted
replaced
816:b5e5b195da1e | 886:8894e9c49e40 |
---|---|
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 |