Mercurial > repos > public > sbplib
changeset 441:e1d11b6a68d8 feature/grids
Add string methods to OpSets that are missing them
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Mon, 13 Mar 2017 14:43:37 +0100 |
parents | 225765e345c4 |
children | e81325da6f8f |
files | +sbp/D1Gauss.m +sbp/D1Upwind.m +sbp/D2BlockNorm.m +sbp/D4Compatible.m +sbp/D4Standard.m |
diffstat | 5 files changed, 23 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/+sbp/D1Gauss.m Mon Mar 13 14:33:01 2017 +0100 +++ b/+sbp/D1Gauss.m Mon Mar 13 14:43:37 2017 +0100 @@ -37,5 +37,9 @@ obj.borrowing = []; end + + function str = string(obj) + str = [class(obj) '_' num2str(obj.order)]; + end end end
--- a/+sbp/D1Upwind.m Mon Mar 13 14:33:01 2017 +0100 +++ b/+sbp/D1Upwind.m Mon Mar 13 14:43:37 2017 +0100 @@ -53,6 +53,10 @@ obj.borrowing = []; end + + function str = string(obj) + str = [class(obj) '_' num2str(obj.order)]; + end end
--- a/+sbp/D2BlockNorm.m Mon Mar 13 14:33:01 2017 +0100 +++ b/+sbp/D2BlockNorm.m Mon Mar 13 14:43:37 2017 +0100 @@ -50,6 +50,10 @@ obj.m = m; end + + function str = string(obj) + str = [class(obj) '_' num2str(obj.order)]; + end end
--- a/+sbp/D4Compatible.m Mon Mar 13 14:33:01 2017 +0100 +++ b/+sbp/D4Compatible.m Mon Mar 13 14:43:37 2017 +0100 @@ -28,8 +28,8 @@ methods function obj = D4Compatible(m,lim,order) - - + + x_l = lim{1}; x_r = lim{2}; L = x_r-x_l; @@ -68,6 +68,10 @@ end + + function str = string(obj) + str = [class(obj) '_' num2str(obj.order)]; + end end
--- a/+sbp/D4Standard.m Mon Mar 13 14:33:01 2017 +0100 +++ b/+sbp/D4Standard.m Mon Mar 13 14:43:37 2017 +0100 @@ -28,7 +28,7 @@ methods function obj = D4Standard(m,lim,order) - + x_l = lim{1}; x_r = lim{2}; L = x_r-x_l; @@ -56,6 +56,10 @@ obj.m = m; end + + function str = string(obj) + str = [class(obj) '_' num2str(obj.order)]; + end end