From e8d3108ce7f0a76a1fe1b73381325ed6829ce25d Mon Sep 17 00:00:00 2001 From: jbrzensk Date: Thu, 2 Jul 2026 16:04:25 -0700 Subject: [PATCH 1/2] addpath(genpath) for future ops in subdirs --- examples/matlab_octave/Compact_operators/compact.m | 2 +- examples/matlab_octave/KG_product.m | 2 +- examples/matlab_octave/burgers1D.m | 2 +- examples/matlab_octave/convection_diffusion3D.m | 2 +- examples/matlab_octave/cylinder_flow_2D.m | 2 +- examples/matlab_octave/elliptic1D.m | 2 +- examples/matlab_octave/elliptic1DHomogeneousDirichlet.m | 2 +- examples/matlab_octave/elliptic1DLeftDirichletRightRobin.m | 2 +- .../matlab_octave/elliptic1DLeftNeumannRightDirichlet.m | 2 +- examples/matlab_octave/elliptic1DLeftNeumannRightNeumann.m | 2 +- examples/matlab_octave/elliptic1DLeftNeumannRightRobin.m | 2 +- examples/matlab_octave/elliptic1DLeftRobinRightRobin.m | 2 +- examples/matlab_octave/elliptic1DNonHomogeneousDirichlet.m | 2 +- examples/matlab_octave/elliptic1DNonPeriodicBC.m | 2 +- examples/matlab_octave/elliptic1DPeriodicBC.m | 2 +- examples/matlab_octave/elliptic1DaddScalarBC.m | 2 +- examples/matlab_octave/elliptic2D.m | 2 +- examples/matlab_octave/elliptic2DPeriodic.m | 2 +- examples/matlab_octave/elliptic2DXDirichletYDirichlet.m | 2 +- examples/matlab_octave/elliptic2DXPerYDirichlet.m | 2 +- examples/matlab_octave/elliptic2DXPeriodicYPeriodic.m | 2 +- examples/matlab_octave/elliptic2D_case2.m | 2 +- examples/matlab_octave/elliptic2D_nodal_curv.m | 2 +- examples/matlab_octave/elliptic2D_nodal_curv_sinusoidal.m | 2 +- examples/matlab_octave/elliptic3D.m | 2 +- .../elliptic3DXDirichletYDirichletZDirichlet.m | 2 +- examples/matlab_octave/elliptic3DXDirichletYPerZNeumann.m | 2 +- examples/matlab_octave/elliptic3DXDirichletYPerZPer.m | 2 +- .../matlab_octave/elliptic3DXDirichletYPeriodicZPeriodic.m | 2 +- .../matlab_octave/elliptic3DXNeumannYPeriodicZPeriodic.m | 2 +- examples/matlab_octave/elliptic3DaddScalarBC3D.m | 2 +- examples/matlab_octave/helmholtz2D_wifi.m | 2 +- examples/matlab_octave/hyperbolic1D.m | 2 +- examples/matlab_octave/hyperbolic1D_lax_friedrichs.m | 2 +- examples/matlab_octave/hyperbolic1D_upwind.m | 2 +- examples/matlab_octave/integration1D.m | 2 +- examples/matlab_octave/lock_exchange.m | 2 +- examples/matlab_octave/maxwell1D.m | 2 +- examples/matlab_octave/parabolic1D.m | 2 +- examples/matlab_octave/parabolic2D.m | 2 +- examples/matlab_octave/poisson2D.m | 2 +- examples/matlab_octave/richards.m | 2 +- examples/matlab_octave/schrodinger2D.m | 2 +- examples/matlab_octave/sturmLiouvilleBessel.m | 2 +- examples/matlab_octave/sturmLiouvilleChebyshev.m | 2 +- .../sturmLiouvilleHelmholtzDirichletDirichlet.m | 2 +- .../matlab_octave/sturmLiouvilleHelmholtzDirichletRobin.m | 2 +- examples/matlab_octave/sturmLiouvilleHermite.m | 2 +- examples/matlab_octave/sturmLiouvilleLaguerre.m | 2 +- examples/matlab_octave/sturmLiouvilleLegendre.m | 2 +- examples/matlab_octave/terzaghi1D.m | 2 +- examples/matlab_octave/test_curl.m | 2 +- examples/matlab_octave/test_div2DCurv.m | 2 +- examples/matlab_octave/test_div3DCurv.m | 2 +- examples/matlab_octave/test_grad2DCurv.m | 2 +- examples/matlab_octave/test_grad3DCurv.m | 2 +- examples/matlab_octave/test_lap3DCurv.m | 2 +- examples/matlab_octave/test_lap3DCurv_case2.m | 2 +- examples/matlab_octave/test_nodal2DCurv.m | 2 +- .../comparison_two_way_wave_md_vs_fd.m | 2 +- examples/matlab_octave/van_der_pol.m | 2 +- examples/matlab_octave/wave1D.m | 2 +- examples/matlab_octave/wave1DTimeVaryingBC.m | 2 +- examples/matlab_octave/wave1D_case2.m | 2 +- .../matlab_octave/wave1D_convergence/wave1D_convergence.m | 2 +- examples/matlab_octave/wave2D.m | 2 +- examples/matlab_octave/wave2D_case2.m | 2 +- tests/matlab_octave/testAddScalarBC.m | 6 +++--- tests/matlab_octave/testBCConsistency.m | 6 +++--- tests/matlab_octave/testDivPolynomial.m | 6 +++--- tests/matlab_octave/testDivergence.m | 2 +- tests/matlab_octave/testEnergy.m | 2 +- tests/matlab_octave/testGradPolynomial.m | 6 +++--- tests/matlab_octave/testGradient.m | 2 +- tests/matlab_octave/testLapPolynomial.m | 6 +++--- tests/matlab_octave/testLaplacian.m | 2 +- 76 files changed, 86 insertions(+), 86 deletions(-) diff --git a/examples/matlab_octave/Compact_operators/compact.m b/examples/matlab_octave/Compact_operators/compact.m index b4a4950d3..87c9f925e 100644 --- a/examples/matlab_octave/Compact_operators/compact.m +++ b/examples/matlab_octave/Compact_operators/compact.m @@ -9,7 +9,7 @@ close all format rat -addpath('../../src/matlab_octave') +addpath(genpath('../../src/matlab_octave')) k = 4; m = 2*k+1; diff --git a/examples/matlab_octave/KG_product.m b/examples/matlab_octave/KG_product.m index 3bbd6df9f..4d5cc7ad9 100644 --- a/examples/matlab_octave/KG_product.m +++ b/examples/matlab_octave/KG_product.m @@ -2,7 +2,7 @@ clc close all -addpath('../../src/matlab_octave') +addpath(genpath('../../src/matlab_octave')) % Parameters k = 2; diff --git a/examples/matlab_octave/burgers1D.m b/examples/matlab_octave/burgers1D.m index 492b295ed..f9ba6315a 100644 --- a/examples/matlab_octave/burgers1D.m +++ b/examples/matlab_octave/burgers1D.m @@ -5,7 +5,7 @@ clc close all -addpath('../../src/matlab_octave') +addpath(genpath('../../src/matlab_octave')) west = -15; % Domain's limits east = 15; diff --git a/examples/matlab_octave/convection_diffusion3D.m b/examples/matlab_octave/convection_diffusion3D.m index 0c2186b21..ce2f58d5f 100644 --- a/examples/matlab_octave/convection_diffusion3D.m +++ b/examples/matlab_octave/convection_diffusion3D.m @@ -4,7 +4,7 @@ close all format short -addpath('../../src/matlab_octave') +addpath(genpath('../../src/matlab_octave')) % Mimetic operator's parameters k = 2; diff --git a/examples/matlab_octave/cylinder_flow_2D.m b/examples/matlab_octave/cylinder_flow_2D.m index ae9c24332..3a3d53772 100644 --- a/examples/matlab_octave/cylinder_flow_2D.m +++ b/examples/matlab_octave/cylinder_flow_2D.m @@ -83,7 +83,7 @@ % transient incompressible flow solver in a compact way. close all; clear; clc; -addpath('../../src/matlab_octave') +addpath(genpath('../../src/matlab_octave')) %% Settings (match C++) Re = 200; % C++: 200 diff --git a/examples/matlab_octave/elliptic1D.m b/examples/matlab_octave/elliptic1D.m index b0ef05ac9..ae63dac18 100644 --- a/examples/matlab_octave/elliptic1D.m +++ b/examples/matlab_octave/elliptic1D.m @@ -3,7 +3,7 @@ clc close all -addpath('../../src/matlab_octave') +addpath(genpath('../../src/matlab_octave')) west = 0; % Domain's limits east = 1; diff --git a/examples/matlab_octave/elliptic1DHomogeneousDirichlet.m b/examples/matlab_octave/elliptic1DHomogeneousDirichlet.m index ba4c181e9..6f77e2490 100755 --- a/examples/matlab_octave/elliptic1DHomogeneousDirichlet.m +++ b/examples/matlab_octave/elliptic1DHomogeneousDirichlet.m @@ -7,7 +7,7 @@ % close all; clc; -addpath('../../src/matlab_octave'); +addpath(genpath('../../src/matlab_octave')); k = 2; bvp = 1; diff --git a/examples/matlab_octave/elliptic1DLeftDirichletRightRobin.m b/examples/matlab_octave/elliptic1DLeftDirichletRightRobin.m index 37dc4a4a8..1608a1f1b 100755 --- a/examples/matlab_octave/elliptic1DLeftDirichletRightRobin.m +++ b/examples/matlab_octave/elliptic1DLeftDirichletRightRobin.m @@ -13,7 +13,7 @@ % close all; clc; -addpath('../../src/matlab_octave'); +addpath(genpath('../../src/matlab_octave')); k = 2; bvp = 7; diff --git a/examples/matlab_octave/elliptic1DLeftNeumannRightDirichlet.m b/examples/matlab_octave/elliptic1DLeftNeumannRightDirichlet.m index 27e7275d9..378488089 100755 --- a/examples/matlab_octave/elliptic1DLeftNeumannRightDirichlet.m +++ b/examples/matlab_octave/elliptic1DLeftNeumannRightDirichlet.m @@ -7,7 +7,7 @@ % close all; clc; -addpath('../../src/matlab_octave'); +addpath(genpath('../../src/matlab_octave')); k = 2; bvp = 3; diff --git a/examples/matlab_octave/elliptic1DLeftNeumannRightNeumann.m b/examples/matlab_octave/elliptic1DLeftNeumannRightNeumann.m index 85a1270d7..44f8d6255 100755 --- a/examples/matlab_octave/elliptic1DLeftNeumannRightNeumann.m +++ b/examples/matlab_octave/elliptic1DLeftNeumannRightNeumann.m @@ -9,7 +9,7 @@ % close all; clc; -addpath('../../src/matlab_octave'); +addpath(genpath('../../src/matlab_octave')); k = 2; bvp = 4; diff --git a/examples/matlab_octave/elliptic1DLeftNeumannRightRobin.m b/examples/matlab_octave/elliptic1DLeftNeumannRightRobin.m index 5a128d262..5f2353801 100755 --- a/examples/matlab_octave/elliptic1DLeftNeumannRightRobin.m +++ b/examples/matlab_octave/elliptic1DLeftNeumannRightRobin.m @@ -13,7 +13,7 @@ % close all; clc; -addpath('../../src/matlab_octave'); +addpath(genpath('../../src/matlab_octave')); k = 2; bvp = 8; diff --git a/examples/matlab_octave/elliptic1DLeftRobinRightRobin.m b/examples/matlab_octave/elliptic1DLeftRobinRightRobin.m index 3860277a5..b7c4b1bed 100755 --- a/examples/matlab_octave/elliptic1DLeftRobinRightRobin.m +++ b/examples/matlab_octave/elliptic1DLeftRobinRightRobin.m @@ -15,7 +15,7 @@ % close all; clc; -addpath('../../src/matlab_octave'); +addpath(genpath('../../src/matlab_octave')); k = 2; bvp = 6; diff --git a/examples/matlab_octave/elliptic1DNonHomogeneousDirichlet.m b/examples/matlab_octave/elliptic1DNonHomogeneousDirichlet.m index b29d4c1e6..0574dbc99 100755 --- a/examples/matlab_octave/elliptic1DNonHomogeneousDirichlet.m +++ b/examples/matlab_octave/elliptic1DNonHomogeneousDirichlet.m @@ -7,7 +7,7 @@ % close all; clc; -addpath('../../src/matlab_octave'); +addpath(genpath('../../src/matlab_octave')); k = 2; bvp = 2; diff --git a/examples/matlab_octave/elliptic1DNonPeriodicBC.m b/examples/matlab_octave/elliptic1DNonPeriodicBC.m index 821b4d1c2..34e263ae4 100755 --- a/examples/matlab_octave/elliptic1DNonPeriodicBC.m +++ b/examples/matlab_octave/elliptic1DNonPeriodicBC.m @@ -7,7 +7,7 @@ % close all; clc; -addpath('../../src/matlab_octave'); +addpath(genpath('../../src/matlab_octave')); k = 2; bvp = 1; diff --git a/examples/matlab_octave/elliptic1DPeriodicBC.m b/examples/matlab_octave/elliptic1DPeriodicBC.m index 63bc8a315..9caa0aeaa 100755 --- a/examples/matlab_octave/elliptic1DPeriodicBC.m +++ b/examples/matlab_octave/elliptic1DPeriodicBC.m @@ -8,7 +8,7 @@ % close all; clc; -addpath('../../src/matlab_octave'); +addpath(genpath('../../src/matlab_octave')); k = 2; bvp = 5; diff --git a/examples/matlab_octave/elliptic1DaddScalarBC.m b/examples/matlab_octave/elliptic1DaddScalarBC.m index d92308f40..478c44d29 100644 --- a/examples/matlab_octave/elliptic1DaddScalarBC.m +++ b/examples/matlab_octave/elliptic1DaddScalarBC.m @@ -5,7 +5,7 @@ clc close all -addpath('../../src/matlab_octave') +addpath(genpath('../../src/matlab_octave')) west = 0; % Domain's limits east = 1; diff --git a/examples/matlab_octave/elliptic2D.m b/examples/matlab_octave/elliptic2D.m index ac6ec754b..453ee0c9d 100644 --- a/examples/matlab_octave/elliptic2D.m +++ b/examples/matlab_octave/elliptic2D.m @@ -2,7 +2,7 @@ clc close all -addpath('../../src/matlab_octave') +addpath(genpath('../../src/matlab_octave')) % Parameters k = 2; diff --git a/examples/matlab_octave/elliptic2DPeriodic.m b/examples/matlab_octave/elliptic2DPeriodic.m index d2e10b4e8..32536da5d 100755 --- a/examples/matlab_octave/elliptic2DPeriodic.m +++ b/examples/matlab_octave/elliptic2DPeriodic.m @@ -8,7 +8,7 @@ % close all; clc; -addpath('../../src/matlab_octave'); +addpath(genpath('../../src/matlab_octave')); k = 2; bvp = 2; diff --git a/examples/matlab_octave/elliptic2DXDirichletYDirichlet.m b/examples/matlab_octave/elliptic2DXDirichletYDirichlet.m index 7d1bfdafd..5534f2ae8 100755 --- a/examples/matlab_octave/elliptic2DXDirichletYDirichlet.m +++ b/examples/matlab_octave/elliptic2DXDirichletYDirichlet.m @@ -8,7 +8,7 @@ % close all; clc; -addpath('../../src/matlab_octave'); +addpath(genpath('../../src/matlab_octave')); k = 2; bvp = 1; diff --git a/examples/matlab_octave/elliptic2DXPerYDirichlet.m b/examples/matlab_octave/elliptic2DXPerYDirichlet.m index 0ac84dc72..4388b7cf9 100755 --- a/examples/matlab_octave/elliptic2DXPerYDirichlet.m +++ b/examples/matlab_octave/elliptic2DXPerYDirichlet.m @@ -7,7 +7,7 @@ % close all; clc; -addpath('../../src/matlab_octave'); +addpath(genpath('../../src/matlab_octave')); k = 2; bvp = 5; diff --git a/examples/matlab_octave/elliptic2DXPeriodicYPeriodic.m b/examples/matlab_octave/elliptic2DXPeriodicYPeriodic.m index fdeb53f4c..b63800190 100755 --- a/examples/matlab_octave/elliptic2DXPeriodicYPeriodic.m +++ b/examples/matlab_octave/elliptic2DXPeriodicYPeriodic.m @@ -8,7 +8,7 @@ % close all; clc; -addpath('../../src/matlab_octave'); +addpath(genpath('../../src/matlab_octave')); k = 2; diff --git a/examples/matlab_octave/elliptic2D_case2.m b/examples/matlab_octave/elliptic2D_case2.m index f6ea81f4b..f52a9ffd7 100644 --- a/examples/matlab_octave/elliptic2D_case2.m +++ b/examples/matlab_octave/elliptic2D_case2.m @@ -2,7 +2,7 @@ clc close all -addpath('../../src/matlab_octave') +addpath(genpath('../../src/matlab_octave')) % Parameters e = 1; % Controls "rectangularity" of the grid, e = 0 -> completely rectangular diff --git a/examples/matlab_octave/elliptic2D_nodal_curv.m b/examples/matlab_octave/elliptic2D_nodal_curv.m index e118169d4..4a6a1fd48 100644 --- a/examples/matlab_octave/elliptic2D_nodal_curv.m +++ b/examples/matlab_octave/elliptic2D_nodal_curv.m @@ -2,7 +2,7 @@ clc close all -addpath('../../src/matlab_octave') +addpath(genpath('../../src/matlab_octave')) % Parameters k = 2; diff --git a/examples/matlab_octave/elliptic2D_nodal_curv_sinusoidal.m b/examples/matlab_octave/elliptic2D_nodal_curv_sinusoidal.m index 1b5fdb55c..73fc94bcb 100644 --- a/examples/matlab_octave/elliptic2D_nodal_curv_sinusoidal.m +++ b/examples/matlab_octave/elliptic2D_nodal_curv_sinusoidal.m @@ -2,7 +2,7 @@ clc close all -addpath('../../src/matlab_octave') +addpath(genpath('../../src/matlab_octave')) % Parameters e = 1; % Controls "rectangularity" of the grid, e = 0 -> completely rectangular diff --git a/examples/matlab_octave/elliptic3D.m b/examples/matlab_octave/elliptic3D.m index 1dac4bcf5..c661c84af 100644 --- a/examples/matlab_octave/elliptic3D.m +++ b/examples/matlab_octave/elliptic3D.m @@ -3,7 +3,7 @@ clc close all -addpath('../../src/matlab_octave') +addpath(genpath('../../src/matlab_octave')) k = 2; % Order of accuracy m = 5; % -> 7 diff --git a/examples/matlab_octave/elliptic3DXDirichletYDirichletZDirichlet.m b/examples/matlab_octave/elliptic3DXDirichletYDirichletZDirichlet.m index 36a6edf81..00224e273 100755 --- a/examples/matlab_octave/elliptic3DXDirichletYDirichletZDirichlet.m +++ b/examples/matlab_octave/elliptic3DXDirichletYDirichletZDirichlet.m @@ -8,7 +8,7 @@ % close all; clc; -addpath('../../src/matlab_octave'); +addpath(genpath('../../src/matlab_octave')); k = 2; bvp = 1; diff --git a/examples/matlab_octave/elliptic3DXDirichletYPerZNeumann.m b/examples/matlab_octave/elliptic3DXDirichletYPerZNeumann.m index ea1614888..784a03df2 100755 --- a/examples/matlab_octave/elliptic3DXDirichletYPerZNeumann.m +++ b/examples/matlab_octave/elliptic3DXDirichletYPerZNeumann.m @@ -8,7 +8,7 @@ % close all; clc; -addpath('../../src/matlab_octave'); +addpath(genpath('../../src/matlab_octave')); k = 2; bvp = 2; diff --git a/examples/matlab_octave/elliptic3DXDirichletYPerZPer.m b/examples/matlab_octave/elliptic3DXDirichletYPerZPer.m index ec8461395..0e9c614ef 100755 --- a/examples/matlab_octave/elliptic3DXDirichletYPerZPer.m +++ b/examples/matlab_octave/elliptic3DXDirichletYPerZPer.m @@ -9,7 +9,7 @@ % close all; clc; -addpath('../../src/matlab_octave'); +addpath(genpath('../../src/matlab_octave')); k = 2; bvp = 2; diff --git a/examples/matlab_octave/elliptic3DXDirichletYPeriodicZPeriodic.m b/examples/matlab_octave/elliptic3DXDirichletYPeriodicZPeriodic.m index 561918527..23c5ac3af 100755 --- a/examples/matlab_octave/elliptic3DXDirichletYPeriodicZPeriodic.m +++ b/examples/matlab_octave/elliptic3DXDirichletYPeriodicZPeriodic.m @@ -9,7 +9,7 @@ % close all; clc; -addpath('../../src/matlab_octave'); +addpath(genpath('../../src/matlab_octave')); k = 2; bvp = 2; diff --git a/examples/matlab_octave/elliptic3DXNeumannYPeriodicZPeriodic.m b/examples/matlab_octave/elliptic3DXNeumannYPeriodicZPeriodic.m index 8778923d8..8111ef73b 100755 --- a/examples/matlab_octave/elliptic3DXNeumannYPeriodicZPeriodic.m +++ b/examples/matlab_octave/elliptic3DXNeumannYPeriodicZPeriodic.m @@ -9,7 +9,7 @@ % close all; clc; -addpath('../../src/matlab_octave'); +addpath(genpath('../../src/matlab_octave')); k = 2; bvp = 2; diff --git a/examples/matlab_octave/elliptic3DaddScalarBC3D.m b/examples/matlab_octave/elliptic3DaddScalarBC3D.m index 21760e95b..72d78d407 100644 --- a/examples/matlab_octave/elliptic3DaddScalarBC3D.m +++ b/examples/matlab_octave/elliptic3DaddScalarBC3D.m @@ -5,7 +5,7 @@ clc close all -addpath('../../src/matlab_octave') +addpath(genpath('../../src/matlab_octave')) k = 2; % Order of accuracy m = 5; % -> 7 diff --git a/examples/matlab_octave/helmholtz2D_wifi.m b/examples/matlab_octave/helmholtz2D_wifi.m index 64fb5c447..97a52076c 100644 --- a/examples/matlab_octave/helmholtz2D_wifi.m +++ b/examples/matlab_octave/helmholtz2D_wifi.m @@ -4,7 +4,7 @@ % n = refractive index % This equation models the wifi signal propagation in a room clear; clc; close all; -addpath('../../src/matlab_octave') +addpath(genpath('../../src/matlab_octave')) % define the walls wall = @(X,Y) (X>=10.0 & X<=39.0 & Y>=20.0 & Y<=21.0) | (X>=30.0 & X<=31.0 & Y>=1.0 & Y<=16.0) | ... diff --git a/examples/matlab_octave/hyperbolic1D.m b/examples/matlab_octave/hyperbolic1D.m index cc363a002..21dd50b0c 100644 --- a/examples/matlab_octave/hyperbolic1D.m +++ b/examples/matlab_octave/hyperbolic1D.m @@ -3,7 +3,7 @@ clc close all -addpath('../../src/matlab_octave') +addpath(genpath('../../src/matlab_octave')) a = 1; % Velocity west = 0; % Domain's limits diff --git a/examples/matlab_octave/hyperbolic1D_lax_friedrichs.m b/examples/matlab_octave/hyperbolic1D_lax_friedrichs.m index e4ea5e7e7..a5e4a6b71 100644 --- a/examples/matlab_octave/hyperbolic1D_lax_friedrichs.m +++ b/examples/matlab_octave/hyperbolic1D_lax_friedrichs.m @@ -4,7 +4,7 @@ clc close all -addpath('../../src/matlab_octave') +addpath(genpath('../../src/matlab_octave')) a = 1; % Velocity west = 0; % Domain's limits diff --git a/examples/matlab_octave/hyperbolic1D_upwind.m b/examples/matlab_octave/hyperbolic1D_upwind.m index 1e2f4619f..ac188fac5 100644 --- a/examples/matlab_octave/hyperbolic1D_upwind.m +++ b/examples/matlab_octave/hyperbolic1D_upwind.m @@ -4,7 +4,7 @@ clc close all -addpath('../../src/matlab_octave') +addpath(genpath('../../src/matlab_octave')) a = 1; % Velocity west = 0; % Domain's limits diff --git a/examples/matlab_octave/integration1D.m b/examples/matlab_octave/integration1D.m index e2accbd14..587a39bd0 100644 --- a/examples/matlab_octave/integration1D.m +++ b/examples/matlab_octave/integration1D.m @@ -8,7 +8,7 @@ clc; close all; -addpath('../../src/matlab_octave'); +addpath(genpath('../../src/matlab_octave')); % Domain limits west = -5; diff --git a/examples/matlab_octave/lock_exchange.m b/examples/matlab_octave/lock_exchange.m index 38210738e..6d5621b5e 100644 --- a/examples/matlab_octave/lock_exchange.m +++ b/examples/matlab_octave/lock_exchange.m @@ -8,7 +8,7 @@ close all %% MOLE'S path so mimetic methods can be used -addpath('../../src/matlab_octave') +addpath(genpath('../../src/matlab_octave')) tic % Start the timer %-------------------------------------------------------------------------- diff --git a/examples/matlab_octave/maxwell1D.m b/examples/matlab_octave/maxwell1D.m index ade7d4e91..c3175d4cd 100644 --- a/examples/matlab_octave/maxwell1D.m +++ b/examples/matlab_octave/maxwell1D.m @@ -1,7 +1,7 @@ % Solution to 1D Maxwell's equations using mimetic operators and leapfrog clear; clc; close all; -addpath('../../src/matlab_octave'); +addpath(genpath('../../src/matlab_octave')); nt = 150; % number of time steps m = 100; % number of cells diff --git a/examples/matlab_octave/parabolic1D.m b/examples/matlab_octave/parabolic1D.m index c4498f2cf..7bb8a15eb 100644 --- a/examples/matlab_octave/parabolic1D.m +++ b/examples/matlab_octave/parabolic1D.m @@ -3,7 +3,7 @@ clc close all -addpath('../../src/matlab_octave') +addpath(genpath('../../src/matlab_octave')) is_Octave = exist('OCTAVE_VERSION', 'builtin') ~= 0; diff --git a/examples/matlab_octave/parabolic2D.m b/examples/matlab_octave/parabolic2D.m index c36a7405b..4a8fe2cce 100644 --- a/examples/matlab_octave/parabolic2D.m +++ b/examples/matlab_octave/parabolic2D.m @@ -12,7 +12,7 @@ close all % Add paths to lap2D and addScalarBC2D in the src/matlab_octave -addpath('../../src/matlab_octave') +addpath(genpath('../../src/matlab_octave')) % Parameters method = "implicit"; diff --git a/examples/matlab_octave/poisson2D.m b/examples/matlab_octave/poisson2D.m index fc46f780a..32c5d054a 100644 --- a/examples/matlab_octave/poisson2D.m +++ b/examples/matlab_octave/poisson2D.m @@ -3,7 +3,7 @@ clc close all -addpath('../../src/matlab_octave') +addpath(genpath('../../src/matlab_octave')) k = 2; % Order of accuracy m = 5; % Vertical resolution - minimal number of grid points required for the operator diff --git a/examples/matlab_octave/richards.m b/examples/matlab_octave/richards.m index 5b2b7661f..f38bb62a2 100644 --- a/examples/matlab_octave/richards.m +++ b/examples/matlab_octave/richards.m @@ -6,7 +6,7 @@ clc close all - addpath('../../src/matlab_octave'); + addpath(genpath('../../src/matlab_octave')); % Spatial and temporal discretization k = 4; diff --git a/examples/matlab_octave/schrodinger2D.m b/examples/matlab_octave/schrodinger2D.m index be6458285..a2b9e0673 100644 --- a/examples/matlab_octave/schrodinger2D.m +++ b/examples/matlab_octave/schrodinger2D.m @@ -2,7 +2,7 @@ clc close all -addpath('../../src/matlab_octave') +addpath(genpath('../../src/matlab_octave')) % Parameters Lxy = 1; % Length of box in x and y diff --git a/examples/matlab_octave/sturmLiouvilleBessel.m b/examples/matlab_octave/sturmLiouvilleBessel.m index 93042b66d..7b565eefd 100755 --- a/examples/matlab_octave/sturmLiouvilleBessel.m +++ b/examples/matlab_octave/sturmLiouvilleBessel.m @@ -7,7 +7,7 @@ % close all; clc; -addpath('../../src/matlab_octave'); +addpath(genpath('../../src/matlab_octave')); k = 2; bvp = 2; diff --git a/examples/matlab_octave/sturmLiouvilleChebyshev.m b/examples/matlab_octave/sturmLiouvilleChebyshev.m index 77eb8add4..a2620faa1 100755 --- a/examples/matlab_octave/sturmLiouvilleChebyshev.m +++ b/examples/matlab_octave/sturmLiouvilleChebyshev.m @@ -7,7 +7,7 @@ % close all; clc; -addpath('../../src/matlab_octave'); +addpath(genpath('../../src/matlab_octave')); k = 2; bvp = 1; diff --git a/examples/matlab_octave/sturmLiouvilleHelmholtzDirichletDirichlet.m b/examples/matlab_octave/sturmLiouvilleHelmholtzDirichletDirichlet.m index 0fb517fbe..58ab0fb69 100755 --- a/examples/matlab_octave/sturmLiouvilleHelmholtzDirichletDirichlet.m +++ b/examples/matlab_octave/sturmLiouvilleHelmholtzDirichletDirichlet.m @@ -7,7 +7,7 @@ % close all; clc; -addpath('../../src/matlab_octave'); +addpath(genpath('../../src/matlab_octave')); k = 2; bvp = 6; diff --git a/examples/matlab_octave/sturmLiouvilleHelmholtzDirichletRobin.m b/examples/matlab_octave/sturmLiouvilleHelmholtzDirichletRobin.m index 66ce2989f..3e90e7837 100755 --- a/examples/matlab_octave/sturmLiouvilleHelmholtzDirichletRobin.m +++ b/examples/matlab_octave/sturmLiouvilleHelmholtzDirichletRobin.m @@ -7,7 +7,7 @@ % close all; clc; -addpath('../../src/matlab_octave'); +addpath(genpath('../../src/matlab_octave')); k = 2; bvp = 7; diff --git a/examples/matlab_octave/sturmLiouvilleHermite.m b/examples/matlab_octave/sturmLiouvilleHermite.m index 72c6958ee..412df2fbd 100755 --- a/examples/matlab_octave/sturmLiouvilleHermite.m +++ b/examples/matlab_octave/sturmLiouvilleHermite.m @@ -7,7 +7,7 @@ % close all; clc; -addpath('../../src/matlab_octave'); +addpath(genpath('../../src/matlab_octave')); k = 2; bvp = 3; diff --git a/examples/matlab_octave/sturmLiouvilleLaguerre.m b/examples/matlab_octave/sturmLiouvilleLaguerre.m index 095189257..d2f1e5eec 100755 --- a/examples/matlab_octave/sturmLiouvilleLaguerre.m +++ b/examples/matlab_octave/sturmLiouvilleLaguerre.m @@ -7,7 +7,7 @@ % close all; clc; -addpath('../../src/matlab_octave'); +addpath(genpath('../../src/matlab_octave')); k = 2; bvp = 5; diff --git a/examples/matlab_octave/sturmLiouvilleLegendre.m b/examples/matlab_octave/sturmLiouvilleLegendre.m index 48aa1283b..e9d4f55b9 100755 --- a/examples/matlab_octave/sturmLiouvilleLegendre.m +++ b/examples/matlab_octave/sturmLiouvilleLegendre.m @@ -7,7 +7,7 @@ % close all; clc; -addpath('../../src/matlab_octave'); +addpath(genpath('../../src/matlab_octave')); k = 2; bvp = 4; diff --git a/examples/matlab_octave/terzaghi1D.m b/examples/matlab_octave/terzaghi1D.m index 05e33347f..014a81e75 100644 --- a/examples/matlab_octave/terzaghi1D.m +++ b/examples/matlab_octave/terzaghi1D.m @@ -48,7 +48,7 @@ clc; close all; -addpath('../../src/matlab_octave'); % MOLE operator path +addpath(genpath('../../src/matlab_octave')); % MOLE operator path %% Parameters P0 = 10e6; % Face load in Pascals diff --git a/examples/matlab_octave/test_curl.m b/examples/matlab_octave/test_curl.m index aa3a013b0..584b13a91 100644 --- a/examples/matlab_octave/test_curl.m +++ b/examples/matlab_octave/test_curl.m @@ -12,7 +12,7 @@ close all clear -addpath('../../src/matlab_octave') +addpath(genpath('../../src/matlab_octave')) % This P and Q will produce a scalar curl = 2 P = @(~, Y) -Y; % U(x,y) = -y diff --git a/examples/matlab_octave/test_div2DCurv.m b/examples/matlab_octave/test_div2DCurv.m index 3ea388cd5..33165b26c 100644 --- a/examples/matlab_octave/test_div2DCurv.m +++ b/examples/matlab_octave/test_div2DCurv.m @@ -2,7 +2,7 @@ clc close all -addpath('../../src/matlab_octave') +addpath(genpath('../../src/matlab_octave')) % Parameters k = 2; diff --git a/examples/matlab_octave/test_div3DCurv.m b/examples/matlab_octave/test_div3DCurv.m index d09243d1b..84a7bf15f 100644 --- a/examples/matlab_octave/test_div3DCurv.m +++ b/examples/matlab_octave/test_div3DCurv.m @@ -3,7 +3,7 @@ close all clear all -addpath('../../src/matlab_octave') +addpath(genpath('../../src/matlab_octave')) % Parameters k = 2; % Order of accuracy diff --git a/examples/matlab_octave/test_grad2DCurv.m b/examples/matlab_octave/test_grad2DCurv.m index ffb071dc5..861d7cf79 100644 --- a/examples/matlab_octave/test_grad2DCurv.m +++ b/examples/matlab_octave/test_grad2DCurv.m @@ -1,7 +1,7 @@ clc close all -addpath('../../src/matlab_octave') +addpath(genpath('../../src/matlab_octave')) % Parameters k = 2; % Order of accuracy diff --git a/examples/matlab_octave/test_grad3DCurv.m b/examples/matlab_octave/test_grad3DCurv.m index cf38d9495..755050670 100644 --- a/examples/matlab_octave/test_grad3DCurv.m +++ b/examples/matlab_octave/test_grad3DCurv.m @@ -1,7 +1,7 @@ clc close all -addpath('../../src/matlab_octave') +addpath(genpath('../../src/matlab_octave')) % Parameters k = 2; % Order of accuracy diff --git a/examples/matlab_octave/test_lap3DCurv.m b/examples/matlab_octave/test_lap3DCurv.m index 4de8fa0f9..2e2f3a471 100644 --- a/examples/matlab_octave/test_lap3DCurv.m +++ b/examples/matlab_octave/test_lap3DCurv.m @@ -3,7 +3,7 @@ clc close all -addpath('../../src/matlab_octave') +addpath(genpath('../../src/matlab_octave')) % Parameters k = 2; % Order of accuracy diff --git a/examples/matlab_octave/test_lap3DCurv_case2.m b/examples/matlab_octave/test_lap3DCurv_case2.m index 5b8e3c948..20f7faf6e 100644 --- a/examples/matlab_octave/test_lap3DCurv_case2.m +++ b/examples/matlab_octave/test_lap3DCurv_case2.m @@ -3,7 +3,7 @@ clc close all -addpath('../../src/matlab_octave') +addpath(genpath('../../src/matlab_octave')) % Parameters k = 2; % Order of accuracy diff --git a/examples/matlab_octave/test_nodal2DCurv.m b/examples/matlab_octave/test_nodal2DCurv.m index 089122a30..dedb84e82 100644 --- a/examples/matlab_octave/test_nodal2DCurv.m +++ b/examples/matlab_octave/test_nodal2DCurv.m @@ -1,7 +1,7 @@ clc close all -addpath('../../src/matlab_octave') +addpath(genpath('../../src/matlab_octave')) % Parameters k = 2; diff --git a/examples/matlab_octave/tutorials/two_way_wave_equation/comparison_two_way_wave_md_vs_fd.m b/examples/matlab_octave/tutorials/two_way_wave_equation/comparison_two_way_wave_md_vs_fd.m index ef21cc207..2328fdab6 100644 --- a/examples/matlab_octave/tutorials/two_way_wave_equation/comparison_two_way_wave_md_vs_fd.m +++ b/examples/matlab_octave/tutorials/two_way_wave_equation/comparison_two_way_wave_md_vs_fd.m @@ -93,7 +93,7 @@ close all clear -addpath('../../../../src/matlab_octave'); +addpath(genpath('../../../../src/matlab_octave')); %% Problem definition - These values aremimicked in the FD and MD functions k = 2; % Mimetic Order of Accuracy, can change to 4,6,8 diff --git a/examples/matlab_octave/van_der_pol.m b/examples/matlab_octave/van_der_pol.m index 6ccdcb6b4..62f76b7c0 100644 --- a/examples/matlab_octave/van_der_pol.m +++ b/examples/matlab_octave/van_der_pol.m @@ -1,6 +1,6 @@ % Solves a second order ODE using our implementation of RK4 (src/matlab_octave/rk4.m) -addpath('../../src/matlab_octave') +addpath(genpath('../../src/matlab_octave')) % OCTAVE does not have VanDerPol equation, so here it is with Mu=1 vdpl = @(t,y) [y(2); (1 - y(1)^2) * y(2) - y(1)]; diff --git a/examples/matlab_octave/wave1D.m b/examples/matlab_octave/wave1D.m index 90839763d..b28065afb 100644 --- a/examples/matlab_octave/wave1D.m +++ b/examples/matlab_octave/wave1D.m @@ -3,7 +3,7 @@ clc close all -addpath('../../src/matlab_octave') +addpath(genpath('../../src/matlab_octave')) % Spatial discretization k = 2; % Order of accuracy (spatial) diff --git a/examples/matlab_octave/wave1DTimeVaryingBC.m b/examples/matlab_octave/wave1DTimeVaryingBC.m index 5497c8609..09d98e86d 100644 --- a/examples/matlab_octave/wave1DTimeVaryingBC.m +++ b/examples/matlab_octave/wave1DTimeVaryingBC.m @@ -16,7 +16,7 @@ % clear all; close all; clc -addpath('../../src/matlab_octave') +addpath(genpath('../../src/matlab_octave')) % some other parameters c = 2; diff --git a/examples/matlab_octave/wave1D_case2.m b/examples/matlab_octave/wave1D_case2.m index f2625754b..353767e80 100644 --- a/examples/matlab_octave/wave1D_case2.m +++ b/examples/matlab_octave/wave1D_case2.m @@ -3,7 +3,7 @@ clc close all -addpath('../../src/matlab_octave') +addpath(genpath('../../src/matlab_octave')) % Spatial discretization k = 4; % Order of accuracy (spatial) diff --git a/examples/matlab_octave/wave1D_convergence/wave1D_convergence.m b/examples/matlab_octave/wave1D_convergence/wave1D_convergence.m index 9481517b7..2974620bc 100644 --- a/examples/matlab_octave/wave1D_convergence/wave1D_convergence.m +++ b/examples/matlab_octave/wave1D_convergence/wave1D_convergence.m @@ -51,7 +51,7 @@ % ========================================================================= clear; clc; close all; -addpath('../../../src/matlab_octave'); +addpath(genpath('../../../src/matlab_octave')); fprintf('Running Comparative Convergence Test (Mimetic vs FD)\n'); fprintf('--------------------------------------------------\n'); diff --git a/examples/matlab_octave/wave2D.m b/examples/matlab_octave/wave2D.m index c525dd114..f5c0253ee 100644 --- a/examples/matlab_octave/wave2D.m +++ b/examples/matlab_octave/wave2D.m @@ -3,7 +3,7 @@ clc close all -addpath('../../src/matlab_octave') +addpath(genpath('../../src/matlab_octave')) % Spatial discretization k = 2; % Order of accuracy diff --git a/examples/matlab_octave/wave2D_case2.m b/examples/matlab_octave/wave2D_case2.m index 5c55feaa5..002fd5862 100644 --- a/examples/matlab_octave/wave2D_case2.m +++ b/examples/matlab_octave/wave2D_case2.m @@ -3,7 +3,7 @@ clc close all -addpath('../../src/matlab_octave') +addpath(genpath('../../src/matlab_octave')) % Spatial discretization k = 4; % Order of accuracy diff --git a/tests/matlab_octave/testAddScalarBC.m b/tests/matlab_octave/testAddScalarBC.m index fea76e268..e9de6d056 100644 --- a/tests/matlab_octave/testAddScalarBC.m +++ b/tests/matlab_octave/testAddScalarBC.m @@ -1,7 +1,7 @@ classdef testAddScalarBC < matlab.unittest.TestCase methods(Test) function testBC1D(testCase) - addpath('../../src/matlab_octave'); + addpath(genpath('../../src/matlab_octave')); k = 2; dx = 0.1; @@ -66,7 +66,7 @@ function testBC1D(testCase) end function testBC2D(testCase) - addpath('../../src/matlab_octave'); + addpath(genpath('../../src/matlab_octave')); k = 2; dx = 0.1; @@ -162,7 +162,7 @@ function testBC2D(testCase) end function testBC3D(testCase) - addpath('../../src/matlab_octave'); + addpath(genpath('../../src/matlab_octave')); k = 2; dx = 0.1; diff --git a/tests/matlab_octave/testBCConsistency.m b/tests/matlab_octave/testBCConsistency.m index faebc8eb0..93881d94f 100644 --- a/tests/matlab_octave/testBCConsistency.m +++ b/tests/matlab_octave/testBCConsistency.m @@ -2,7 +2,7 @@ methods(Test) function test1DCase(testCase) % 1D Boundary Conditions Consistency Test - addpath('../../src/matlab_octave'); + addpath(genpath('../../src/matlab_octave')); k = 4; % Order of accuracy m = 50; % Number of cells @@ -35,7 +35,7 @@ function test1DCase(testCase) function test2DCase(testCase) % 2D Boundary Conditions Consistency Test - addpath('../../src/matlab_octave'); + addpath(genpath('../../src/matlab_octave')); k = 4; % Order of accuracy m = 50; % Number of cells (x-direction) @@ -51,7 +51,7 @@ function test2DCase(testCase) function test3DCase(testCase) % 3D Boundary Conditions Consistency Test - addpath('../../src/matlab_octave'); + addpath(genpath('../../src/matlab_octave')); k = 4; % Order of accuracy m = 50; % Number of cells (x-direction) diff --git a/tests/matlab_octave/testDivPolynomial.m b/tests/matlab_octave/testDivPolynomial.m index d3668e46b..23f7a6417 100644 --- a/tests/matlab_octave/testDivPolynomial.m +++ b/tests/matlab_octave/testDivPolynomial.m @@ -1,7 +1,7 @@ classdef testDivPolynomial < matlab.unittest.TestCase methods (Test) function testDivOfPolynomial1D(testCase) - addpath('../../src/matlab_octave') + addpath(genpath('../../src/matlab_octave')) ks = [2, 4, 6, 8]; % Different orders of accuracy tol = 1e-11; @@ -29,7 +29,7 @@ function testDivOfPolynomial1D(testCase) end function testDivOfPolynomial2D(testCase) - addpath('../../src/matlab_octave') + addpath(genpath('../../src/matlab_octave')) ks = [2, 4, 6, 8]; % Different orders of accuracy tol = 1e-11; @@ -78,7 +78,7 @@ function testDivOfPolynomial2D(testCase) end function testDivOfPolynomial3D(testCase) - addpath('../../src/matlab_octave') + addpath(genpath('../../src/matlab_octave')) ks = [2, 4, 6, 8]; % Different orders of accuracy tol = 1e-11; diff --git a/tests/matlab_octave/testDivergence.m b/tests/matlab_octave/testDivergence.m index 2ac30a68f..d6c7b799a 100644 --- a/tests/matlab_octave/testDivergence.m +++ b/tests/matlab_octave/testDivergence.m @@ -1,7 +1,7 @@ classdef testDivergence < matlab.unittest.TestCase methods (Test) function testNullityOfDivergence(testCase) - addpath('../../src/matlab_octave') + addpath(genpath('../../src/matlab_octave')) ks = [2, 4, 6, 8]; % Different orders of accuracy tol = 1e-10; diff --git a/tests/matlab_octave/testEnergy.m b/tests/matlab_octave/testEnergy.m index 6455bc01e..d9c9e2ac4 100644 --- a/tests/matlab_octave/testEnergy.m +++ b/tests/matlab_octave/testEnergy.m @@ -1,7 +1,7 @@ classdef testEnergy < matlab.unittest.TestCase methods(Test) function testforEnergy(testCase) - addpath ('../../src/matlab_octave') + addpath(genpath('../../src/matlab_octave')) %parameteres k = 4; diff --git a/tests/matlab_octave/testGradPolynomial.m b/tests/matlab_octave/testGradPolynomial.m index 459601a13..ccfba5495 100644 --- a/tests/matlab_octave/testGradPolynomial.m +++ b/tests/matlab_octave/testGradPolynomial.m @@ -1,7 +1,7 @@ classdef testGradPolynomial < matlab.unittest.TestCase methods (Test) function testGradOfPolynomial1D(testCase) - addpath('../../src/matlab_octave') + addpath(genpath('../../src/matlab_octave')) ks = [2, 4, 6, 8]; % Different orders of accuracy tol = 1e-11; @@ -28,7 +28,7 @@ function testGradOfPolynomial1D(testCase) end function testGradOfPolynomial2D(testCase) - addpath('../../src/matlab_octave') + addpath(genpath('../../src/matlab_octave')) ks = [2, 4, 6, 8]; % Different orders of accuracy tol = 1e-11; @@ -76,7 +76,7 @@ function testGradOfPolynomial2D(testCase) end function testGradOfPolynomial3D(testCase) - addpath('../../src/matlab_octave') + addpath(genpath('../../src/matlab_octave')) ks = [2, 4, 6, 8]; % Different orders of accuracy tol = 1e-11; diff --git a/tests/matlab_octave/testGradient.m b/tests/matlab_octave/testGradient.m index 9cc966159..44763f714 100644 --- a/tests/matlab_octave/testGradient.m +++ b/tests/matlab_octave/testGradient.m @@ -1,7 +1,7 @@ classdef testGradient < matlab.unittest.TestCase methods(Test) function testNullityofGradient(testCase) - addpath ('../../src/matlab_octave') + addpath(genpath('../../src/matlab_octave')) ks=[2,4,6,8]; tol = 1e-10; diff --git a/tests/matlab_octave/testLapPolynomial.m b/tests/matlab_octave/testLapPolynomial.m index 140f17183..4b8c21080 100644 --- a/tests/matlab_octave/testLapPolynomial.m +++ b/tests/matlab_octave/testLapPolynomial.m @@ -1,7 +1,7 @@ classdef testLapPolynomial < matlab.unittest.TestCase methods (Test) function testLapOfPolynomial1D(testCase) - addpath('../../src/matlab_octave') + addpath(genpath('../../src/matlab_octave')) ks = [2, 4, 6, 8]; % Different orders of accuracy tol = 1e-10; @@ -28,7 +28,7 @@ function testLapOfPolynomial1D(testCase) end function testLapOfPolynomial2D(testCase) - addpath('../../src/matlab_octave') + addpath(genpath('../../src/matlab_octave')) ks = [2, 4, 6, 8]; % Different orders of accuracy tol = 1e-10; @@ -73,7 +73,7 @@ function testLapOfPolynomial2D(testCase) end function testLapOfPolynomial3D(testCase) - addpath('../../src/matlab_octave') + addpath(genpath('../../src/matlab_octave')) ks = [2, 4, 6, 8]; % Different orders of accuracy tol = 1e-10; diff --git a/tests/matlab_octave/testLaplacian.m b/tests/matlab_octave/testLaplacian.m index 08399964b..0058b9909 100644 --- a/tests/matlab_octave/testLaplacian.m +++ b/tests/matlab_octave/testLaplacian.m @@ -1,7 +1,7 @@ classdef testLaplacian < matlab.unittest.TestCase methods(Test) function testNullityofLaplacian(testCase) - addpath ('../../src/matlab_octave') + addpath(genpath('../../src/matlab_octave')) ks=[2,4,6,8]; tol = 1e-10; From 32bc91bcb81e52a36d279bb9e55226fd9ad3538d Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 2 Jul 2026 23:15:12 +0000 Subject: [PATCH 2/2] harden test path: capture and restore path with onCleanup in all test methods --- tests/matlab_octave/testAddScalarBC.m | 6 ++++++ tests/matlab_octave/testBCConsistency.m | 6 ++++++ tests/matlab_octave/testDivPolynomial.m | 6 ++++++ tests/matlab_octave/testDivergence.m | 2 ++ tests/matlab_octave/testEnergy.m | 2 ++ tests/matlab_octave/testGradPolynomial.m | 6 ++++++ tests/matlab_octave/testGradient.m | 2 ++ tests/matlab_octave/testLapPolynomial.m | 6 ++++++ tests/matlab_octave/testLaplacian.m | 2 ++ 9 files changed, 38 insertions(+) diff --git a/tests/matlab_octave/testAddScalarBC.m b/tests/matlab_octave/testAddScalarBC.m index e9de6d056..064a12380 100644 --- a/tests/matlab_octave/testAddScalarBC.m +++ b/tests/matlab_octave/testAddScalarBC.m @@ -1,6 +1,8 @@ classdef testAddScalarBC < matlab.unittest.TestCase methods(Test) function testBC1D(testCase) + origPath = path; + cleanupObj = onCleanup(@() path(origPath)); addpath(genpath('../../src/matlab_octave')); k = 2; @@ -66,6 +68,8 @@ function testBC1D(testCase) end function testBC2D(testCase) + origPath = path; + cleanupObj = onCleanup(@() path(origPath)); addpath(genpath('../../src/matlab_octave')); k = 2; @@ -162,6 +166,8 @@ function testBC2D(testCase) end function testBC3D(testCase) + origPath = path; + cleanupObj = onCleanup(@() path(origPath)); addpath(genpath('../../src/matlab_octave')); k = 2; diff --git a/tests/matlab_octave/testBCConsistency.m b/tests/matlab_octave/testBCConsistency.m index 93881d94f..0feaad84c 100644 --- a/tests/matlab_octave/testBCConsistency.m +++ b/tests/matlab_octave/testBCConsistency.m @@ -2,6 +2,8 @@ methods(Test) function test1DCase(testCase) % 1D Boundary Conditions Consistency Test + origPath = path; + cleanupObj = onCleanup(@() path(origPath)); addpath(genpath('../../src/matlab_octave')); k = 4; % Order of accuracy @@ -35,6 +37,8 @@ function test1DCase(testCase) function test2DCase(testCase) % 2D Boundary Conditions Consistency Test + origPath = path; + cleanupObj = onCleanup(@() path(origPath)); addpath(genpath('../../src/matlab_octave')); k = 4; % Order of accuracy @@ -51,6 +55,8 @@ function test2DCase(testCase) function test3DCase(testCase) % 3D Boundary Conditions Consistency Test + origPath = path; + cleanupObj = onCleanup(@() path(origPath)); addpath(genpath('../../src/matlab_octave')); k = 4; % Order of accuracy diff --git a/tests/matlab_octave/testDivPolynomial.m b/tests/matlab_octave/testDivPolynomial.m index 23f7a6417..d4acb20bc 100644 --- a/tests/matlab_octave/testDivPolynomial.m +++ b/tests/matlab_octave/testDivPolynomial.m @@ -1,6 +1,8 @@ classdef testDivPolynomial < matlab.unittest.TestCase methods (Test) function testDivOfPolynomial1D(testCase) + origPath = path; + cleanupObj = onCleanup(@() path(origPath)); addpath(genpath('../../src/matlab_octave')) ks = [2, 4, 6, 8]; % Different orders of accuracy @@ -29,6 +31,8 @@ function testDivOfPolynomial1D(testCase) end function testDivOfPolynomial2D(testCase) + origPath = path; + cleanupObj = onCleanup(@() path(origPath)); addpath(genpath('../../src/matlab_octave')) ks = [2, 4, 6, 8]; % Different orders of accuracy @@ -78,6 +82,8 @@ function testDivOfPolynomial2D(testCase) end function testDivOfPolynomial3D(testCase) + origPath = path; + cleanupObj = onCleanup(@() path(origPath)); addpath(genpath('../../src/matlab_octave')) ks = [2, 4, 6, 8]; % Different orders of accuracy diff --git a/tests/matlab_octave/testDivergence.m b/tests/matlab_octave/testDivergence.m index d6c7b799a..223300e07 100644 --- a/tests/matlab_octave/testDivergence.m +++ b/tests/matlab_octave/testDivergence.m @@ -1,6 +1,8 @@ classdef testDivergence < matlab.unittest.TestCase methods (Test) function testNullityOfDivergence(testCase) + origPath = path; + cleanupObj = onCleanup(@() path(origPath)); addpath(genpath('../../src/matlab_octave')) ks = [2, 4, 6, 8]; % Different orders of accuracy diff --git a/tests/matlab_octave/testEnergy.m b/tests/matlab_octave/testEnergy.m index d9c9e2ac4..5b4ae280d 100644 --- a/tests/matlab_octave/testEnergy.m +++ b/tests/matlab_octave/testEnergy.m @@ -1,6 +1,8 @@ classdef testEnergy < matlab.unittest.TestCase methods(Test) function testforEnergy(testCase) + origPath = path; + cleanupObj = onCleanup(@() path(origPath)); addpath(genpath('../../src/matlab_octave')) %parameteres diff --git a/tests/matlab_octave/testGradPolynomial.m b/tests/matlab_octave/testGradPolynomial.m index ccfba5495..b5100fbab 100644 --- a/tests/matlab_octave/testGradPolynomial.m +++ b/tests/matlab_octave/testGradPolynomial.m @@ -1,6 +1,8 @@ classdef testGradPolynomial < matlab.unittest.TestCase methods (Test) function testGradOfPolynomial1D(testCase) + origPath = path; + cleanupObj = onCleanup(@() path(origPath)); addpath(genpath('../../src/matlab_octave')) ks = [2, 4, 6, 8]; % Different orders of accuracy @@ -28,6 +30,8 @@ function testGradOfPolynomial1D(testCase) end function testGradOfPolynomial2D(testCase) + origPath = path; + cleanupObj = onCleanup(@() path(origPath)); addpath(genpath('../../src/matlab_octave')) ks = [2, 4, 6, 8]; % Different orders of accuracy @@ -76,6 +80,8 @@ function testGradOfPolynomial2D(testCase) end function testGradOfPolynomial3D(testCase) + origPath = path; + cleanupObj = onCleanup(@() path(origPath)); addpath(genpath('../../src/matlab_octave')) ks = [2, 4, 6, 8]; % Different orders of accuracy diff --git a/tests/matlab_octave/testGradient.m b/tests/matlab_octave/testGradient.m index 44763f714..3c18c5116 100644 --- a/tests/matlab_octave/testGradient.m +++ b/tests/matlab_octave/testGradient.m @@ -1,6 +1,8 @@ classdef testGradient < matlab.unittest.TestCase methods(Test) function testNullityofGradient(testCase) + origPath = path; + cleanupObj = onCleanup(@() path(origPath)); addpath(genpath('../../src/matlab_octave')) ks=[2,4,6,8]; diff --git a/tests/matlab_octave/testLapPolynomial.m b/tests/matlab_octave/testLapPolynomial.m index 4b8c21080..fc06c8d16 100644 --- a/tests/matlab_octave/testLapPolynomial.m +++ b/tests/matlab_octave/testLapPolynomial.m @@ -1,6 +1,8 @@ classdef testLapPolynomial < matlab.unittest.TestCase methods (Test) function testLapOfPolynomial1D(testCase) + origPath = path; + cleanupObj = onCleanup(@() path(origPath)); addpath(genpath('../../src/matlab_octave')) ks = [2, 4, 6, 8]; % Different orders of accuracy @@ -28,6 +30,8 @@ function testLapOfPolynomial1D(testCase) end function testLapOfPolynomial2D(testCase) + origPath = path; + cleanupObj = onCleanup(@() path(origPath)); addpath(genpath('../../src/matlab_octave')) ks = [2, 4, 6, 8]; % Different orders of accuracy @@ -73,6 +77,8 @@ function testLapOfPolynomial2D(testCase) end function testLapOfPolynomial3D(testCase) + origPath = path; + cleanupObj = onCleanup(@() path(origPath)); addpath(genpath('../../src/matlab_octave')) ks = [2, 4, 6, 8]; % Different orders of accuracy diff --git a/tests/matlab_octave/testLaplacian.m b/tests/matlab_octave/testLaplacian.m index 0058b9909..7c98eaff9 100644 --- a/tests/matlab_octave/testLaplacian.m +++ b/tests/matlab_octave/testLaplacian.m @@ -1,6 +1,8 @@ classdef testLaplacian < matlab.unittest.TestCase methods(Test) function testNullityofLaplacian(testCase) + origPath = path; + cleanupObj = onCleanup(@() path(origPath)); addpath(genpath('../../src/matlab_octave')) ks=[2,4,6,8];