Mercurial > repos > public > sbplib
comparison +sbp/+implementations/d2_noneq_variable_4.m @ 1330:855871e0b852 feature/D2_boundary_opt
Add size checks to the operators
author | Vidar Stiernström <vidar.stiernstrom@it.uu.se> |
---|---|
date | Thu, 17 Feb 2022 18:55:11 +0100 |
parents | c2d716c4f1ed |
children | 8e9df030a0a5 |
comparison
equal
deleted
inserted
replaced
1329:7df63b17e078 | 1330:855871e0b852 |
---|---|
8 | 8 |
9 % BP: Number of boundary points | 9 % BP: Number of boundary points |
10 % order: Accuracy of interior stencil | 10 % order: Accuracy of interior stencil |
11 BP = 4; | 11 BP = 4; |
12 order = 4; | 12 order = 4; |
13 if(N<2*BP) | |
14 error(['Operator requires at least ' num2str(2*BP) ' grid points']); | |
15 end | |
13 | 16 |
14 %%%% Norm matrix %%%%%%%% | 17 %%%% Norm matrix %%%%%%%% |
15 P = zeros(BP, 1); | 18 P = zeros(BP, 1); |
16 P0 = 2.1259737557798e-01; | 19 P0 = 2.1259737557798e-01; |
17 P1 = 1.0260290400758e+00; | 20 P1 = 1.0260290400758e+00; |