Remember Me?
Menu
Home
Search
Today's Posts
Home
Search
Today's Posts
RadioBanter
»
rec.radio.amateur
»
Antenna
>
NEC2 translation to C
Reply
LinkBack
Thread Tools
Search this Thread
Display Modes
#
1
February 5th 04, 11:58 AM
Maurizio
Posts: n/a
(Neoklis) wrote in message . com...
Robert Spooner wrote in message ...
I looked at the URL, and you've done a lot of work to update the code.
That is commendable, and you deserve thanks from the amateur community.
You certainly have my thanks. I'm curious to know how much regression
testing you've done.
Hi Bob,
Thanks for the nice words. I tested the translation as much as I could
by comparing my version of program flow with the original source. It was
possible this way to spot a lot of bugs, most of them related to
"off-by-one" errors since fortran uses indices from 1 - n while C from
0 - (n-1). Also untangling GOTO's required a lot of changes mainly in
"spaghetti" sections and these were also prone to errors.
Eventually I debugged the code as far as was possible by constructing
input files that would hopefully put NEC2 through all possible paths
(there are about 1275 if conditionals and about 450 do/while loops!)
and comparing the output with the original fortran code. I then tried
a large number of input files found on the internet and compared outputs.
I had very good agreement in all my tests but I am sure that some
combination in an input file will trigger off hidden bugs.
73's "Nick" 5B4AZ
Hi Nick,
you have made most of the work made by a New Zeland company that is
selling Supernec.
For all using Matlab, as me, your work is very interesting since doing
some work it is possible to use the highly optimized Matlab routines
to make the hard matrix work of the program. Furthermore, it is also
possible to use the visualization capabilities of the same program to
see the results (or the inputs).
Matlab code can be compiled with other C or even Fortran codes.
Thanks then!
Reply With Quote
#
2
February 5th 04, 05:38 PM
Neoklis
Posts: n/a
(Maurizio) wrote in message . com...
Hi Nick,
you have made most of the work made by a New Zeland company that is
selling Supernec.
Selling! Sounds nice ;-)
For all using Matlab, as me, your work is very interesting since doing
some work it is possible to use the highly optimized Matlab routines
to make the hard matrix work of the program. Furthermore, it is also
possible to use the visualization capabilities of the same program to
see the results (or the inputs).
Must confess my math/science is old and rusty - I am 55 years old and
retired early, did some fortran & algol programming around 1970 when I
was a student and taught myself Linux/C later 90's while waiting for
retirement. I don't think I remember enough on matrix math and don't
know Matlab at all to do this myself. I hope my translation is clear
enough for others to contribute more advanced features!
Regards
"Nick" 5B4AZ
Reply With Quote
Reply
Thread Tools
Search this Thread
Show Printable Version
Search this Thread
:
Advanced Search
Display Modes
Switch to Linear Mode
Hybrid Mode
Switch to Threaded Mode
Posting Rules
Smilies
are
On
[IMG]
code is
On
HTML code is
Off
Trackbacks
are
On
Pingbacks
are
On
Refbacks
are
On
Similar Threads
Thread
Thread Starter
Forum
Replies
Last Post
Porting NEC2 Fortran->C, need help
Neoklis
Antenna
0
September 26th 03
05:31 PM
Porting NEC2 Fortran->C, need help
Neoklis
Antenna
0
September 26th 03
12:20 PM
All times are GMT +1. The time now is
07:51 PM
.
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 RadioBanter.
The comments are property of their posters.
Contact Us
RadioBanter forum home
Privacy Statement
Copyright © 2017
LinkBack
LinkBack URL
About LinkBacks