Mercurial > repos > public > sbplib
changeset 344:61b75d6d4899 feature/beams
Added get method for boundary operators on multiblock DiffOp
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Mon, 14 Nov 2016 14:54:53 -0800 |
parents | ac30761d7bdb |
children | 7b5ef8b89268 |
files | +multiblock/DiffOp.m |
diffstat | 1 files changed, 16 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/+multiblock/DiffOp.m Fri Nov 04 11:14:29 2016 -0700 +++ b/+multiblock/DiffOp.m Mon Nov 14 14:54:53 2016 -0800 @@ -108,6 +108,22 @@ ops = sparse2cell(op, obj.NNN); end + function op = getBoundaryOperator(obj, op, boundary) + if iscell(boundary) + localOpName = [op '_' boundary{2}]; + blockId = boundary{1}; + localOp = obj.diffOps{blockId}.(localOpName); + + div = {obj.blockmatrixDiv{1}, size(localOp,2)}; + blockOp = blockmatrix.zero(div); + blockOp{blockId,1} = localOp; + op = blockmatrix.toMatrix(blockOp); + return + else + % Boundary är en sträng med en boundary group i. + end + end + % Creates the closure and penalty matrix for a given boundary condition, % boundary -- the name of the boundary on the form [id][name] where % id is the number of a block and name is the name of a