Skip to content

Commit 18e4dd2

Browse files
committed
reorg
1 parent 03d9ada commit 18e4dd2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+26
-11
lines changed

.github/workflows/matlab.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,14 @@ jobs:
2323
run: |
2424
echo "Checking directory structure..."
2525
ls -la
26+
echo "Checking main executable..."
27+
ls -la cylinder.m || echo "cylinder.m not found"
2628
echo "Checking src directory..."
2729
ls -la src || echo "src directory not found"
28-
echo "Checking distmesh directory..."
29-
ls -la src/distmesh || echo "src/distmesh directory not found"
30+
echo "Checking lib directory..."
31+
ls -la lib || echo "lib directory not found"
32+
echo "Checking distmesh library..."
33+
ls -la lib/distmesh || echo "lib/distmesh directory not found"
3034
3135
- name: Run MATLAB unit tests
3236
uses: matlab-actions/run-tests@v2

src/cylinder.m renamed to cylinder.m

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,15 @@
11
clc;
22
clear;
33

4+
% Add required paths for src functions and lib dependencies
5+
scriptDir = fileparts(mfilename('fullpath'));
6+
7+
% Add src directory for supporting functions (including config.m)
8+
srcPath = fullfile(scriptDir, 'src');
9+
if exist(srcPath, 'dir')
10+
addpath(srcPath);
11+
end
12+
413
% Load Configuration
514
cfg = config();
615

@@ -35,15 +44,14 @@
3544
fprintf('Random seed set to %d for DistMesh reproducibility\n', cfg.simulation.random_seed);
3645
end
3746

38-
% Ensure DistMesh is available
47+
% Ensure DistMesh library is available
3948
if ~exist('distmesh2d', 'file')
40-
% Try to add distmesh from the standard location (relative to script location)
41-
scriptDir = fileparts(mfilename('fullpath'));
42-
distmeshPath = fullfile(scriptDir, 'distmesh');
49+
% Try to add distmesh from lib directory
50+
distmeshPath = fullfile(scriptDir, 'lib', 'distmesh');
4351
if exist(distmeshPath, 'dir')
4452
addpath(distmeshPath);
4553
else
46-
error('distmesh directory not found. Please run setup_paths() or add distmesh to your path manually.');
54+
error('distmesh library not found. Please run setup_paths() or add lib/distmesh to your path manually.');
4755
end
4856
end
4957

0 commit comments

Comments
 (0)