Mercurial > repos > public > sbplib
diff +grid/Curvilinear.m @ 425:e56dbd9e4196 feature/grids
Merge feature/beams
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Tue, 07 Feb 2017 16:09:02 +0100 |
parents | 4f935415700e |
children | 692bf61385c0 |
line wrap: on
line diff
--- a/+grid/Curvilinear.m Tue Feb 07 15:47:51 2017 +0100 +++ b/+grid/Curvilinear.m Tue Feb 07 16:09:02 2017 +0100 @@ -7,7 +7,8 @@ methods % Creates a curvilinear grid. % Ex: grid.Curvilinear(mapping, xi, eta, ...) - % mapping -- either a matrix or a cell array with physical coordinates. + % mapping -- either a function handle, a matrix or a cell array with physical coordinates. + % A function handle should be a vector valued function of the coordinate mapping. % A matrix should be a grid function (N*D x 1 vector) or a N x D % A cell array should be a 1 x D cell array with either N x 1 vectors % or matrices of the same dimesions as the logical grid. @@ -31,7 +32,7 @@ elseif isnumeric(mapping) obj.coords = matrixMappingToCoords(mapping, N, D); else - error('grid:Curvilinear:Curvilinear','mapping must be a matrix or a cell array.'); + error('grid:Curvilinear:Curvilinear','mapping must be a function handle, a matrix or a cell array.'); end end @@ -66,12 +67,12 @@ % Restricts the grid function gf on obj to the subgrid g. function gf = restrictFunc(obj, gf, g) - gf = obj.logic.restrictFunc(gf, g.baseGrid()); + gf = obj.logic.restrictFunc(gf, g.logic); end % Projects the grid function gf on obj to the grid g. function gf = projectFunc(obj, gf, g) - gf = obj.logic.projectFunc(gf,g.baseGrid()); + gf = obj.logic.projectFunc(gf,g.logic); end function h = scaling(obj)