Wave Propagation in Linear Media | re-examined
Wave Propagation in Linear Media | re-examined
Wave Propagation in Linear Media | re-examined
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
8 Application of the quadratu<strong>re</strong> rout<strong>in</strong>e<br />
Know<strong>in</strong>g that we will end up with a plethora of very similar functions, we establish a consistent<br />
nam<strong>in</strong>g convention to avoid confusion and to <strong>re</strong>duce the risk of programm<strong>in</strong>g errors. All<br />
function names a<strong>re</strong> thus composed of dist<strong>in</strong>ct elements to dist<strong>in</strong>guish them from each other.<br />
A seve<strong>re</strong> obstacle to the legibility of the names is the fact that Mathematica permits no<br />
undersco<strong>re</strong>s with<strong>in</strong> a function's name because the undersco<strong>re</strong> is <strong>re</strong>served to designate patterns.<br />
So we have no possibility toseparate the tokens that make up a function name as <strong>in</strong> other<br />
programm<strong>in</strong>g languages.<br />
We start with the de nition of a number of tokens, each of which describes a part of the<br />
purpose the function is <strong>in</strong>tended for.<br />
Form 2 fRect, Tria, Gaussg denotes the shape of the <strong>in</strong>itial wavepacket and applies<br />
to all waveform-dependent functions.<br />
Region 2fInc, Ref, Out, Trans, Evan, Tung dist<strong>in</strong>guishes the <strong>re</strong>gions a function may<br />
be applicable to. Some modules depend on the di<strong>re</strong>ction of the wave propagation or<br />
whether the evanescent or the transmitted part of the <strong>in</strong>tegral is <strong>re</strong>garded. Others<br />
simply a<strong>re</strong> di e<strong>re</strong>nt <strong>in</strong>side and outside the barrier.<br />
FunctionType 2 fConst, Shape, Oscg denotes constants, shap<strong>in</strong>g functions for the<br />
spectra of the waves, and the oscillatory factors of the <strong>in</strong>tegrands.<br />
Polarity 2 fNULL, Pos, Negg is used to dist<strong>in</strong>guish <strong>in</strong>tegrands de ned for either the<br />
positive or negative <strong>re</strong>al axis. The empty element NULL applies to all functions that<br />
need no dist<strong>in</strong>ction between the two cases.<br />
Gradient 2fNULL, Gradg signi es whether the function is used for the computation of<br />
the wave function or its gradient. In the latter case, the name <strong>in</strong>cludes the additional<br />
token Grad.<br />
These tokens a<strong>re</strong> used to compose the various function modules. Which tokens a<strong>re</strong> actually<br />
comb<strong>in</strong>ed and what values a<strong>re</strong> mean<strong>in</strong>gful depends on the class of modules under consideration.<br />
Region-dependent factors have the form kRegionjFunctionTypek. For example,<br />
RefCoeff is the coe cient function for the <strong>re</strong> ected wave, TunOsc means the oscillatory<br />
factor of the <strong>in</strong>tegrands <strong>in</strong> the tunnel.<br />
Integrands and waveform-dependent factors have the mo<strong>re</strong> complicated structu<strong>re</strong><br />
kFormjGradientjfFunctionType, RegiongjPolarityk. Examples a<strong>re</strong> GaussConst for a<br />
constant factor, RectShapeNeg for a factor of an <strong>in</strong>tegrand and nally TriaGradEvan<br />
or GaussRefNeg for the enti<strong>re</strong> <strong>in</strong>tegrands.<br />
Quadratu<strong>re</strong> templates a<strong>re</strong> rather heterogenous and have the nam<strong>in</strong>g structu<strong>re</strong> kfNULL,<br />
FormgjfEvan, TransgjfNULL, Exact, TruncgjTempk, as for <strong>in</strong>stance TriaTransExactTemp<br />
or GaussEvanTruncTemp. The elements Exact and Trunc <strong>re</strong>fer to alternative comput<strong>in</strong>g<br />
strategies for the non-Gaussian and Gaussian wave packets, <strong>re</strong>spectively.<br />
198