view +multiblock/local2globalPenalty.m @ 975:47b48a97c675 feature/getBoundaryOperator

Stupid merge makes this branch dangerous. Merging with other branches will result in unexpected changes. Never merge this branch with anything. Closing branch.
author Martin Almquist <malmquist@stanford.edu>
date Thu, 03 Jan 2019 13:24:39 +0100
parents ba10f24bf476
children
line wrap: on
line source

% Takes the block-local penalty and turns it into a global penalty
%   local -- The local penalty
%   div   -- block matrix division for the diffOp
%   I     -- Index of blockmatrix block
function penalty = local2globalPenalty(local, div, I)
    penaltyDiv = {div{1}, size(local,2)};
    penalty_bm = blockmatrix.zero(penaltyDiv);
    penalty_bm{I,1} = local;

    penalty = blockmatrix.toMatrix(penalty_bm);
end