/ concept-collection / windowedFourierProjection
Sign in
concept-collection / windowedFourierProjection
windowedFourierProjection / wfp_1Dspringscattering / get_experimentParameters.m
311 lines · 11.2 KBBlameHistoryRaw
1function [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)
7dataParam = struct;
9switch expNum
10 case 1
11 % testing buttons
12 plotOpt = 0; % '1' to plot sol at final time, '2' heat maps
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
16 logScale = 0; % '1' to use log scale in heat maps
17 printTimeStep = 0; % '1' to print out each time step
18 evalSol = 1; % '1' to evaluate the solution
20 % parameters
21 order = 3; % order of accuracy = interpolation
22 numResolutions = 3; % num of grid resolutions
23 solnType = 'ms'; % type of solution 'ms' or 'true'
25 tFinal = 3*pi; % final time
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
31 %%% sources
32 M = 10; % number of sources
33 maxNumNeighbors = NaN; % set max number of neighbors
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
38 %%% spring constants
39 betaMax = 3; % maximum spring constant value
40 uniform_beta = 0; % '1' to generate uniform beta grid
42 %%% incident pulse parameter
43 keepdt = 0; % '1' to NOT fix dt based on the number of neighbors
45 dt0_min = 0.01; % RBC constraint
47 case 2 % localization plots
48 % testing buttons
49 plotOpt = 0; % '1' to plot sol at final time, '2' heat maps
50 saveWorkspaceOpt = 1;
51 addErrResults = 0;
52 savePlot = 0;
53 logScale = 0; % '1' to use log scale in heat maps
54 printTimeStep = 1; % '1' to print out each time step
55 evalSol = 1;
57 % parameters
58 order = 8; % order of accuracy = interpolation
59 numResolutions = 2; % num of grid resolutions
60 solnType = 'true'; % type of solution 'ms' or 'true'
62 tFinal = 10*pi; % final time
64 %%% Choose number of spatial and temporal set for solution computation
65 Nx = 400; % size of spatial grid for testing and plotting
66 Nt_sol = 400; % size of the time grid for testing and plotting
68 %%% sources
69 M = 150; % number of sources
70 maxNumNeighbors = 10; % set max number of neighbors
71 src_dmn = [-2,2];
72 ds = 1e-4; % set min distance between sources
73 uniform_sgrid = 0;
75 %%% spring constants
76 betaMax = 10; uniform_beta = 0;
78 %%% incident pulse parameter
79 dataParam.mu = 30; dataParam.t0 = -3;
80 keepdt = 0;
82 dt0_min = 0.1;
84 case 3 % M=1000, mu = M^2
86 % testing buttons
87 plotOpt = 0; % '1' to plot sol at final time, '2' heat maps
88 saveWorkspaceOpt = 1;
89 addErrResults = 0;
90 savePlot = 0;
91 logScale = 0; % '1' to use log scale in heat maps
92 printTimeStep = 1; % '1' to print out each time step
93 evalSol = 1;
95 % parameters
96 order = 8; % order of accuracy = interpolation
97 numResolutions = 2; % num of grid resolutions
98 solnType = 'true'; % type of solution 'ms' or 'true'
100 tFinal = 3*pi; % final time
102 %%% Choose number of spatial and temporal set for solution computation
103 Nx = 800; % size of spatial grid for testing and plotting
104 Nt_sol = 800; % size of the time grid for testing and plotting
106 %%% sources
107 M = 1000; % number of sources
108 maxNumNeighbors = 50; % set max number of neighbors
109 src_dmn = [-2,2];
110 ds = 1e-4; % set min distance between sources
111 uniform_sgrid = 0;
113 %%% spring constants
114 betaMax = 3; uniform_beta = 0;
116 %%% incident pulse parameter
117 dataParam.mu = M^2; dataParam.t0 = -3;
118 keepdt = 0;
120 dt0_min = 0.1;
121 case 4 % M=10000, mu = M^2
122 % testing buttons
123 plotOpt = 0; % '1' to plot sol at final time, '2' heat maps
124 saveWorkspaceOpt = 1;
125 addErrResults = 0;
126 savePlot = 0;
127 logScale = 0; % '1' to use log scale in heat maps
128 printTimeStep = 1; % '1' to print out each time step
129 evalSol = 1;
131 % parameters
132 order = 8; % order of accuracy = interpolation
133 numResolutions = 2; % num of grid resolutions
134 solnType = 'true'; % type of solution 'ms' or 'true'
136 tFinal = 3*pi; % final time
138 %%% Choose number of spatial and temporal set for solution computation
139 Nx = 400; % size of spatial grid for testing and plotting
140 Nt_sol = 800; % size of the time grid for testing and plotting
142 %%% sources
143 M = 10000; % number of sources
144 maxNumNeighbors = 500; % set max number of neighbors
145 src_dmn = [-2,2];
146 ds = 1e-4; % set min distance between sources
147 uniform_sgrid = 0;
149 %%% spring constants
150 betaMax = 3; uniform_beta = 0;
152 %%% incident pulse parameter
153 dataParam.mu = M^2; dataParam.t0 = -3;
154 dataParam.doubleTimeStep = 1;
155 keepdt = 0;
157 dt0_min = 0.1;
158 case 5 % FP
159 % testing buttons
160 plotOpt = 0; % '1' to plot sol at final time, '2' heat maps
161 saveWorkspaceOpt = 1;
162 addErrResults = 0;
163 savePlot = 0;
164 logScale = 0; % '1' to use log scale in heat maps
165 printTimeStep = 0; % '1' to print out each time step
166 evalSol = 1;
168 % parameters
169 order = 8; % order of accuracy = interpolation
170 numResolutions = 2; % num of grid resolutions
171 solnType = 'true'; % type of solution 'ms' or 'true'
173 tFinal = 30*pi; % final time
175 %%% Choose number of spatial and temporal set for solution computation
176 Nx = 400; % size of spatial grid for testing and plotting
177 Nt_sol = 500; % size of the time grid for testing and plotting
179 %%% sources
180 M = 2; % number of sources
181 maxNumNeighbors = 2; % set max number of neighbors
182 src_dmn = [-0.5,0.5];
183 ds = 1e-4; % set min distance between sources
184 uniform_sgrid = 1;
186 %%% spring constants
187 betaMax = 100; uniform_beta = 1;
189 %%% incident pulse parameter
190 dataParam.mu = 5; dataParam.t0 = -3;
191 keepdt = 0;
193 dt0_min = 0.02; % RBC constraint
194 dt0_min = min(0.01,dt0_min); % stability constraint
196 case 6 % FP M = 10
197 % testing buttons
198 plotOpt = 0; % '1' to plot sol at final time, '2' heat maps
199 saveWorkspaceOpt = 1;
200 addErrResults = 0;
201 savePlot = 0;
202 logScale = 0; % '1' to use log scale in heat maps
203 printTimeStep = 1; % '1' to print out each time step
204 evalSol = 1;
206 % parameters
207 order = 8; % order of accuracy = interpolation
208 numResolutions = 2; % num of grid resolutions
209 solnType = 'true'; % type of solution 'ms' or 'true'
211 tFinal = 40*pi; % final time
213 %%% Choose number of spatial and temporal set for solution computation
214 Nx = 800; % size of spatial grid for testing and plotting
215 Nt_sol = 800; % size of the time grid for testing and plotting
217 %%% sources
218 M = 10; % number of sources
219 maxNumNeighbors = 10; % set max number of neighbors
220 src_dmn = [-2,2];
221 ds = 1e-4; % set min distance between sources
222 uniform_sgrid = 1;
224 %%% spring constants
225 betaMax = 100; uniform_beta = 1;
227 %%% incident pulse parameter
228 dataParam.mu = 5; dataParam.t0 = -4;
229 keepdt = 0;
231 dt0_min = 0.02; % RBC constraint
232 dt0_min = min(0.005,dt0_min); % stability constraint
233 case 7 % FP M = 200
234 % testing buttons
235 plotOpt = 0; % '1' to plot sol at final time, '2' heat maps
236 saveWorkspaceOpt = 1;
237 addErrResults = 0;
238 savePlot = 0;
239 logScale = 0; % '1' to use log scale in heat maps
240 printTimeStep = 0; % '1' to print out each time step
241 evalSol = 1;
243 % parameters
244 order = 8; % order of accuracy = interpolation
245 numResolutions = 2; % num of grid resolutions
246 solnType = 'true'; % type of solution 'ms' or 'true'
248 tFinal = 40*pi; % final time
250 %%% Choose number of spatial and temporal set for solution computation
251 Nx = 800; % size of spatial grid for testing and plotting
252 Nt_sol = 800; % size of the time grid for testing and plotting
254 %%% sources
255 M = 200; % number of sources
256 maxNumNeighbors = 20; % set max number of neighbors
257 src_dmn = [-2,2];
258 ds = 1e-4; % set min distance between sources
259 uniform_sgrid = 1;
261 %%% spring constants
262 betaMax = 1; uniform_beta = 1;
264 %%% incident pulse parameter
265 dataParam.mu = 5; dataParam.t0 = -4;
266 keepdt = 0;
268 dt0_min = 0.02; % RBC constraint
269 dt0_min = min(0.005,dt0_min); % stability constraint
270 case 999
271 % testing buttons
272 plotOpt = 0; % '1' to plot sol at final time, '2' heat maps
273 saveWorkspaceOpt = 0;
274 addErrResults = 0;
275 savePlot = 0;
276 logScale = 0; % '1' to use log scale in heat maps
277 printTimeStep = 0; % '1' to print out each time step
278 evalSol = 1;
280 % parameters
281 order = 2; % order of accuracy = interpolation
282 numResolutions = 3; % num of grid resolutions
283 solnType = 'true'; % type of solution 'ms' or 'true'
285 tFinal = 3*pi; % final time
287 %%% Choose number of spatial and temporal set for solution computation
288 Nx = 5; % size of spatial grid for testing and plotting
289 Nt_sol = 5; % size of the time grid for testing and plotting
291 %%% sources
292 M = 10; % number of sources
293 maxNumNeighbors = NaN; % set max number of neighbors
294 src_dmn = [-2,2];
295 ds = 1e-4; % set min distance between sources
296 uniform_sgrid = 1;
298 %%% spring constants
299 betaMax = 3; uniform_beta = 1;
301 %%% incident pulse parameter
302 dataParam.mu = 30; dataParam.t0 = -3;
303 keepdt = 0;
305 dt0_min = 0.01; % RBC constraint
306 otherwise
307 disp('experiment number inapplicable');
308end
310end
moveopenescclose