view +multiblock/local2globalPenalty.m @ 969:adae8063ea2f feature/poroelastic

Remove silly getBoundaryOperator* methods in multiblock.DiffOp and make the getBoundaryOperator and getBoundaryQuadrature methods use the scheme.getBoundaryOperator/Quadrature methods instead of properties.
author Martin Almquist <malmquist@stanford.edu>
date Tue, 25 Dec 2018 07:21:19 +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