- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
So I was playing with the structures program from '73 and I want to add an element to it -- a fair amount of searching showed me several algorithms for the element - which is actually quite tricky to code.
One suggestion from a friend was this code from a well known source, which is available in PDF files only - it looks ok so I scanned and then fixed the code -- it runs nicely - but I noticed that it has listed four coordinates for a shell - X, Y and Z vectors but is declared as X(3) etc. which is ok if you use a triangle but a rectangle is going to run out of memory spaces.
Easy fix as, but the interesting question is how much production code is based on this published code and I wonder if it was picked up -- the code I am referring to is well known in the field.
I saw some interesting code in a Journal article for doing co-ordinate transformations -- looked ok , so I downloaded the file, and got it running against a newer bit of code. It gave an answer which was the mirror image on plotting from the newer code. I tried them both on a problem with an obvious answer and the old code gives an answer that looks ok until you think about it - the newer code is more correct.
I wonder how much old code has such errors.
John
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Perhaps what you deem ‘an error’ may not be an error.
For example, the coordinate transformation code may have been done either in aeronautical coordinates (x forward, y to right, z pointed towards earth in direction of gravity) and/or something different than the current graphics screens (x up, y across, z out). Before saying a transformation program has an error try to determine what orientation it was transforming from and to what orientation was it transforming to?
Also realize older programs had expensive and limited memory so if they built in for an array of 3 then that was probably all that was needed.
Obviously with ANY code you use or reuse or re-purpose you need to check and double check for errors and/or limitations.
I think you will find older codes have very specific function and because of the expense of each compilation a lot more work and checking and testing went into the code BEFORE paying to compile it. Very efficient code back in the day! (and a lot of fun and creative tricks old school programmers used to get more memory capability and other things)
that's my 2 bit tip of the hat to older code!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I thought of that issue on the different systems - a simple fully symmetric model with obvious answers gave correct answers in the new model - but an interesting weirdly non- symmetric answer from the simple co-ordinate transformation - it was close and if you were not careful you would miss the errors - you are correct the code needs to be checked - it is probably a - or + sign in the wrong place.
In terms of the X(3) instead of X(4) -- this was picked up by the latest Intel compiler as mismatched arguments in a call -- Steve - back in the late 80's would a Fortran compiler picked up mismatched arguments?
John
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
John, few compilers of that vintage would notice a call mismatch.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page