view 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 source


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