Mercurial > repos > public > sbplib
changeset 1134:7259b3f3e227 feature/laplace_curvilinear_test
Make LaplaceCurvilinear work for coeff a and b that are scalar, grid functions, or function handles.
author | Martin Almquist <malmquist@stanford.edu> |
---|---|
date | Mon, 27 May 2019 16:53:32 -0700 |
parents | 92dc0a3b5d5d |
children | a0c6f060a105 |
files | +scheme/LaplaceCurvilinear.m |
diffstat | 1 files changed, 4 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/+scheme/LaplaceCurvilinear.m Mon May 27 16:52:28 2019 -0700 +++ b/+scheme/LaplaceCurvilinear.m Mon May 27 16:53:32 2019 -0700 @@ -61,18 +61,19 @@ % assert(isa(g, 'grid.Curvilinear')) if isa(a, 'function_handle') a = grid.evalOn(g, a); - a = spdiag(a); end + a = spdiag(a); if isa(b, 'function_handle') b = grid.evalOn(g, b); - b = spdiag(b); end % If b is scalar if length(b) == 1 - b = b*speye(g.N(), g.N()); + % b = b*speye(g.N(), g.N()); + b = b*ones(g.N(), 1); end + b = spdiag(b); dim = 2; m = g.size();