Mercurial > repos > public > sbplib
changeset 692:dd3e9a0f5032 feature/quantumTriangles
added jacobian to stichshemes
author | Ylva Rydin <ylva.rydin@telia.com> |
---|---|
date | Fri, 15 Sep 2017 09:21:29 +0200 |
parents | 527a7b954f26 |
children | a5d4e3ced9a5 |
files | +multiblock/stitchSchemes.m +scheme/Schrodinger1dCurve.m |
diffstat | 2 files changed, 7 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
diff -r 527a7b954f26 -r dd3e9a0f5032 +multiblock/stitchSchemes.m --- a/+multiblock/stitchSchemes.m Thu Sep 14 16:00:36 2017 +0200 +++ b/+multiblock/stitchSchemes.m Fri Sep 15 09:21:29 2017 +0200 @@ -11,7 +11,7 @@ % Output parameters are cell arrays and cell matrices. % % Ex: [schms, D, H] = stitchSchemes(schmHand, order, schmParam, blocks, ms, conn, bound) -function [schms, D, H,penalty] = stitchSchemes(schmHand, order, schmParam, grids, conn, bound,timeDep) +function [schms, D, H,penalty,J] = stitchSchemes(schmHand, order, schmParam, grids, conn, bound,timeDep) default_arg('schmParam',[]); default_arg('timeDep','N'); n_blocks = numel(grids); @@ -48,6 +48,11 @@ H{i,i} = schms{i}.H; end + J = cell(n_blocks,n_blocks); + for i = 1:n_blocks + J{i,i} = schms{i}.J; + end + %% Total system matrix % Differentiation terms
diff -r 527a7b954f26 -r dd3e9a0f5032 +scheme/Schrodinger1dCurve.m --- a/+scheme/Schrodinger1dCurve.m Thu Sep 14 16:00:36 2017 +0200 +++ b/+scheme/Schrodinger1dCurve.m Fri Sep 15 09:21:29 2017 +0200 @@ -140,7 +140,7 @@ % u denotes the solution in the own domain % v denotes the solution in the neighbour domain [e_u,d_u,s_u,p_u] = obj.get_boundary_ops(boundary); - [e_v,d_v,s_v,p_v] = neighbour_scheme.get_boundary_ops(neighbour_boundary); + [e_v,d_v] = neighbour_scheme.get_boundary_ops(neighbour_boundary); a1 = s_u* 1/2 * 1i ; b1 = -s_u* 1/2 * 1i;