Mercurial > repos > public > sbplib
changeset 825:32c360bb480e feature/operator_files
Add test and fix typo
author | Ylva Rydin <ylva.rydin@telia.com> |
---|---|
date | Mon, 10 Sep 2018 17:42:30 +0200 |
parents | ed8d34894589 |
children | b94bb6ffa38b |
files | operator_def/assemble_opTest.m operator_def/d2_2 |
diffstat | 2 files changed, 12 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/operator_def/assemble_opTest.m Mon Sep 10 17:31:42 2018 +0200 +++ b/operator_def/assemble_opTest.m Mon Sep 10 17:42:30 2018 +0200 @@ -3,22 +3,27 @@ tests = functiontests(localfunctions); end -function TestAssembleD1(testCase) +function TestAssemble_op(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); +D1_new = assemble_op(inner,boundary_block,m)/h; verifyEqual(testCase,D1_new,op.D1,'AbsTol',1e-10) end - - +function TestAssembleD1(testCase) +m = 10; +op = sbp.D2Standard(m,{0 3},2); +h = op.h; +[D1,e_l,e_r] = assemble_D1('d2_2',h,m); - +verifyEqual(testCase,D1,op.D1,'AbsTol',1e-10) +verifyEqual(testCase,e_l,op.e_l,'AbsTol',1e-10) +verifyEqual(testCase,e_r,op.e_r,'AbsTol',1e-10) +end