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

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

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

<strong>PhD</strong> <strong>Thesis</strong> by John Ewer.This corresponds to the diagram (See Figure 3.7.7-2) <strong>of</strong> the equivalent C++ classes. Some <strong>of</strong>the arrays in the legacy CFD code (See Figure 3.7.7-1) contain actual data values (e.g. P,OLDP, AREA and XYZCRD) whilst others contain index values (e.g. CELFAC and FACPTS)that are used to reference data items in other arrays. It should be noted, at this point, that thelinks between the identified class objects could have been implemented using pointers and arrays<strong>of</strong> pointers instead <strong>of</strong> integer indices and arrays <strong>of</strong> indices. The major problem with usingpointers extensively is that this would necessarily introduce pointer de-referencing to accessvalues. This would almost certainly be unfamiliar to many numerical CFD developers. It wasdecided that the object links be implemented in a form not too dissimilar from the legacy code.Whilst this was <strong>of</strong>ten less elegant, than some other techniques, it did have the benefits <strong>of</strong>consistency and ease <strong>of</strong> implementation.Cell PropertiesPPoint PropertiesOLDPLASTPxyz12nCELFACXYZCRDIndex linksFace Properties123nFACPTSAREASKINFRFIGURE 3.7.7-1 : Legacy FORTRAN data storage in simple arrays.There was a potential problem for the storage <strong>of</strong> cell properties because <strong>of</strong> the need to maintainup to four different historical versions <strong>of</strong> some variables. For example a transient flow simulationneeds old time-step, last sweep, previous inner iteration and newest values <strong>of</strong> pressure and3-62

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

Saved successfully!

Ooh no, something went wrong!