--- necpp-1.5.0+cvs20101003.orig/nec2diff.1 +++ necpp-1.5.0+cvs20101003/nec2diff.1 @@ -0,0 +1,18 @@ +.TH nec2diff 1 "Nov 3, 2009" "NEC++" + +.SH NAME +nec2diff \- NEC2 (Numerical Electromagnetics Code) is software for modelling +antennas using the Method of Moments. + +.SH SYNOPSIS +.B nec2diff + +.SH DESCRIPTION +.B nec2diff +evaluates differences between 2 result files given as parameters. + +.SH AUTHOR +The C++ port started and completed by Tim Molteno +The Python work is done by Remi Sassolas +This work could not have been done without the tremendous effort put into the C +port by Neoklis Kyriazis. --- necpp-1.5.0+cvs20101003.orig/nec2++.1 +++ necpp-1.5.0+cvs20101003/nec2++.1 @@ -0,0 +1,45 @@ +.TH nec2++ 1 "Nov 3, 2009" "NEC++" + +.SH NAME +nec2++ \- NEC2 (Numerical Electromagnetics Code) is software for modelling +antennas using the Method of Moments. + +.SH SYNOPSIS +.B nec2++ +.br + +.SH DESCRIPTION +.B nec2++ +performs antennas modelling using the Method of Moments. + +.SH OPTIONS +.B +.IP -i +Set the input file-name instead of standard input +.B +.IP -o] +Set the output file-name instead of standard output +.B +.IP -g +Print maximum gain to stdout. +.B +.IP -b +Perform NEC++ Benchmark. +.B +.IP -s +Print results to standard output. +.B +.IP -c +Print results in comma-separated-value (CSV) format, this options is used in conjunction with (-s) above. +.B +.IP -h +Print this usage information and exit. +.B +.IP -v +Print nec2++ version number and exit. + +.SH AUTHOR +The C++ port started and completed by Tim Molteno +The Python work is done by Remi Sassolas +This work could not have been done without the tremendous effort put into the C +port by Neoklis Kyriazis. --- necpp-1.5.0+cvs20101003.orig/example/test_cpp.cpp +++ necpp-1.5.0+cvs20101003/example/test_cpp.cpp @@ -23,6 +23,10 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + + +#include "config.h" +#include "electromag.h" #include "c_geometry.h" #include "nec_context.h" #include "nec_exception.h" @@ -36,7 +40,8 @@ << "Nec2++ C++ example. Running (takes a few minutes...)" << endl; nec_context nec; - nec.set_results_stdout(false); + /* nec.set_results_stdout(false); */ + nec.set_results_format(RESULT_FORMAT_NEC); nec.initialize(); /* --- necpp-1.5.0+cvs20101003.orig/example/makefile +++ necpp-1.5.0+cvs20101003/example/makefile @@ -40,14 +40,14 @@ ../src/c_evlcom.cpp ../src/c_plot_card.cpp ../src/misc.cpp \ ../src/nec_context.cpp ../src/nec_output.cpp ../src/c_geometry.cpp \ ../src/nec_exception.cpp ../src/nec_radiation_pattern.cpp \ - ../src/nec_structure_currents.cpp + ../src/nec_structure_currents.cpp ../src/electromag.cpp NECPP_OBJS = $(NECPP_SRC:.cpp=.o) CPP_SRC = test_cpp.cpp CPP_OBJS = $(CPP_SRC:.cpp=.o) -CXXFLAGS=-I ../src/ -O3 +CXXFLAGS=-I ../src/ -I ../ -O3 test_cpp: ${CPP_OBJS} ${NECPP_OBJS} gcc -o test_cpp ${CPP_OBJS} ${NECPP_OBJS} -lstdc++ -lm --- necpp-1.5.0+cvs20101003.orig/debian/libnecpp-dev.install +++ necpp-1.5.0+cvs20101003/debian/libnecpp-dev.install @@ -0,0 +1,3 @@ +usr/include/*.h +usr/lib/libnecpp.a +usr/lib/libnecpp.so --- necpp-1.5.0+cvs20101003.orig/debian/pycompat +++ necpp-1.5.0+cvs20101003/debian/pycompat @@ -0,0 +1 @@ +2 --- necpp-1.5.0+cvs20101003.orig/debian/compat +++ necpp-1.5.0+cvs20101003/debian/compat @@ -0,0 +1 @@ +5 --- necpp-1.5.0+cvs20101003.orig/debian/necpp.install +++ necpp-1.5.0+cvs20101003/debian/necpp.install @@ -0,0 +1 @@ +usr/bin/* --- necpp-1.5.0+cvs20101003.orig/debian/rules +++ necpp-1.5.0+cvs20101003/debian/rules @@ -0,0 +1,141 @@ +#!/usr/bin/make -f +# -*- makefile -*- +# Sample debian/rules that uses debhelper. +# This file was originally written by Joey Hess and Craig Small. +# As a special exception, when this file is copied by dh-make into a +# dh-make output file, you may use that output file without restriction. +# This special exception was added by Craig Small in version 0.37 of dh-make. + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +PYVERS := $(shell pyversions -r) + +# These are used for cross-compiling and for saving the configure script +# from having to guess our platform (since we know it already) +DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) +DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) + + +CFLAGS = -Wall -g +FFLAGS = -Wall -g +CXXFLAGS = -Wall -g + +ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) + CFLAGS += -O0 + FFLAGS += -O0 + CXXFLAGS += -O0 +else + CFLAGS += -O2 + FFLAGS += -O2 + CXXFLAGS += -O2 +endif + +configure: + cp -f /usr/share/misc/config.sub config.sub + cp -f /usr/share/misc/config.guess config.guess + + $(MAKE) -f Makefile.cvs + +config.status: configure + dh_testdir + # Add here commands to configure the package. + CFLAGS="$(CFLAGS) -Wl,-z,defs -fPIC" ./configure --enable-shared=yes --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info + + +build: build-stamp + +build-stamp: config.status + dh_testdir + # Add here commands to compile the package. + $(MAKE) + set -e; \ + for py in $(PYVERS); do \ + mkdir -p $(CURDIR)/build/$$py ; \ + cp -af $(CURDIR)/Python/PyNEC/* $(CURDIR)/build/$$py ; \ + cd $(CURDIR)/build/$$py ; \ + $$py setup.py ; \ + make -f $$(ls makefile.*) CXX="g++ -fPIC" ; \ + done + touch build-stamp + +clean: + dh_testdir + dh_testroot + + # Add here commands to clean up after the build process. + [ ! -f Makefile ] || $(MAKE) distclean + [ ! -f Python/PyNEC/makefile.linux ] || $(MAKE) -C Python/PyNEC -f makefile.linux clean + + rm -f config.sub config.guess + rm -f install-sh missing mkinstalldirs depcomp + for EXT in dvi pdf aux log blg bbl toc; do \ + rm -f docs/paper.$$EXT; \ + rm -f docs/users_guide.$$EXT; \ + done + + rm -f Makefile.in src/Makefile.in aclocal.m4 ltmain.sh + rm -f configure config.log config.h.in stamp-h.in + rm -rf build + + rm -f build-stamp + + dh_clean + +install: build + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs + + # Add here commands to install the package into debian/tmp. + $(MAKE) install DESTDIR=$(CURDIR)/debian/tmp + + dh_install -s --sourcedir=debian/tmp + + # Copy the docs and examples directories + mkdir -p $(CURDIR)/debian/necpp/usr/share/doc/necpp/docs + cd $(CURDIR)/docs && ( latex paper ; bibtex paper ; latex paper ; pdflatex paper ) + cd $(CURDIR)/docs && ( latex users_guide ; bibtex users_guide ; latex users_guide ; pdflatex users_guide ) + cp -r $(CURDIR)/docs/*.pdf $(CURDIR)/debian/necpp/usr/share/doc/necpp/docs + mkdir -p $(CURDIR)/debian/necpp/usr/share/doc/necpp/test_data + cp $(CURDIR)/test_data/*.nec $(CURDIR)/debian/necpp/usr/share/doc/necpp/test_data + + set -e ; \ + for py in $(PYVERS); do \ + mkdir -p $(CURDIR)/debian/python-necpp/usr/lib/$$py/site-packages/PyNEC ; \ + cp $(CURDIR)/build/$$py/python_module/*.* $(CURDIR)/debian/python-necpp/usr/lib/$$py/site-packages/PyNEC ; \ + done + + mkdir -p $(CURDIR)/debian/python-necpp/usr/share/doc/python-necpp/examples/ + cp $(CURDIR)/Python/PyNEC/test_scripts/*.py $(CURDIR)/debian/python-necpp/usr/share/doc/python-necpp/examples/ + cp $(CURDIR)/Python/PyNEC/test_nec_files/*.nec $(CURDIR)/debian/python-necpp/usr/share/doc/python-necpp/examples/ + + +# Build architecture-independent files here. +binary-indep: build install +# We have nothing to do by default. + +# Build architecture-dependent files here. +binary-arch: build install + dh_testdir + dh_testroot + dh_installchangelogs ChangeLog + dh_installdocs + dh_installexamples + dh_pysupport + dh_installman nec2++.1 nec2diff.1 + dh_link + dh_strip + dh_compress + dh_fixperms +# dh_python + dh_makeshlibs -V + dh_installdeb + dh_shlibdeps + dh_gencontrol + dh_md5sums + dh_builddeb + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary install --- necpp-1.5.0+cvs20101003.orig/debian/docs +++ necpp-1.5.0+cvs20101003/debian/docs @@ -0,0 +1,3 @@ +NEWS +README +TODO --- necpp-1.5.0+cvs20101003.orig/debian/control +++ necpp-1.5.0+cvs20101003/debian/control @@ -0,0 +1,59 @@ +Source: necpp +Section: science +Priority: optional +Maintainer: Emmanuel QUEMENER +Build-Depends: debhelper (>= 5), autoconf, libtool, automake1.9, autotools-dev, python-all-dev, python-numpy, python-support, texlive, swig, libatlas-base-dev, liblapack-dev +Standards-Version: 3.9.1 + +Package: necpp +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: NEC2 Evolution Antenna Modelling System + The NEC2 (Numerical Electromagnetics Code) is software for modelling antennas + using the Method of Moments. It was developed at Lawrence Livermore + Laboratories, and remains widely used, despite the old fashioned punched card + style input required. + . + This program is initially based on Fortran NEC2 software (also nec package). + +Package: libnecpp0 +Section: libs +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: library to use NEC2++ + The NEC2 (Numerical Electromagnetics Code) is software for modelling antennas + using the Method of Moments. It was developed at Lawrence Livermore + Laboratories, and remains widely used, despite the old fashioned punched card + style input required. + . + This package contains a shared library, usable to build and run your own + program directly using NEC2 techniques without calling nec2++ binary program. + +Package: python-necpp +Section: python +Architecture: any +Depends: ${python:Depends}, ${shlibs:Depends}, ${misc:Depends}, python-numpy +Provides: ${python:Provides} +XB-Python-Version: ${python:Versions} +Description: Python module for using NEC2++ + The NEC2 (Numerical Electromagnetics Code) is software for modelling antennas + using the Method of Moments. It was developed at Lawrence Livermore + Laboratories, and remains widely used, despite the old fashioned punched card + style input required. + . + With this Python module, it is possible to use NEC2 techniques directly from + Python. + +Package: libnecpp-dev +Section: libdevel +Architecture: any +Depends: libnecpp0 (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends} +Description: development files for libnecpp + The NEC2 (Numerical Electromagnetics Code) is software for modelling antennas + using the Method of Moments. It was developed at Lawrence Livermore + Laboratories, and remains widely used, despite the old fashioned punched card + style input required. + . + This package contains the header files and static library needed to + compile applications that use libnecpp. + --- necpp-1.5.0+cvs20101003.orig/debian/changelog +++ necpp-1.5.0+cvs20101003/debian/changelog @@ -0,0 +1,157 @@ +necpp (1.5.0+cvs20101003-2.1build1) precise; urgency=low + + * No-change rebuild against current pkgbinarymangler to fix broken + md5sums. (see LP #875466) + + -- Martin Pitt Wed, 29 Feb 2012 08:49:58 +0100 + +necpp (1.5.0+cvs20101003-2.1) unstable; urgency=low + + * Non-maintainer upload. + * Python/PyNEC/setup.py + - fix a FTBFS with python2.7 updating location of libnumarray.h; patches + from ubuntu; Closes: #625135 + * debian/control + - added python-numpy to Depends of python-necpp + + -- Sandro Tosi Sun, 05 Jun 2011 12:51:28 +0200 + +necpp (1.5.0+cvs20101003-2) unstable; urgency=low + + [ Emmanuel QUEMENER ] + * Fix compiling Python on various architectures as changed in 1.4.0 + + -- Emmanuel QUEMENER Mon, 25 Oct 2010 20:58:19 +0200 + +necpp (1.5.0+cvs20101003-1) unstable; urgency=low + + [ Emmanuel QUEMENER ] + * CVS snapshot of the new release + * Fix missing dependencies on Python (closes: #580812) + + -- Emmanuel QUEMENER Sun, 03 Oct 2010 21:12:42 +0100 + +necpp (1.4.0+cvs20091005-2) unstable; urgency=low + + [ Emmanuel QUEMENER ] + * Add user manual for nec2++ and nec2diff commands + * Change compatibility version + * Fix build with gcc-4.4 (closes: #552297, #560507) + * Fix platform detection (closes: #533818) + + -- Emmanuel QUEMENER Wed, 04 Nov 2009 07:57:42 +0100 + +necpp (1.4.0+cvs20091005-1) unstable; urgency=low + + [ Emmanuel QUEMENER ] + * CVS snapshot based on new release + * Change NumArray references to NumPy in order to match next release + * Check for successful test-data/examples1.nec execution (closes: #531533) + * Correct source example in order to compile (closes: #545267) + * Change Automake build from 1.4 to 1.9 version (closes: #549135) + + -- Emmanuel QUEMENER Mon, 26 Oct 2009 10:04:00 +0200 + +necpp (1.3.0+cvs20090101-1) unstable; urgency=low + + [ Emmanuel QUEMENER ] + * CVS snapshot based on new release. + * Add Lapack and Atlas librairies dependencies + * Change dependencies to TexLive + + -- Emmanuel QUEMENER Thu, 04 Jan 2009 06:00:28 +0100 + +necpp (1.2.6+cvs20070816-1.3) unstable; urgency=low + + [ Peter Eisentraut ] + * Non-maintainer upload. + * Fixed bashism in debian/rules (patch by Chris Lamb) (closes: #484415) + * Don't ignore errors from make distclean, per lintian + * Fixed sections, per lintian + * Updated standards version + + -- Peter Eisentraut Tue, 08 Jul 2008 18:13:58 +0200 + +necpp (1.2.6+cvs20070816-1.2) unstable; urgency=low + + * Non-maintainer upload. + * Add includes needed by gcc-4.3, closes: 474838 + Thanks: peter green + + -- Riku Voipio Tue, 03 Jun 2008 17:35:42 +0300 + +necpp (1.2.6+cvs20070816-1.1) unstable; urgency=medium + + * Non-maintainer upload. + * Fix FTBFS with GCC 4.3 (Closes: #455186). + + -- Luk Claes Sat, 22 Mar 2008 08:18:08 +0000 + +necpp (1.2.6+cvs20070816-1) unstable; urgency=low + + * New release. + * Correct 4.3 compilation errors (Closes: bug#417442) + + -- Emmanuel QUEMENER Thu, 16 Aug 2007 16:17:35 +0200 + +necpp (1.2.4+cvs20060601-1) unstable; urgency=low + + * Initial release (Closes: bug#379410). + + -- Emmanuel QUEMENER Thu, 1 Jun 2006 14:25:22 +0200 +necpp (1.3.0+cvs20090101-2) unstable; urgency=low + + [ Emmanuel QUEMENER ] + * Check for successful test-data/examples1.nec execution (closes: #531533) + * Correct source example in order to compile (closes: #545267) + * Change Automake build from 1.4 to 1.9 version (closes: #549135) + + -- Emmanuel QUEMENER Thu, 01 Oct 2009 12:18:53 +0200 + +necpp (1.3.0+cvs20090101-1) unstable; urgency=low + + [ Emmanuel QUEMENER ] + * CVS snapshot based on new release. + * Add Lapack and Atlas librairies dependencies + * Change dependencies to TexLive + + -- Emmanuel QUEMENER Thu, 04 Jan 2009 06:00:28 +0100 + +necpp (1.2.6+cvs20070816-1.3) unstable; urgency=low + + [ Peter Eisentraut ] + * Non-maintainer upload. + * Fixed bashism in debian/rules (patch by Chris Lamb) (closes: #484415) + * Don't ignore errors from make distclean, per lintian + * Fixed sections, per lintian + * Updated standards version + + -- Peter Eisentraut Tue, 08 Jul 2008 18:13:58 +0200 + +necpp (1.2.6+cvs20070816-1.2) unstable; urgency=low + + * Non-maintainer upload. + * Add includes needed by gcc-4.3, closes: 474838 + Thanks: peter green + + -- Riku Voipio Tue, 03 Jun 2008 17:35:42 +0300 + +necpp (1.2.6+cvs20070816-1.1) unstable; urgency=medium + + * Non-maintainer upload. + * Fix FTBFS with GCC 4.3 (Closes: #455186). + + -- Luk Claes Sat, 22 Mar 2008 08:18:08 +0000 + +necpp (1.2.6+cvs20070816-1) unstable; urgency=low + + * New release. + * Correct 4.3 compilation errors (Closes: bug#417442) + + -- Emmanuel QUEMENER Thu, 16 Aug 2007 16:17:35 +0200 + +necpp (1.2.4+cvs20060601-1) unstable; urgency=low + + * Initial release (Closes: bug#379410). + + -- Emmanuel QUEMENER Thu, 1 Jun 2006 14:25:22 +0200 --- necpp-1.5.0+cvs20101003.orig/debian/libnecpp0.install +++ necpp-1.5.0+cvs20101003/debian/libnecpp0.install @@ -0,0 +1 @@ +usr/lib/libnecpp.so.* --- necpp-1.5.0+cvs20101003.orig/debian/copyright +++ necpp-1.5.0+cvs20101003/debian/copyright @@ -0,0 +1,26 @@ +This package was debianized by Emmanuel QUEMENER on +Tue, 14 Feb 2006 21:49:23 +0100. + +It was downloaded from http://alioth.debian.org/projects/necpp/ + +Copyright 2009 Tim Molteno +Copyright 2009 Remi Sassolas + +License: + + necpp is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +On Debian systems, the complete text of the GPL can be found in +/usr/share/common-licenses/GPL. --- necpp-1.5.0+cvs20101003.orig/Python/PyNEC/setup.py +++ necpp-1.5.0+cvs20101003/Python/PyNEC/setup.py @@ -9,15 +9,15 @@ #================================================================================================================================================================================== #checks the Numarray installation -print('\nNumarray installation check...') +print('\nNumpy installation check...') try: - from numarray import * + from numpy import * except: - print('FAILURE - PyNEC requires Numarray to be installed. Please install Numarrray first.') + print('FAILURE - PyNEC requires Numpy with old extensions numarray to be installed. Please install Numpy first first.') print('Installation aborted') sys.exit(-1) -print('SUCCESS - Numarray seems to be installed.') +print('SUCCESS - Numpy seems to be installed.') #================================================================================================================================================================================== #Detects the Python version number @@ -74,9 +74,9 @@ print('SUCCESS - Python include path found') #================================================================================================================================================================================== -#Looks for the Numarray "API path" +#Looks for the Numpy "API path" -print('\nLooking for the Numarray API path...') +print('\nLooking for the Numpy API path...') def test_api_path(str): open(os.path.join(str, 'libnumarray.h'), 'rb') @@ -87,7 +87,9 @@ if platform == 'win32' : api_path = os.path.join(sys.prefix, 'include','numarray') else : - api_path = os.path.join(sys.prefix, 'include', 'python'+python_version, 'numarray') +# api_path = os.path.join(sys.prefix, 'include', 'python'+python_version, 'numarray') +# api_path = os.path.join(sys.prefix, 'share','pyshared','numpy','numarray','numpy') + api_path = os.path.join(sys.prefix, 'share','pyshared','numpy','numarray','include','numpy') test_api_path(api_path) return api_path except: @@ -160,7 +162,7 @@ print('\nGenerating the makefile...') -if platform == 'linux2' or platform == 'win32' : +if platform.startswith("linux") or platform.startswith("gnukfreebsd") or platform.startswith("win") : try : f = open ('makefile.'+platform, 'wb') except : @@ -178,7 +180,7 @@ list_hdrs = l + ['math_util', 'common', 'nec_results'] list_src = l + ['nec_context', 'nec_ground', 'nec_radiation_pattern', 'nec_exception', 'nec_structure_currents'] - if platform == 'linux2' : + if platform.startswith("linux") or platform.startswith("gnukfreebsd") : f.write('\nPYMOD=python_module/_PyNEC.so\n'); hdrs = '\nHDRS = ' --- necpp-1.5.0+cvs20101003.orig/Python/PyNEC/wrap/src/c_geometry.cpp +++ necpp-1.5.0+cvs20101003/Python/PyNEC/wrap/src/c_geometry.cpp @@ -17,7 +17,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "c_geometry.h" - +#include #include "nec_context.h" #include "nec_exception.h" --- necpp-1.5.0+cvs20101003.orig/Python/PyNEC/wrap/src/safe_array.h +++ necpp-1.5.0+cvs20101003/Python/PyNEC/wrap/src/safe_array.h @@ -21,6 +21,7 @@ #include #include #include +#include #ifdef NEC_ERROR_CHECK --- necpp-1.5.0+cvs20101003.orig/Python/PyNEC/wrap/src/c_ggrid.cpp +++ necpp-1.5.0+cvs20101003/Python/PyNEC/wrap/src/c_ggrid.cpp @@ -49,8 +49,8 @@ /* as previous point, old values are reused. */ if( (ix < ixeg) || (iy < iyeg) || - (abs(ix- ixs) >= 2) || - (abs(iy- iys) >= 2) || + (abs(double(ix- ixs)) >= 2) || + (abs(double(iy- iys)) >= 2) || (skip_recalculation == false) ) { /* determine correct grid and grid region */ --- necpp-1.5.0+cvs20101003.orig/Python/PyNEC/python_module/nec_radiation_pattern.py +++ necpp-1.5.0+cvs20101003/Python/PyNEC/python_module/nec_radiation_pattern.py @@ -39,7 +39,7 @@ -import numarray +import numpy import math import exceptions @@ -113,7 +113,7 @@ """ n_theta=_get_n_theta(arg1) n_phi=_get_n_phi(arg1) - return numarray.reshape(arg0,(n_phi,n_theta)) + return numpy.reshape(arg0,(n_phi,n_theta)) @@ -275,16 +275,16 @@ for i in range(n_phi) : for j in range(n_theta) : l.append((rho, phi_start+i*delta_phi,theta_start+j*delta_theta)) - ar = numarray.array(l); - ar = numarray.reshape(ar, (n_phi,n_theta,3)) + ar = numpy.array(l); + ar = numpy.reshape(ar, (n_phi,n_theta,3)) else : r = _get_range(*args) for i in range(n_phi) : for j in range(n_theta) : l.append((r, theta_start+j*delta_theta, phi_start+i*delta_phi)) - ar = numarray.array(l); - ar = numarray.reshape(ar, (n_phi,n_theta,3)) + ar = numpy.array(l); + ar = numpy.reshape(ar, (n_phi,n_theta,3)) return ar --- necpp-1.5.0+cvs20101003.orig/Python/PyNEC/python_module/nec_norm_rx_pattern.py +++ necpp-1.5.0+cvs20101003/Python/PyNEC/python_module/nec_norm_rx_pattern.py @@ -39,8 +39,8 @@ -import numarray -import numarray.ma +import numpy +import numpy.ma #some utility functions @@ -50,7 +50,7 @@ """ n_theta = _get_n_theta(arg0) n_phi = _get_n_phi(arg0) - ar = numarray.reshape(_PyNEC.nec_norm_rx_pattern_get_mag(arg0),(n_theta, n_phi)) + ar = numpy.reshape(_PyNEC.nec_norm_rx_pattern_get_mag(arg0),(n_theta, n_phi)) ar.transpose() return ar @@ -169,8 +169,8 @@ for j in range(n_theta) : l.append((theta_start+j*delta_theta, phi_start+i*delta_phi)) - ar = numarray.array(l); - ar = numarray.reshape(ar, (n_phi,n_theta,2)) + ar = numpy.array(l); + ar = numpy.reshape(ar, (n_phi,n_theta,2)) return ar @@ -187,7 +187,7 @@ Returns the array of normalized receiving gain in dB. """ mag = self.get_magnitude(*args) - gain = 20*numarray.ma.log10(mag) + gain = 20*numpy.ma.log10(mag) gain.set_fill_value(-999.999) return gain.filled() --- necpp-1.5.0+cvs20101003.orig/Python/python_module/nec_radiation_pattern.py +++ necpp-1.5.0+cvs20101003/Python/python_module/nec_radiation_pattern.py @@ -39,7 +39,7 @@ -import numarray +import numpy import math import exceptions @@ -113,7 +113,7 @@ """ n_theta=_get_n_theta(arg1) n_phi=_get_n_phi(arg1) - return numarray.reshape(arg0,(n_phi,n_theta)) + return numpy.reshape(arg0,(n_phi,n_theta)) @@ -259,15 +259,15 @@ for i in range(n_phi) : for j in range(n_theta) : l.append((rho, phi_start+i*delta_phi,theta_start+j*delta_theta)) - ar = numarray.array(l); - ar = numarray.reshape(ar, (n_phi,n_theta,3)) + ar = numpy.array(l); + ar = numpy.reshape(ar, (n_phi,n_theta,3)) else : for i in range(n_phi) : for j in range(n_theta) : l.append((theta_start+j*delta_theta, phi_start+i*delta_phi)) - ar = numarray.array(l); - ar = numarray.reshape(ar, (n_phi,n_theta,2)) + ar = numpy.array(l); + ar = numpy.reshape(ar, (n_phi,n_theta,2)) return ar --- necpp-1.5.0+cvs20101003.orig/Python/python_module/nec_norm_rx_pattern.py +++ necpp-1.5.0+cvs20101003/Python/python_module/nec_norm_rx_pattern.py @@ -39,8 +39,8 @@ -import numarray -import numarray.ma +import numpy +import numpy.ma #some utility functions @@ -50,7 +50,7 @@ """ n_theta = _get_n_theta(arg0) n_phi = _get_n_phi(arg0) - ar = numarray.reshape(_PyNEC.nec_norm_rx_pattern_get_mag(arg0),(n_theta, n_phi)) + ar = numpy.reshape(_PyNEC.nec_norm_rx_pattern_get_mag(arg0),(n_theta, n_phi)) ar.transpose() return ar @@ -169,8 +169,8 @@ for j in range(n_theta) : l.append((theta_start+j*delta_theta, phi_start+i*delta_phi)) - ar = numarray.array(l); - ar = numarray.reshape(ar, (n_phi,n_theta,2)) + ar = numpy.array(l); + ar = numpy.reshape(ar, (n_phi,n_theta,2)) return ar @@ -187,7 +187,7 @@ Returns the array of normalized receiving gain in dB. """ mag = self.get_magnitude(*args) - gain = 20*numarray.ma.log10(mag) + gain = 20*numpy.ma.log10(mag) gain.set_fill_value(-999.999) return gain.filled() --- necpp-1.5.0+cvs20101003.orig/src/nec_context.cpp +++ necpp-1.5.0+cvs20101003/src/nec_context.cpp @@ -17,12 +17,11 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include #include "nec_context.h" #include "c_geometry.h" #include "nec_exception.h" -#include - nec_context::nec_context() { m_output_fp=NULL; --- necpp-1.5.0+cvs20101003.orig/src/c_geometry.cpp +++ necpp-1.5.0+cvs20101003/src/c_geometry.cpp @@ -16,6 +16,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include #include "c_geometry.h" #include "nec_context.h" --- necpp-1.5.0+cvs20101003.orig/src/nec2cpp.cpp +++ necpp-1.5.0+cvs20101003/src/nec2cpp.cpp @@ -47,7 +47,7 @@ /* */ /************************************************************************/ - +#include #include "nec2cpp.h" #include "nec_exception.h" #include --- necpp-1.5.0+cvs20101003.orig/src/matrix_algebra.cpp +++ necpp-1.5.0+cvs20101003/src/matrix_algebra.cpp @@ -210,7 +210,7 @@ #include "matrix_algebra.h" #include "nec_output.h" -#include "config.h" +//#include "config.h" #ifdef NEC_MATRIX_CHECK //#define NEC_MATRIX_CHECK --- necpp-1.5.0+cvs20101003.orig/src/safe_array.h +++ necpp-1.5.0+cvs20101003/src/safe_array.h @@ -21,6 +21,7 @@ #include #include #include +#include #include "nec_exception.h" --- necpp-1.5.0+cvs20101003.orig/src/Makefile.am +++ necpp-1.5.0+cvs20101003/src/Makefile.am @@ -25,5 +25,6 @@ libnecpp_la_LDFLAGS = @LIBLAPACK@ -lm -lstdc++ libnecpp_la_CXXFLAGS = -nec2___LDFLAGS = -all-static +#nec2___LDFLAGS = -all-static +nec2___LDFLAGS = --- necpp-1.5.0+cvs20101003.orig/src/c_ggrid.cpp +++ necpp-1.5.0+cvs20101003/src/c_ggrid.cpp @@ -15,6 +15,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include #include "c_ggrid.h" #include "common.h" #include "nec_output.h" // for DEBUG_TRACE()