On Sep 4, 2008, at 9/4 6:51 AM, Chuck Counselman wrote:
> I do not know of a Mac OS X version of NEC-4. However, an excellent
> version of NEC-2 is available for Mac OS X. It is cocoaNEC,
> available from
> <http://homepage.mac.com/chen/w7ay/cocoaNEC/index.html>.
NEC-4 now works with cocoaNEC.
Bill Myers had participated in those discussions with Chuck
Counselman and they had subsequently included me in their email
exchanges.
After seeing the differences between Chuck's NEC-4 results and
NEC-2's results, Bill and I both decided to buy NEC-4 which we then
attempted to interface directly to cocoaNEC.
Because of the export restrictions place on NEC-4, I could not embed
NEC-4 into the freely distributed cocoaNEC. The way cocoaNEC is made
to work with NEC-4 is that cocoaNEC places the card deck image in a
known location, cocoaNEC then fires off a Unix executable of NEC-4.
When NEC-4 is done, cocoaNEC then retrieves the output that has been
written by NEC-4 into another known location.
The procedures which Bill and I had come up with for patching and
building the Unix executables for NEC-4 on the Mac OS X using Gnu
FORTRAN are described here:
http://homepage.mac.com/chen/w7ay/cocoaNEC/Contents/NEC4.html
You can use the above procedures to build a NEC-4 executable for Mac
OS X even if you do not need cocoaNEC's front end or back end
facilities.
With regards to NEC-2, cocoaNEC uses Jeroen Vreeken's variant of
Neoklis Kyriazis' nec2c program. For those that are not familiar
with nec2c, it is a NEC-2 "port" that was rewritten for the C
language. It is not a f2c port but a human translation by Mr.
Kyriazis. Among other things, memory elements are dynamically
allocated; limitations of the number of segments need not be spelled
out at compile time. The Sommerfeld files are generated
automatically by nec2c, and cocoaNEC includes a built in cache for
the Sommerfeld parameters that is used from one run to the next if it
finds that the Sommerfeld parameters could be reused.
nec2c runs many times faster than my previous attempts to use f2c to
convert NEC-2 into the C language.
Jeroen Vreeken's nec2c.rxq is a quad precision (128 bit floating
point) version of nec2c, together with some other changes. Both
nec2c and nec2c.rxq are stand-alone programs.
To use with cocoaNEC, I had converted nec2c.rxq into a Mac OS X
dynamic library. I had further made modifications to it so that it
can also run as double precision (64 bit floating point). Two copies
of this nec2c library are embedded into cocoaNEC, one for double
precision (more than sufficiently accurate to run most amateur
models) and one for quad precision. You can dynamically switch
between double and quad precision without leaving cocoaNEC.
Regards,
Kok Chen
-- The NEC-List mailing list NEC-List_at_robomod.net http://www.robomod.net/mailman/listinfo/nec-listReceived on Thu Sep 04 2008 - 17:01:26 EDT
This archive was generated by hypermail 2.2.0 : Sat Oct 02 2010 - 00:10:46 EDT