/ concept-collection / windowedFourierProjection
Sign in
concept-collection / windowedFourierProjection
windowedFourierProjection / wfp_1Dspringscattering / get_uIncidentInfo.m
28 lines · 858 BBlameHistoryRaw
1function [h0,dataParam] = get_uIncidentInfo(mu)
2% GET_UINCIDENTINFO prepares information needed for an incident wave of the
3% form uin = exp(-mu*(x - t - t0).^2);
4%
5% INPUT:
6% tFinal: final time
7% tol: error tolerance for the full problem (to compute starting dt)
8% gam: pad gam*Nyquist for window function (to compute starting dt)
9%
10% OUTPUT:
11% mu,t0 as indicated above
12% Nt0: number of initial time steps to resolve incident pulse
13% h0: minimum step size to resolve incident pulse
14% dataParam: is struct to hold mu and t0 (for ease of switching between
15% types of test solutions
17t0 = -3;
19% Choose h0 such that the densities are resolved
20N0 = 30; % number of grid points per standard deviation (sd)
21bumpWidth = sqrt(log(1/eps)./mu);
22h0_vec = bumpWidth./N0;
23h0 = min(h0_vec);
25dataParam.mu = mu;
26dataParam.t0 = t0;
28end
moveopenescclose