added some comments to the get_experimentParameters file
3 changed files+13−322
.DS_Storemodified+0−0View file
Binary file not shown.
wfp_1Dspringscattering/get_experimentParameters.asvdeleted+0−310View file
@@ -1,310 +0,0 @@
1-function [plotOpt,saveWorkspaceOpt,addErrResults,savePlot,...
2- logScale,printTimeStep,evalSol,order,numResolutions,solnType,tFinal,...
3- Nx,Nt_sol,M,maxNumNeighbors,src_dmn,ds,...
4- uniform_sgrid,betaMax,dataParam,dt0_min,uniform_beta,keepdt]...
5- =get_experimentParameters(expNum)
6-
7-dataParam = struct;
8-
9-switch expNum
10- case 1
11- % testing buttons
12- plotOpt = 0; % '1' to plot sol at final time, '2' heat maps
13- saveWorkspaceOpt = 0;
14- addErrResults = 0;
15- savePlot = 0;
16- logScale = 0; % '1' to use log scale in heat maps
17- printTimeStep = 0; % '1' to print out each time step
18- evalSol = 1;
19-
20- % parameters
21- order = 2; % order of accuracy = interpolation
22- numResolutions = 1; % num of grid resolutions
23- solnType = 'ms'; % type of solution 'ms' or 'true'
24-
25- tFinal = 3*pi; % final time
26-
27- %%% Choose number of spatial and temporal set for solution computation
28- Nx = 5; % size of spatial grid for testing and plotting
29- Nt_sol = 5; % size of the time grid for testing and plotting
30-
31- %%% sources
32- M = 10; % number of sources
33- maxNumNeighbors = NaN; % set max number of neighbors
34- src_dmn = [-2,2];
35- ds = 1e-4; % set min distance between sources
36- uniform_sgrid = 1;
37-
38- %%% spring constants
39- betaMax = 3; uniform_beta = 1;
40-
41- %%% incident pulse parameter
42- keepdt = 0;
43-
44- dt0_min = 0.01; % RBC constraint
45-
46- case 2 % localization plots
47- % testing buttons
48- plotOpt = 0; % '1' to plot sol at final time, '2' heat maps
49- saveWorkspaceOpt = 1;
50- addErrResults = 0;
51- savePlot = 0;
52- logScale = 0; % '1' to use log scale in heat maps
53- printTimeStep = 1; % '1' to print out each time step
54- evalSol = 1;
55-
56- % parameters
57- order = 8; % order of accuracy = interpolation
58- numResolutions = 2; % num of grid resolutions
59- solnType = 'true'; % type of solution 'ms' or 'true'
60-
61- tFinal = 10*pi; % final time
62-
63- %%% Choose number of spatial and temporal set for solution computation
64- Nx = 400; % size of spatial grid for testing and plotting
65- Nt_sol = 400; % size of the time grid for testing and plotting
66-
67- %%% sources
68- M = 150; % number of sources
69- maxNumNeighbors = 10; % set max number of neighbors
70- src_dmn = [-2,2];
71- ds = 1e-4; % set min distance between sources
72- uniform_sgrid = 0;
73-
74- %%% spring constants
75- betaMax = 10; uniform_beta = 0;
76-
77- %%% incident pulse parameter
78- dataParam.mu = 30; dataParam.t0 = -3;
79- keepdt = 0;
80-
81- dt0_min = 0.1;
82-
83- case 3 % M=1000, mu = M^2
84-
85- % testing buttons
86- plotOpt = 0; % '1' to plot sol at final time, '2' heat maps
87- saveWorkspaceOpt = 1;
88- addErrResults = 0;
89- savePlot = 0;
90- logScale = 0; % '1' to use log scale in heat maps
91- printTimeStep = 1; % '1' to print out each time step
92- evalSol = 1;
93-
94- % parameters
95- order = 8; % order of accuracy = interpolation
96- numResolutions = 2; % num of grid resolutions
97- solnType = 'true'; % type of solution 'ms' or 'true'
98-
99- tFinal = 3*pi; % final time
100-
101- %%% Choose number of spatial and temporal set for solution computation
102- Nx = 800; % size of spatial grid for testing and plotting
103- Nt_sol = 800; % size of the time grid for testing and plotting
104-
105- %%% sources
106- M = 1000; % number of sources
107- maxNumNeighbors = 50; % set max number of neighbors
108- src_dmn = [-2,2];
109- ds = 1e-4; % set min distance between sources
110- uniform_sgrid = 0;
111-
112- %%% spring constants
113- betaMax = 3; uniform_beta = 0;
114-
115- %%% incident pulse parameter
116- dataParam.mu = M^2; dataParam.t0 = -3;
117- keepdt = 0;
118-
119- dt0_min = 0.1;
120- case 4 % M=10000, mu = M^2
121- % testing buttons
122- plotOpt = 0; % '1' to plot sol at final time, '2' heat maps
123- saveWorkspaceOpt = 1;
124- addErrResults = 0;
125- savePlot = 0;
126- logScale = 0; % '1' to use log scale in heat maps
127- printTimeStep = 1; % '1' to print out each time step
128- evalSol = 1;
129-
130- % parameters
131- order = 8; % order of accuracy = interpolation
132- numResolutions = 2; % num of grid resolutions
133- solnType = 'true'; % type of solution 'ms' or 'true'
134-
135- tFinal = 3*pi; % final time
136-
137- %%% Choose number of spatial and temporal set for solution computation
138- Nx = 400; % size of spatial grid for testing and plotting
139- Nt_sol = 800; % size of the time grid for testing and plotting
140-
141- %%% sources
142- M = 10000; % number of sources
143- maxNumNeighbors = 500; % set max number of neighbors
144- src_dmn = [-2,2];
145- ds = 1e-4; % set min distance between sources
146- uniform_sgrid = 0;
147-
148- %%% spring constants
149- betaMax = 3; uniform_beta = 0;
150-
151- %%% incident pulse parameter
152- dataParam.mu = M^2; dataParam.t0 = -3;
153- dataParam.doubleTimeStep = 1;
154- keepdt = 0;
155-
156- dt0_min = 0.1;
157- case 5 % FP
158- % testing buttons
159- plotOpt = 0; % '1' to plot sol at final time, '2' heat maps
160- saveWorkspaceOpt = 1;
161- addErrResults = 0;
162- savePlot = 0;
163- logScale = 0; % '1' to use log scale in heat maps
164- printTimeStep = 0; % '1' to print out each time step
165- evalSol = 1;
166-
167- % parameters
168- order = 8; % order of accuracy = interpolation
169- numResolutions = 2; % num of grid resolutions
170- solnType = 'true'; % type of solution 'ms' or 'true'
171-
172- tFinal = 30*pi; % final time
173-
174- %%% Choose number of spatial and temporal set for solution computation
175- Nx = 400; % size of spatial grid for testing and plotting
176- Nt_sol = 500; % size of the time grid for testing and plotting
177-
178- %%% sources
179- M = 2; % number of sources
180- maxNumNeighbors = 2; % set max number of neighbors
181- src_dmn = [-0.5,0.5];
182- ds = 1e-4; % set min distance between sources
183- uniform_sgrid = 1;
184-
185- %%% spring constants
186- betaMax = 100; uniform_beta = 1;
187-
188- %%% incident pulse parameter
189- dataParam.mu = 5; dataParam.t0 = -3;
190- keepdt = 0;
191-
192- dt0_min = 0.02; % RBC constraint
193- dt0_min = min(0.01,dt0_min); % stability constraint
194-
195- case 6 % FP M = 10
196- % testing buttons
197- plotOpt = 0; % '1' to plot sol at final time, '2' heat maps
198- saveWorkspaceOpt = 1;
199- addErrResults = 0;
200- savePlot = 0;
201- logScale = 0; % '1' to use log scale in heat maps
202- printTimeStep = 1; % '1' to print out each time step
203- evalSol = 1;
204-
205- % parameters
206- order = 8; % order of accuracy = interpolation
207- numResolutions = 2; % num of grid resolutions
208- solnType = 'true'; % type of solution 'ms' or 'true'
209-
210- tFinal = 40*pi; % final time
211-
212- %%% Choose number of spatial and temporal set for solution computation
213- Nx = 800; % size of spatial grid for testing and plotting
214- Nt_sol = 800; % size of the time grid for testing and plotting
215-
216- %%% sources
217- M = 10; % number of sources
218- maxNumNeighbors = 10; % set max number of neighbors
219- src_dmn = [-2,2];
220- ds = 1e-4; % set min distance between sources
221- uniform_sgrid = 1;
222-
223- %%% spring constants
224- betaMax = 100; uniform_beta = 1;
225-
226- %%% incident pulse parameter
227- dataParam.mu = 5; dataParam.t0 = -4;
228- keepdt = 0;
229-
230- dt0_min = 0.02; % RBC constraint
231- dt0_min = min(0.005,dt0_min); % stability constraint
232- case 7 % FP M = 200
233- % testing buttons
234- plotOpt = 0; % '1' to plot sol at final time, '2' heat maps
235- saveWorkspaceOpt = 1;
236- addErrResults = 0;
237- savePlot = 0;
238- logScale = 0; % '1' to use log scale in heat maps
239- printTimeStep = 0; % '1' to print out each time step
240- evalSol = 1;
241-
242- % parameters
243- order = 8; % order of accuracy = interpolation
244- numResolutions = 2; % num of grid resolutions
245- solnType = 'true'; % type of solution 'ms' or 'true'
246-
247- tFinal = 40*pi; % final time
248-
249- %%% Choose number of spatial and temporal set for solution computation
250- Nx = 800; % size of spatial grid for testing and plotting
251- Nt_sol = 800; % size of the time grid for testing and plotting
252-
253- %%% sources
254- M = 200; % number of sources
255- maxNumNeighbors = 20; % set max number of neighbors
256- src_dmn = [-2,2];
257- ds = 1e-4; % set min distance between sources
258- uniform_sgrid = 1;
259-
260- %%% spring constants
261- betaMax = 1; uniform_beta = 1;
262-
263- %%% incident pulse parameter
264- dataParam.mu = 5; dataParam.t0 = -4;
265- keepdt = 0;
266-
267- dt0_min = 0.02; % RBC constraint
268- dt0_min = min(0.005,dt0_min); % stability constraint
269- case 999
270- % testing buttons
271- plotOpt = 0; % '1' to plot sol at final time, '2' heat maps
272- saveWorkspaceOpt = 0;
273- addErrResults = 0;
274- savePlot = 0;
275- logScale = 0; % '1' to use log scale in heat maps
276- printTimeStep = 0; % '1' to print out each time step
277- evalSol = 1;
278-
279- % parameters
280- order = 2; % order of accuracy = interpolation
281- numResolutions = 3; % num of grid resolutions
282- solnType = 'true'; % type of solution 'ms' or 'true'
283-
284- tFinal = 3*pi; % final time
285-
286- %%% Choose number of spatial and temporal set for solution computation
287- Nx = 5; % size of spatial grid for testing and plotting
288- Nt_sol = 5; % size of the time grid for testing and plotting
289-
290- %%% sources
291- M = 10; % number of sources
292- maxNumNeighbors = NaN; % set max number of neighbors
293- src_dmn = [-2,2];
294- ds = 1e-4; % set min distance between sources
295- uniform_sgrid = 1;
296-
297- %%% spring constants
298- betaMax = 3; uniform_beta = 1;
299-
300- %%% incident pulse parameter
301- dataParam.mu = 30; dataParam.t0 = -3;
302- keepdt = 0;
303-
304- dt0_min = 0.01; % RBC constraint
305- otherwise
306- disp('experiment number inapplicable');
307-end
308-
309-end
310-
wfp_1Dspringscattering/get_experimentParameters.mmodified+13−12View file
@@ -10,12 +10,12 @@ switch expNum
1010 case 1
1111 % testing buttons
1212 plotOpt = 0; % '1' to plot sol at final time, '2' heat maps
13- saveWorkspaceOpt = 0;
14- addErrResults = 0;
15- savePlot = 0;
13+ saveWorkspaceOpt = 0; % '1' to save the workspace
14+ addErrResults = 0; % '1' to add error results to saved workspace
15+ savePlot = 0; % '1' to save any plots to fig files
1616 logScale = 0; % '1' to use log scale in heat maps
17- printTimeStep = 0; % '1' to print out each time step
18- evalSol = 1;
17+ printTimeStep = 0; % '1' to print out each time step
18+ evalSol = 1; % '1' to evaluate the solution
1919
2020 % parameters
2121 order = 3; % order of accuracy = interpolation
@@ -29,19 +29,20 @@ switch expNum
2929 Nt_sol = 5; % size of the time grid for testing and plotting
3030
3131 %%% sources
32- M = 10; % number of sources
32+ M = 10; % number of sources
3333 maxNumNeighbors = NaN; % set max number of neighbors
34- src_dmn = [-2,2];
35- ds = 1e-4; % set min distance between sources
36- uniform_sgrid = 0;
34+ src_dmn = [-2,2]; % domain where sources live
35+ ds = 1e-4; % set min distance between sources
36+ uniform_sgrid = 0; % '1' to generate uniform source grid
3737
3838 %%% spring constants
39- betaMax = 3; uniform_beta = 0;
39+ betaMax = 3; % maximum spring constant value
40+ uniform_beta = 0; % '1' to generate uniform beta grid
4041
4142 %%% incident pulse parameter
42- keepdt = 0;
43+ keepdt = 0; % '1' to NOT fix dt based on the number of neighbors
4344
44- dt0_min = 0.01; % RBC constraint
45+ dt0_min = 0.01; % RBC constraint
4546
4647 case 2 % localization plots
4748 % testing buttons