Mercurial > repos > public > sbplib
changeset 198:6fb354955c37 feature/grids
Paused work on boundaryGroups and getBoundaryNames. Are they really needed?
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Mon, 13 Jun 2016 16:49:11 +0200 |
parents | 3cedd5a596bb |
children | d18096820ed4 |
files | +multiblock/Grid.m +multiblock/GridTest.m |
diffstat | 2 files changed, 24 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/+multiblock/Grid.m Wed Apr 06 12:54:52 2016 +0200 +++ b/+multiblock/Grid.m Mon Jun 13 16:49:11 2016 +0200 @@ -2,6 +2,7 @@ properties grids connections + boundaryGroups nPoints end @@ -15,7 +16,9 @@ % it's empty there is no connection otherwise it's a 2 % -cell-vector with strings naming the boundaries to be % connected. (inverted coupling?) - function obj = Grid(grids, connections, boundaryGroup) + %% Should we have boundary groups at all? maybe it can be handled in a + %% cleaner way outside of the class. + function obj = Grid(grids, connections, boundaryGroups) obj.grids = grids; obj.connections = connections; @@ -23,6 +26,8 @@ for i = 1:length(grids) obj.nPoints = obj.nPoints + grids{i}.N(); end + + % if iscell(boundaryGroups) end function n = size(obj)
--- a/+multiblock/GridTest.m Wed Apr 06 12:54:52 2016 +0200 +++ b/+multiblock/GridTest.m Mon Jun 13 16:49:11 2016 +0200 @@ -11,9 +11,27 @@ end function testGetBoundaryNames(testCase) + [grids, conn] = prepareAdjecentBlocks(); + + mbg = multiblock.Grid(grids, conn, multiblock.BoundaryGroup({1,'w'},{2,'w'}) ); + testCase.verifyFail(); end function testGetBoundary(testCase) + [grids, conn] = prepareAdjecentBlocks(); + + mbg = multiblock.Grid(grids, conn, multiblock.BoundaryGroup({1,'w'},{2,'w'}) ); testCase.verifyFail(); +end + + +function [grids, conn] = prepareAdjecentBlocks() + grids = { + grid.Cartesian([0 1 2], [3 4 5]); + grid.Cartesian([1 2], [10 20]); + }; + + conn = cell(2,2); + conn{1, 2} = {'s','n'}; end \ No newline at end of file