Mercurial > repos > public > sbplib
comparison +grid/funcToComponentsTest.m @ 832:5573913a0949 feature/burgers1d
Merged with default, and updated +scheme/Burgers1D accordingly
author | Vidar Stiernström <vidar.stiernstrom@it.uu.se> |
---|---|
date | Tue, 11 Sep 2018 15:58:35 +0200 |
parents | 3ea2ae2a3d15 |
children |
comparison
equal
deleted
inserted
replaced
831:d0934d1143b7 | 832:5573913a0949 |
---|---|
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 |