diff +sbp/+implementations/d2_noneq_variable_10.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
line wrap: on
line diff
--- a/+sbp/+implementations/d2_noneq_variable_10.m	Mon Feb 14 14:55:29 2022 +0100
+++ b/+sbp/+implementations/d2_noneq_variable_10.m	Thu Feb 17 18:55:11 2022 +0100
@@ -10,6 +10,9 @@
     % order: Accuracy of interior stencil
     BP = 10;
     order = 10;
+    if(N<2*BP)
+        error(['Operator requires at least ' num2str(2*BP) ' grid points']);
+    end
 
     %%%% Norm matrix %%%%%%%%
     P = zeros(BP, 1);