Mercurial > repos > public > sbplib
view diags.m @ 970:23d9ca6755be feature/poroelastic
Add getBoundaryQuadrature in Elastic2dVariable. Rename get_boundary_operator -> getBoundaryOperator. Add operators in getBoundaryOperator, with full size so that they work with multiblock.DiffOp.getBoundaryOperator.
author | Martin Almquist <malmquist@stanford.edu> |
---|---|
date | Tue, 25 Dec 2018 07:23:38 +0100 |
parents | 0b87863cb29c |
children |
line wrap: on
line source
function A = diags(B,d,m,n) assert(size(B,1) == m); A = repmat(B(:,1)*0, [1, n]); for i = 1:size(B,2) A(:,d(i)+ (1:m)) = A(:,d(i)+ (1:m)) + diag(B(:,i)); end end