Mercurial > repos > public > sbplib
diff +grid/Grid.m @ 427:a613960a157b feature/quantumTriangles
merged with feature/beams
author | Ylva Rydin <ylva.rydin@telia.com> |
---|---|
date | Thu, 26 Jan 2017 15:59:25 +0100 |
parents | c5ca9bbfed41 |
children | 763d50caddf3 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/+grid/Grid.m Thu Jan 26 15:59:25 2017 +0100 @@ -0,0 +1,25 @@ +classdef Grid < handle + % General d dimensional grid with n points + methods (Abstract) + % n returns the number of points in the grid + o = N(obj) + + % d returns the spatial dimension of the grid + o = D(obj) + + % points returns a n x d matrix containing the coordinates for all points. + X = points(obj) + + % Restricts the grid function gf on obj to the subgrid g. + gf = restrictFunc(obj, gf, g) + + % Projects the grid function gf on obj to the grid g. + gf = projectFunc(obj, gf, g) + + % Return the names of all boundaries in this grid. + bs = getBoundaryNames(obj) + + % Return coordinates for the given boundary + b = getBoundary(obj, name) + end +end