changeset 169:ba8adcaf4681 feature/grids

Merge with default.
author Jonatan Werpers <jonatan@werpers.com>
date Wed, 24 Feb 2016 15:04:22 +0100
parents ba1ae5b2c45e (current diff) cb2b12246b7e (diff)
children 62b5f3c34bcb
files
diffstat 4 files changed, 61 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/+scheme/Beam2d.m	Wed Feb 24 15:01:54 2016 +0100
+++ b/+scheme/Beam2d.m	Wed Feb 24 15:04:22 2016 +0100
@@ -1,4 +1,4 @@
-classdef Beam2d < noname.Scheme
+classdef Beam2d < scheme.Scheme
     properties
         m % Number of points in each direction, possibly a vector
         N % Number of points total
--- a/+scheme/Wave.m	Wed Feb 24 15:01:54 2016 +0100
+++ b/+scheme/Wave.m	Wed Feb 24 15:04:22 2016 +0100
@@ -1,4 +1,4 @@
-classdef Wave < noname.Scheme
+classdef Wave < scheme.Scheme
     properties
         m % Number of points in each direction, possibly a vector
         h % Grid spacing
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/checkSbplib.m	Wed Feb 24 15:04:22 2016 +0100
@@ -0,0 +1,56 @@
+function [files,res] = checkSbplib()
+
+
+    files = collectTargets([]);
+
+    if nargout == 0
+        checkcode(files, '-config=checksettings.txt');
+        return
+    end
+
+    res = checkcode(files, '-config=checksettings.txt');
+
+    % Remove any empty respones
+    I = [];
+    for i = 1:length(res)
+        if isempty(res{i})
+            I(end+1) = i;
+        end
+    end
+
+    files(I) = [];
+    res(I) = [];
+end
+
+function targets = collectTargets(dirPath)
+    [mfiles, packages] = getFilesAndPackages(dirPath);
+
+    targets = {};
+    for i = 1:length(mfiles)
+        targets{i} = fullfile(dirPath, mfiles{i});
+    end
+
+    for i = 1:length(packages)
+        subtargets = collectTargets(fullfile(dirPath, packages{i}));
+        targets = [targets subtargets];
+    end
+end
+
+function [mfiles, packages] = getFilesAndPackages(dirPath)
+    if isempty(dirPath)
+        l = dir();
+    else
+        l = dir(dirPath);
+    end
+
+    packages = {};
+    mfiles = {};
+
+    for i = 1:length(l)
+        if l(i).isdir && l(i).name(1) == '+'
+            packages{end+1} = l(i).name;
+        elseif ~l(i).isdir && strcmp(l(i).name(end-1:end),'.m')
+            mfiles{end+1} = l(i).name;
+        end
+    end
+end
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/checksettings.txt	Wed Feb 24 15:04:22 2016 +0100
@@ -0,0 +1,3 @@
+# Copyright 2016 The MathWorks, Inc.
+
+0PROP