20.07.2015 Views

PhD Thesis - staffweb - University of Greenwich

PhD Thesis - staffweb - University of Greenwich

PhD Thesis - staffweb - University of Greenwich

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>PhD</strong> <strong>Thesis</strong> by John Ewer.considering a whole history <strong>of</strong> monitoring data and solution states. This consideration may alsobe <strong>of</strong> relevance to the purpose behind a particular simulation and the form that the results willtake. This is particularly important for transient simulations where the interest in not so muchin any final solution state or data but is rather in the critical phases and changes that occur duringthe full simulation. With reference to using fire modelling for assessing safety <strong>of</strong> the builtenvironment, it is insufficient to merely say that at the end <strong>of</strong> the simulation conditions in a roomfire were non-survivable when it would be <strong>of</strong> more use to determine the first time at which theroom fire became truly dangerous.4.3.7 Debugging facilitiesSince the code is intended to be used for algorithm development it was considered vital toprovide comprehensive debugging facilities. It is not sufficient to rely solely on compilerprovided debugging because the variability <strong>of</strong> such debuggers is very large and the navigation<strong>of</strong> complex data structures can be problematic and time consuming. In the prototype system twoseparate debugging facilities have been provided. The first allows any stored variable to beoutput in human readable form just after it has been calculated. This output can be limited to aparticular simulation time and range <strong>of</strong> cells. The second facility allows specific data monitoringcode to be planted in the data access functions. This allows the values <strong>of</strong> any data item to bemonitored throughout the simulation whenever data is accessed. Of course these techniques donot prevent a developer from using compiler debugging techniques but do provide additionaltools to track down hard to find errors that are a quite common occurrence when developingnew algorithms.4.3.8 Automatic self extending arraysSometimes it would be inefficient, in terms <strong>of</strong> memory usage, to allocate arrays to the maximumanticipated size when such arrays may only infrequently use their full extent. Conversely if thelength <strong>of</strong> an array is likely to change quite <strong>of</strong>ten then re-allocation is likely to be inefficient interms <strong>of</strong> performance because <strong>of</strong> the book-keeping involved with creating a larger array andmoving the existing elements across to it, followed by destruction <strong>of</strong> the old array space. There4-81

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

Saved successfully!

Ooh no, something went wrong!