Mercurial > repos > public > sbplib
diff operator_def/assemble_opTest.m @ 821:95c26000c0ba feature/operator_files
Add files for parsing operator data stencil file
author | Ylva Rydin <ylva.rydin@telia.com> |
---|---|
date | Mon, 10 Sep 2018 16:57:17 +0200 |
parents | |
children | 32c360bb480e |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/operator_def/assemble_opTest.m Mon Sep 10 16:57:17 2018 +0200 @@ -0,0 +1,24 @@ + +function tests = assemble_opTest() + tests = functiontests(localfunctions); +end + +function TestAssembleD1(testCase) +m = 10; +op = sbp.D2Standard(m,{0 1},4); +h = op.h; + +boundary_block = op.D1(1:4,1:6)*h; +inner = op.D1(5,3:7)*h; + +D1_new = assemble_op(inner,boundary_block,h,m); + +verifyEqual(testCase,D1_new,op.D1,'AbsTol',1e-10) + +end + + + + + +