view +multiblock/local2globalClosure.m @ 1344:b4e5e45bd239 feature/D2_boundary_opt

Remove round off zeros from D2Nonequidistant operators
author Vidar Stiernström <vidar.stiernstrom@it.uu.se>
date Sat, 15 Oct 2022 15:48:20 +0200
parents ba10f24bf476
children
line wrap: on
line source

% Takes the block-local closures and turns it into a global closure
%   local -- The local closure
%   div   -- block matrix division for the diffOp
%   I     -- Index of blockmatrix block
function closure = local2globalClosure(local, div, I)
    closure_bm = blockmatrix.zero(div);
    closure_bm{I,I} = local;

    closure = blockmatrix.toMatrix(closure_bm);
end