view +multiblock/local2globalPenalty.m @ 1031:2ef20d00b386 feature/advectionRV

For easier comparison, return both the first order and residual viscosity when evaluating the residual. Add the first order and residual viscosity to the state of the RungekuttaRV time steppers
author Vidar Stiernström <vidar.stiernstrom@it.uu.se>
date Thu, 17 Jan 2019 10:25:06 +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