27.12.2012 Views

Wave Propagation in Linear Media | re-examined

Wave Propagation in Linear Media | re-examined

Wave Propagation in Linear Media | re-examined

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

7.3 Implementation of OscInt and <strong>re</strong>lated functions<br />

OscInt<br />

PartInt PartitionTable<br />

OscIntControlled<br />

PartitionPo<strong>in</strong>ts PartitionOffs<br />

Figu<strong>re</strong> 7.1: The package structu<strong>re</strong> of OscInt<br />

Auxiliary<br />

Functions<br />

PartitionOffs computes an <strong>in</strong>dex o set value for the list of partition po<strong>in</strong>ts. This<br />

o set is then used <strong>in</strong> PartitionPo<strong>in</strong>ts.<br />

PartitionPo<strong>in</strong>ts <strong>re</strong>turns a list of subdivision po<strong>in</strong>ts with given length and the possibility<br />

to specify a start<strong>in</strong>g <strong>in</strong>dex. The <strong>in</strong>dex o set obta<strong>in</strong>ed from PartitionOffs adjusts<br />

the number<strong>in</strong>g such that the po<strong>in</strong>t with <strong>in</strong>dex zero always is the lowest possible partition<br />

po<strong>in</strong>t, with both the lower <strong>in</strong>tegration limit a or a manually set rst partition po<strong>in</strong>t a0<br />

taken <strong>in</strong>to account. The<strong>re</strong>fo<strong>re</strong>, x (0) > maxfa; a0g or x0 > maxfa; a0g, depend<strong>in</strong>g on<br />

the function be<strong>in</strong>g used to compute the subdivision po<strong>in</strong>ts.<br />

The afo<strong>re</strong>mentioned functions a<strong>re</strong> also di<strong>re</strong>ctly accessible from outside the package. Their<br />

syntax and implementation details a<strong>re</strong> dealt with <strong>in</strong> the next section. Apart from these<br />

functions that constitute the build<strong>in</strong>g blocks for the quadratu<strong>re</strong> rout<strong>in</strong>e, a few auxiliary<br />

function a<strong>re</strong> also <strong>in</strong>cluded <strong>in</strong> the package. They have noth<strong>in</strong>g to do with the quadratu<strong>re</strong><br />

itself, but a<strong>re</strong> useful for several special applications. The names and dependencies of these<br />

functions a<strong>re</strong> summarised <strong>in</strong> g. 7.2.<br />

7.3 Implementation of OscInt and <strong>re</strong>lated functions<br />

This section discusses the submodules of the quadratu<strong>re</strong> rout<strong>in</strong>e and provides <strong>in</strong>formation on<br />

the actual implementation. However, as we only want to outl<strong>in</strong>e the pr<strong>in</strong>ciples of operation,<br />

we shall concentrate on the most important details and avoid bor<strong>in</strong>g source code list<strong>in</strong>gs.<br />

Also, we shall not concern ourselves with the formal way of de n<strong>in</strong>g a Mathematica package,<br />

as this is cove<strong>re</strong>d extensively <strong>in</strong> books like those by Wolfram [140] and Maeder [146] or <strong>in</strong><br />

tutorial works like the book by Shaw and Tigg [147].<br />

165

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!