Mercurial > repos > public > sbplib
view +grid/funcToComponentsTest.m @ 1250:8ec777fb473e
Merged in feature/dirac_discr (pull request #17)
Add multi-d dirac discretization with tests
Approved-by: Vidar Stiernström <vidar.stiernstrom@it.uu.se>
Approved-by: Martin Almquist <malmquist@stanford.edu>
Approved-by: Jonatan Werpers <jonatan.werpers@it.uu.se>
author | Vidar Stiernström <vidar.stiernstrom@it.uu.se> |
---|---|
date | Wed, 20 Nov 2019 22:24:06 +0000 |
parents | 3ea2ae2a3d15 |
children |
line wrap: on
line source
function tests = funcToComponentsTest() tests = functiontests(localfunctions); end function testScalarGf(testCase) g = getTestGrid(); gf_in = [1; 2; 3]; testCase.verifyEqual(grid.funcToComponents(g, gf_in), gf_in); end function testVectorGf(testCase) g = getTestGrid(); gf_in = [1; 2; 3; 4; 5; 6]; out = [1 2; 3 4; 5 6]; testCase.verifyEqual(grid.funcToComponents(g, gf_in), out); end function g = getTestGrid() g = grid.equidistant(3,{0,2}); end