/ concept-collection / windowedFourierProjection
Sign in
concept-collection / windowedFourierProjection
windowedFourierProjection / wfp_1Dspringscattering / get_experimentParameters.m
273 lines · 9.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,mu,dt0_min,uniform_beta,keepdt]...
5 =get_experimentParameters(expNum)
7switch expNum
8 case 1
10 % testing buttons
11 plotOpt = 0; % '1' to plot sol at final time, '2' heat maps
12 saveWorkspaceOpt = 0;
13 addErrResults = 0;
14 savePlot = 0;
15 logScale = 0; % '1' to use log scale in heat maps
16 printTimeStep = 0; % '1' to print out each time step
17 evalSol = 1;
19 % parameters
20 order = 2; % order of accuracy = interpolation
21 numResolutions = 3; % num of grid resolutions
22 solnType = 'ms'; % type of solution 'ms' or 'true'
24 tFinal = 3*pi; % final time
26 %%% Choose number of spatial and temporal set for solution computation
27 Nx = 10; % size of spatial grid for testing and plotting
28 Nt_sol = 10; % size of the time grid for testing and plotting
30 %%% sources
31 M = 2; % number of sources
32 maxNumNeighbors = NaN; % set max number of neighbors
33 src_dmn = [-1,1];
34 ds = 1e-4; % set min distance between sources
35 uniform_sgrid = 1;
37 %%% spring constants
38 betaMax = 3; uniform_beta = 1;
40 %%% incident pulse parameter
41 mu = 50;
42 keepdt = 1;
44 dt0_min = 0.1;
45 case 2
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;
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'
61 tFinal = 10*pi; % final time
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
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;
74 %%% spring constants
75 betaMax = 10; uniform_beta = 0;
77 %%% incident pulse parameter
78 mu = 30;
79 keepdt = 0;
81 dt0_min = 0.1;
83 case 3
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;
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'
99 tFinal = 3*pi; % final time
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
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;
112 %%% spring constants
113 betaMax = 3; uniform_beta = 0;
115 %%% incident pulse parameter
116 mu = M^2;
117 keepdt = 0;
119 dt0_min = 0.1;
120 case 4
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 = 0; % '1' to print out each time step
128 evalSol = 1;
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'
135 tFinal = 3*pi; % final time
137 %%% Choose number of spatial and temporal set for solution computation
138 Nx = 800; % size of spatial grid for testing and plotting
139 Nt_sol = 800; % size of the time grid for testing and plotting
141 %%% sources
142 M = 10000; % number of sources
143 maxNumNeighbors = 50; % set max number of neighbors
144 src_dmn = [-2,2];
145 ds = 1e-4; % set min distance between sources
146 uniform_sgrid = 0;
148 %%% spring constants
149 betaMax = 3; uniform_beta = 0;
151 %%% incident pulse parameter
152 mu = M^2;
153 keepdt = 0;
155 dt0_min = 0.1;
156 case 5 % FP
157 % testing buttons
158 plotOpt = 0; % '1' to plot sol at final time, '2' heat maps
159 saveWorkspaceOpt = 1;
160 addErrResults = 0;
161 savePlot = 0;
162 logScale = 0; % '1' to use log scale in heat maps
163 printTimeStep = 0; % '1' to print out each time step
164 evalSol = 1;
166 % parameters
167 order = 8; % order of accuracy = interpolation
168 numResolutions = 2; % num of grid resolutions
169 solnType = 'true'; % type of solution 'ms' or 'true'
171 tFinal = 30*pi; % final time
173 %%% Choose number of spatial and temporal set for solution computation
174 Nx = 400; % size of spatial grid for testing and plotting
175 Nt_sol = 500; % size of the time grid for testing and plotting
177 %%% sources
178 M = 2; % number of sources
179 maxNumNeighbors = 2; % set max number of neighbors
180 src_dmn = [-0.5,0.5];
181 ds = 1e-4; % set min distance between sources
182 uniform_sgrid = 1;
184 %%% spring constants
185 betaMax = 100; uniform_beta = 1;
187 %%% incident pulse parameter
188 mu = 5;
189 keepdt = 0;
191 dt0_min = 0.02; % RBC constraint
192 dt0_min = min(0.01,dt0_min); % stability constraint
194 case 6 % FP M = 10
195 % testing buttons
196 plotOpt = 0; % '1' to plot sol at final time, '2' heat maps
197 saveWorkspaceOpt = 0;
198 addErrResults = 0;
199 savePlot = 0;
200 logScale = 0; % '1' to use log scale in heat maps
201 printTimeStep = 1; % '1' to print out each time step
202 evalSol = 1;
204 % parameters
205 order = 8; % order of accuracy = interpolation
206 numResolutions = 3; % num of grid resolutions
207 solnType = 'true'; % type of solution 'ms' or 'true'
209 tFinal = 3*pi; % final time
211 %%% Choose number of spatial and temporal set for solution computation
212 Nx = 10; % size of spatial grid for testing and plotting
213 Nt_sol = 10; % size of the time grid for testing and plotting
215 %%% sources
216 M = 2; % number of sources
217 maxNumNeighbors = 10; % set max number of neighbors
218 src_dmn = [-2,2];
219 ds = 1e-4; % set min distance between sources
220 uniform_sgrid = 1;
222 %%% spring constants
223 betaMax = 100; uniform_beta = 1;
225 %%% incident pulse parameter
226 mu = 5;
227 keepdt = 0;
229 dt0_min = 0.02; % RBC constraint
230 dt0_min = min(0.001,dt0_min); % stability constraint
231 case 7 % FP M = 200
232 % testing buttons
233 plotOpt = 0; % '1' to plot sol at final time, '2' heat maps
234 saveWorkspaceOpt = 1;
235 addErrResults = 0;
236 savePlot = 0;
237 logScale = 0; % '1' to use log scale in heat maps
238 printTimeStep = 0; % '1' to print out each time step
239 evalSol = 1;
241 % parameters
242 order = 8; % order of accuracy = interpolation
243 numResolutions = 2; % num of grid resolutions
244 solnType = 'true'; % type of solution 'ms' or 'true'
246 tFinal = 40*pi; % final time
248 %%% Choose number of spatial and temporal set for solution computation
249 Nx = 800; % size of spatial grid for testing and plotting
250 Nt_sol = 800; % size of the time grid for testing and plotting
252 %%% sources
253 M = 200; % number of sources
254 maxNumNeighbors = 20; % set max number of neighbors
255 src_dmn = [-2,2];
256 ds = 1e-4; % set min distance between sources
257 uniform_sgrid = 1;
259 %%% spring constants
260 betaMax = 1; uniform_beta = 1;
262 %%% incident pulse parameter
263 mu = 5;
264 keepdt = 0;
266 dt0_min = 0.02; % RBC constraint
267 dt0_min = min(0.01,dt0_min); % stability constraint
268 otherwise
269 disp('experiment number inapplicable');
270end
272end
moveopenescclose