necpp 1.7.3.5__tar.gz → 1.8.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (75) hide show
  1. necpp-1.8.1/PKG-INFO +91 -0
  2. {necpp-1.7.3.5 → necpp-1.8.1}/README.md +5 -0
  3. necpp-1.8.1/necpp.egg-info/PKG-INFO +91 -0
  4. {necpp-1.7.3.5 → necpp-1.8.1}/necpp.egg-info/SOURCES.txt +4 -4
  5. {necpp-1.7.3.5 → necpp-1.8.1}/necpp.py +39 -124
  6. {necpp-1.7.3.5 → necpp-1.8.1}/necpp_src/config.h +10 -17
  7. {necpp-1.7.3.5 → necpp-1.8.1}/necpp_src/src/AntennaInput.h +1 -4
  8. {necpp-1.7.3.5 → necpp-1.8.1}/necpp_src/src/BaseInput.h +1 -4
  9. {necpp-1.7.3.5 → necpp-1.8.1}/necpp_src/src/CurrentInput.h +12 -4
  10. {necpp-1.7.3.5 → necpp-1.8.1}/necpp_src/src/PowerBudget.h +1 -4
  11. {necpp-1.7.3.5 → necpp-1.8.1}/necpp_src/src/RadiationInput.h +1 -4
  12. {necpp-1.7.3.5 → necpp-1.8.1}/necpp_src/src/c_evlcom.cpp +2 -2
  13. {necpp-1.7.3.5 → necpp-1.8.1}/necpp_src/src/c_evlcom.h +1 -4
  14. {necpp-1.7.3.5 → necpp-1.8.1}/necpp_src/src/c_geometry.cpp +816 -848
  15. {necpp-1.7.3.5 → necpp-1.8.1}/necpp_src/src/c_geometry.h +47 -12
  16. necpp-1.8.1/necpp_src/src/c_ggrid.cpp +432 -0
  17. {necpp-1.7.3.5 → necpp-1.8.1}/necpp_src/src/c_ggrid.h +19 -5
  18. {necpp-1.7.3.5 → necpp-1.8.1}/necpp_src/src/c_plot_card.h +1 -4
  19. {necpp-1.7.3.5 → necpp-1.8.1}/necpp_src/src/common.h +2 -5
  20. {necpp-1.7.3.5 → necpp-1.8.1}/necpp_src/src/electromag.h +1 -4
  21. {necpp-1.7.3.5 → necpp-1.8.1}/necpp_src/src/libNEC.cpp +5 -4
  22. {necpp-1.7.3.5 → necpp-1.8.1}/necpp_src/src/libnecpp.h +1 -4
  23. necpp-1.8.1/necpp_src/src/math_util.h +186 -0
  24. necpp-1.8.1/necpp_src/src/matrix_algebra.cpp +747 -0
  25. {necpp-1.7.3.5 → necpp-1.8.1}/necpp_src/src/matrix_algebra.h +6 -15
  26. {necpp-1.7.3.5 → necpp-1.8.1}/necpp_src/src/misc.cpp +23 -17
  27. {necpp-1.7.3.5 → necpp-1.8.1}/necpp_src/src/misc.h +1 -6
  28. {necpp-1.7.3.5 → necpp-1.8.1}/necpp_src/src/nec2cpp.h +0 -2
  29. necpp-1.8.1/necpp_src/src/nec_card_parser.h +131 -0
  30. {necpp-1.7.3.5 → necpp-1.8.1}/necpp_src/src/nec_context.cpp +983 -1108
  31. {necpp-1.7.3.5 → necpp-1.8.1}/necpp_src/src/nec_context.h +46 -13
  32. {necpp-1.7.3.5 → necpp-1.8.1}/necpp_src/src/nec_debug.h +3 -7
  33. {necpp-1.7.3.5 → necpp-1.8.1}/necpp_src/src/nec_exception.cpp +2 -2
  34. {necpp-1.7.3.5 → necpp-1.8.1}/necpp_src/src/nec_exception.h +13 -13
  35. {necpp-1.7.3.5 → necpp-1.8.1}/necpp_src/src/nec_ground.cpp +5 -5
  36. {necpp-1.7.3.5 → necpp-1.8.1}/necpp_src/src/nec_ground.h +2 -5
  37. {necpp-1.7.3.5 → necpp-1.8.1}/necpp_src/src/nec_output.cpp +2 -2
  38. {necpp-1.7.3.5 → necpp-1.8.1}/necpp_src/src/nec_output.h +1 -4
  39. {necpp-1.7.3.5 → necpp-1.8.1}/necpp_src/src/nec_radiation_pattern.cpp +12 -19
  40. {necpp-1.7.3.5 → necpp-1.8.1}/necpp_src/src/nec_radiation_pattern.h +3 -6
  41. {necpp-1.7.3.5 → necpp-1.8.1}/necpp_src/src/nec_results.h +13 -75
  42. {necpp-1.7.3.5 → necpp-1.8.1}/necpp_src/src/nec_structure_currents.cpp +8 -16
  43. {necpp-1.7.3.5 → necpp-1.8.1}/necpp_src/src/nec_structure_currents.h +3 -11
  44. {necpp-1.7.3.5 → necpp-1.8.1}/necpp_src/src/nec_wire.h +17 -14
  45. necpp-1.8.1/necpp_src/src/safe_array.h +267 -0
  46. {necpp-1.7.3.5 → necpp-1.8.1}/necpp_wrap.c +1297 -1532
  47. necpp-1.8.1/pyproject.toml +30 -0
  48. necpp-1.8.1/setup.cfg +4 -0
  49. necpp-1.8.1/setup.py +40 -0
  50. necpp-1.8.1/tests/test_multiple_sc_cards.py +311 -0
  51. necpp-1.7.3.5/PKG-INFO +0 -90
  52. necpp-1.7.3.5/necpp.egg-info/PKG-INFO +0 -90
  53. necpp-1.7.3.5/necpp_src/src/atlas_check.cpp +0 -613
  54. necpp-1.7.3.5/necpp_src/src/c_ggrid.cpp +0 -471
  55. necpp-1.7.3.5/necpp_src/src/math_util.h +0 -334
  56. necpp-1.7.3.5/necpp_src/src/matrix_algebra.cpp +0 -850
  57. necpp-1.7.3.5/necpp_src/src/safe_array.h +0 -339
  58. necpp-1.7.3.5/setup.cfg +0 -7
  59. necpp-1.7.3.5/setup.py +0 -63
  60. {necpp-1.7.3.5 → necpp-1.8.1}/LICENCE.txt +0 -0
  61. {necpp-1.7.3.5 → necpp-1.8.1}/MANIFEST.in +0 -0
  62. {necpp-1.7.3.5 → necpp-1.8.1}/example/antenna_util.py +0 -0
  63. {necpp-1.7.3.5 → necpp-1.8.1}/example/different_material.py +0 -0
  64. {necpp-1.7.3.5 → necpp-1.8.1}/example/impedance_plot.py +0 -0
  65. {necpp-1.7.3.5 → necpp-1.8.1}/example/monopole.py +0 -0
  66. {necpp-1.7.3.5 → necpp-1.8.1}/example/optimized.py +0 -0
  67. {necpp-1.7.3.5 → necpp-1.8.1}/necpp.egg-info/dependency_links.txt +0 -0
  68. {necpp-1.7.3.5 → necpp-1.8.1}/necpp.egg-info/top_level.txt +0 -0
  69. {necpp-1.7.3.5 → necpp-1.8.1}/necpp_src/example/test.py +0 -0
  70. {necpp-1.7.3.5 → necpp-1.8.1}/necpp_src/src/XGetopt.cpp +0 -0
  71. {necpp-1.7.3.5 → necpp-1.8.1}/necpp_src/src/XGetopt.h +0 -0
  72. {necpp-1.7.3.5 → necpp-1.8.1}/necpp_src/src/c_plot_card.cpp +0 -0
  73. {necpp-1.7.3.5 → necpp-1.8.1}/necpp_src/src/electromag.cpp +0 -0
  74. {necpp-1.7.3.5 → necpp-1.8.1}/necpp_src/src/nec_results.cpp +0 -0
  75. {necpp-1.7.3.5 → necpp-1.8.1}/necpp_src/src/typesafe_stdint.h +0 -0
necpp-1.8.1/PKG-INFO ADDED
@@ -0,0 +1,91 @@
1
+ Metadata-Version: 2.4
2
+ Name: necpp
3
+ Version: 1.8.1
4
+ Summary: Python Antenna Simulation Module (nec2++) C-style interface
5
+ Author-email: Tim Molteno <tim@physics.otago.ac.nz>
6
+ License-Expression: GPL-3.0-only
7
+ Project-URL: Homepage, http://github.com/tmolteno/necpp
8
+ Project-URL: Repository, http://github.com/tmolteno/python-necpp
9
+ Keywords: nec2,nec2++,antenna,electromagnetism,radio
10
+ Classifier: Development Status :: 5 - Production/Stable
11
+ Classifier: Topic :: Scientific/Engineering
12
+ Classifier: Topic :: Communications :: Ham Radio
13
+ Classifier: Programming Language :: Python :: 3
14
+ Classifier: Intended Audience :: Science/Research
15
+ Requires-Python: >=3.9
16
+ Description-Content-Type: text/markdown
17
+ License-File: LICENCE.txt
18
+ Dynamic: license-file
19
+
20
+ # python-necpp: Antenna simulation in python
21
+
22
+ This module allows you to do antenna simulations in Python using the nec2++ antenna
23
+ simulation package.
24
+
25
+ This is a wrapper using SWIG of the C interface, so the syntax
26
+ is quite simple. Have a look at the file necpp_src/example/test.py, for an example of how this
27
+ library can be used.
28
+
29
+ Tim Molteno. tim@physics.otago.ac.nz
30
+
31
+ ## NEWS
32
+
33
+ * Version 1.7.3 Includes Python3 support. Also some bug fixes and updating nec++ to the
34
+ latest version.
35
+ * Version 1.7.0.3 includes nec_medium_parameters(). You could simulate an antenna in seawater!
36
+ * Version 1.7.0 includes support for getting elements of radiation patterns. At the moment
37
+ this is just through the function nec_get_gain().
38
+
39
+
40
+ ## Install
41
+
42
+ As of version 1.6.1.2 swig is no longer required for installation. Simply use PIP as
43
+ follows:
44
+
45
+ pip install necpp
46
+
47
+ To build from source with uv:
48
+
49
+ uv build
50
+ uv pip install .
51
+
52
+ ## Documentation
53
+
54
+ Try help(necpp) to list the available functions. The functions available are documented in the C-style API of nec2++.
55
+ This is [available here](http://tmolteno.github.io/necpp/libnecpp_8h.html)
56
+
57
+ ## Using
58
+
59
+ The following code calculates the impedance of a simple vertical monopole antenna
60
+ over a perfect ground.
61
+
62
+ import necpp
63
+
64
+ def handle_nec(result):
65
+ if (result != 0):
66
+ print necpp.nec_error_message()
67
+
68
+ def impedance(frequency, z0, height):
69
+
70
+ nec = necpp.nec_create()
71
+ handle_nec(necpp.nec_wire(nec, 1, 17, 0, 0, z0, 0, 0, z0+height, 0.1, 1, 1))
72
+ handle_nec(necpp.nec_geometry_complete(nec, 1, 0))
73
+ handle_nec(necpp.nec_gn_card(nec, 1, 0, 0, 0, 0, 0, 0, 0))
74
+ handle_nec(necpp.nec_fr_card(nec, 0, 1, frequency, 0))
75
+ handle_nec(necpp.nec_ex_card(nec, 0, 0, 1, 0, 1.0, 0, 0, 0, 0, 0))
76
+ handle_nec(necpp.nec_rp_card(nec, 0, 90, 1, 0,5,0,0, 0, 90, 1, 0, 0, 0))
77
+ result_index = 0
78
+
79
+ z = complex(necpp.nec_impedance_real(nec,result_index),
80
+ necpp.nec_impedance_imag(nec,result_index))
81
+
82
+ necpp.nec_delete(nec)
83
+ return z
84
+
85
+ if (__name__ == 'main'):
86
+ z = impedance(frequency = 34.5, z0 = 0.5, height = 4.0)
87
+ print "Impedance \t(%6.1f,%+6.1fI) Ohms" % (z.real, z.imag)
88
+
89
+ ## More Information
90
+
91
+ Have a look at [http://github.com/tmolteno/necpp] for more information on using nec2++.
@@ -25,6 +25,11 @@ follows:
25
25
 
26
26
  pip install necpp
27
27
 
28
+ To build from source with uv:
29
+
30
+ uv build
31
+ uv pip install .
32
+
28
33
  ## Documentation
29
34
 
30
35
  Try help(necpp) to list the available functions. The functions available are documented in the C-style API of nec2++.
@@ -0,0 +1,91 @@
1
+ Metadata-Version: 2.4
2
+ Name: necpp
3
+ Version: 1.8.1
4
+ Summary: Python Antenna Simulation Module (nec2++) C-style interface
5
+ Author-email: Tim Molteno <tim@physics.otago.ac.nz>
6
+ License-Expression: GPL-3.0-only
7
+ Project-URL: Homepage, http://github.com/tmolteno/necpp
8
+ Project-URL: Repository, http://github.com/tmolteno/python-necpp
9
+ Keywords: nec2,nec2++,antenna,electromagnetism,radio
10
+ Classifier: Development Status :: 5 - Production/Stable
11
+ Classifier: Topic :: Scientific/Engineering
12
+ Classifier: Topic :: Communications :: Ham Radio
13
+ Classifier: Programming Language :: Python :: 3
14
+ Classifier: Intended Audience :: Science/Research
15
+ Requires-Python: >=3.9
16
+ Description-Content-Type: text/markdown
17
+ License-File: LICENCE.txt
18
+ Dynamic: license-file
19
+
20
+ # python-necpp: Antenna simulation in python
21
+
22
+ This module allows you to do antenna simulations in Python using the nec2++ antenna
23
+ simulation package.
24
+
25
+ This is a wrapper using SWIG of the C interface, so the syntax
26
+ is quite simple. Have a look at the file necpp_src/example/test.py, for an example of how this
27
+ library can be used.
28
+
29
+ Tim Molteno. tim@physics.otago.ac.nz
30
+
31
+ ## NEWS
32
+
33
+ * Version 1.7.3 Includes Python3 support. Also some bug fixes and updating nec++ to the
34
+ latest version.
35
+ * Version 1.7.0.3 includes nec_medium_parameters(). You could simulate an antenna in seawater!
36
+ * Version 1.7.0 includes support for getting elements of radiation patterns. At the moment
37
+ this is just through the function nec_get_gain().
38
+
39
+
40
+ ## Install
41
+
42
+ As of version 1.6.1.2 swig is no longer required for installation. Simply use PIP as
43
+ follows:
44
+
45
+ pip install necpp
46
+
47
+ To build from source with uv:
48
+
49
+ uv build
50
+ uv pip install .
51
+
52
+ ## Documentation
53
+
54
+ Try help(necpp) to list the available functions. The functions available are documented in the C-style API of nec2++.
55
+ This is [available here](http://tmolteno.github.io/necpp/libnecpp_8h.html)
56
+
57
+ ## Using
58
+
59
+ The following code calculates the impedance of a simple vertical monopole antenna
60
+ over a perfect ground.
61
+
62
+ import necpp
63
+
64
+ def handle_nec(result):
65
+ if (result != 0):
66
+ print necpp.nec_error_message()
67
+
68
+ def impedance(frequency, z0, height):
69
+
70
+ nec = necpp.nec_create()
71
+ handle_nec(necpp.nec_wire(nec, 1, 17, 0, 0, z0, 0, 0, z0+height, 0.1, 1, 1))
72
+ handle_nec(necpp.nec_geometry_complete(nec, 1, 0))
73
+ handle_nec(necpp.nec_gn_card(nec, 1, 0, 0, 0, 0, 0, 0, 0))
74
+ handle_nec(necpp.nec_fr_card(nec, 0, 1, frequency, 0))
75
+ handle_nec(necpp.nec_ex_card(nec, 0, 0, 1, 0, 1.0, 0, 0, 0, 0, 0))
76
+ handle_nec(necpp.nec_rp_card(nec, 0, 90, 1, 0,5,0,0, 0, 90, 1, 0, 0, 0))
77
+ result_index = 0
78
+
79
+ z = complex(necpp.nec_impedance_real(nec,result_index),
80
+ necpp.nec_impedance_imag(nec,result_index))
81
+
82
+ necpp.nec_delete(nec)
83
+ return z
84
+
85
+ if (__name__ == 'main'):
86
+ z = impedance(frequency = 34.5, z0 = 0.5, height = 4.0)
87
+ print "Impedance \t(%6.1f,%+6.1fI) Ohms" % (z.real, z.imag)
88
+
89
+ ## More Information
90
+
91
+ Have a look at [http://github.com/tmolteno/necpp] for more information on using nec2++.
@@ -3,9 +3,8 @@ MANIFEST.in
3
3
  README.md
4
4
  necpp.py
5
5
  necpp_wrap.c
6
- setup.cfg
6
+ pyproject.toml
7
7
  setup.py
8
- ../necpp_src/example/test.py
9
8
  example/antenna_util.py
10
9
  example/different_material.py
11
10
  example/impedance_plot.py
@@ -24,7 +23,6 @@ necpp_src/src/PowerBudget.h
24
23
  necpp_src/src/RadiationInput.h
25
24
  necpp_src/src/XGetopt.cpp
26
25
  necpp_src/src/XGetopt.h
27
- necpp_src/src/atlas_check.cpp
28
26
  necpp_src/src/c_evlcom.cpp
29
27
  necpp_src/src/c_evlcom.h
30
28
  necpp_src/src/c_geometry.cpp
@@ -44,6 +42,7 @@ necpp_src/src/matrix_algebra.h
44
42
  necpp_src/src/misc.cpp
45
43
  necpp_src/src/misc.h
46
44
  necpp_src/src/nec2cpp.h
45
+ necpp_src/src/nec_card_parser.h
47
46
  necpp_src/src/nec_context.cpp
48
47
  necpp_src/src/nec_context.h
49
48
  necpp_src/src/nec_debug.h
@@ -61,4 +60,5 @@ necpp_src/src/nec_structure_currents.cpp
61
60
  necpp_src/src/nec_structure_currents.h
62
61
  necpp_src/src/nec_wire.h
63
62
  necpp_src/src/safe_array.h
64
- necpp_src/src/typesafe_stdint.h
63
+ necpp_src/src/typesafe_stdint.h
64
+ tests/test_multiple_sc_cards.py
@@ -1,284 +1,199 @@
1
- # This file was automatically generated by SWIG (http://www.swig.org).
2
- # Version 3.0.12
1
+ # This file was automatically generated by SWIG (https://www.swig.org).
2
+ # Version 4.2.0
3
3
  #
4
- # Do not make changes to this file unless you know what you are doing--modify
4
+ # Do not make changes to this file unless you know what you are doing - modify
5
5
  # the SWIG interface file instead.
6
6
 
7
7
  from sys import version_info as _swig_python_version_info
8
- if _swig_python_version_info >= (2, 7, 0):
9
- def swig_import_helper():
10
- import importlib
11
- pkg = __name__.rpartition('.')[0]
12
- mname = '.'.join((pkg, '_necpp')).lstrip('.')
13
- try:
14
- return importlib.import_module(mname)
15
- except ImportError:
16
- return importlib.import_module('_necpp')
17
- _necpp = swig_import_helper()
18
- del swig_import_helper
19
- elif _swig_python_version_info >= (2, 6, 0):
20
- def swig_import_helper():
21
- from os.path import dirname
22
- import imp
23
- fp = None
24
- try:
25
- fp, pathname, description = imp.find_module('_necpp', [dirname(__file__)])
26
- except ImportError:
27
- import _necpp
28
- return _necpp
29
- try:
30
- _mod = imp.load_module('_necpp', fp, pathname, description)
31
- finally:
32
- if fp is not None:
33
- fp.close()
34
- return _mod
35
- _necpp = swig_import_helper()
36
- del swig_import_helper
8
+ # Import the low-level C/C++ module
9
+ if __package__ or "." in __name__:
10
+ from . import _necpp
37
11
  else:
38
12
  import _necpp
39
- del _swig_python_version_info
40
-
41
- try:
42
- _swig_property = property
43
- except NameError:
44
- pass # Python < 2.2 doesn't have 'property'.
45
13
 
46
14
  try:
47
15
  import builtins as __builtin__
48
16
  except ImportError:
49
17
  import __builtin__
50
18
 
51
- def _swig_setattr_nondynamic(self, class_type, name, value, static=1):
52
- if (name == "thisown"):
53
- return self.this.own(value)
54
- if (name == "this"):
55
- if type(value).__name__ == 'SwigPyObject':
56
- self.__dict__[name] = value
57
- return
58
- method = class_type.__swig_setmethods__.get(name, None)
59
- if method:
60
- return method(self, value)
61
- if (not static):
62
- if _newclass:
63
- object.__setattr__(self, name, value)
19
+ def _swig_repr(self):
20
+ try:
21
+ strthis = "proxy of " + self.this.__repr__()
22
+ except __builtin__.Exception:
23
+ strthis = ""
24
+ return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)
25
+
26
+
27
+ def _swig_setattr_nondynamic_instance_variable(set):
28
+ def set_instance_attr(self, name, value):
29
+ if name == "this":
30
+ set(self, name, value)
31
+ elif name == "thisown":
32
+ self.this.own(value)
33
+ elif hasattr(self, name) and isinstance(getattr(type(self), name), property):
34
+ set(self, name, value)
64
35
  else:
65
- self.__dict__[name] = value
66
- else:
67
- raise AttributeError("You cannot add attributes to %s" % self)
36
+ raise AttributeError("You cannot add instance attributes to %s" % self)
37
+ return set_instance_attr
68
38
 
69
39
 
70
- def _swig_setattr(self, class_type, name, value):
71
- return _swig_setattr_nondynamic(self, class_type, name, value, 0)
40
+ def _swig_setattr_nondynamic_class_variable(set):
41
+ def set_class_attr(cls, name, value):
42
+ if hasattr(cls, name) and not isinstance(getattr(cls, name), property):
43
+ set(cls, name, value)
44
+ else:
45
+ raise AttributeError("You cannot add class attributes to %s" % cls)
46
+ return set_class_attr
72
47
 
73
48
 
74
- def _swig_getattr(self, class_type, name):
75
- if (name == "thisown"):
76
- return self.this.own()
77
- method = class_type.__swig_getmethods__.get(name, None)
78
- if method:
79
- return method(self)
80
- raise AttributeError("'%s' object has no attribute '%s'" % (class_type.__name__, name))
49
+ def _swig_add_metaclass(metaclass):
50
+ """Class decorator for adding a metaclass to a SWIG wrapped class - a slimmed down version of six.add_metaclass"""
51
+ def wrapper(cls):
52
+ return metaclass(cls.__name__, cls.__bases__, cls.__dict__.copy())
53
+ return wrapper
81
54
 
82
55
 
83
- def _swig_repr(self):
84
- try:
85
- strthis = "proxy of " + self.this.__repr__()
86
- except __builtin__.Exception:
87
- strthis = ""
88
- return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)
56
+ class _SwigNonDynamicMeta(type):
57
+ """Meta class to enforce nondynamic attributes (no new attributes) for a class"""
58
+ __setattr__ = _swig_setattr_nondynamic_class_variable(type.__setattr__)
89
59
 
90
- try:
91
- _object = object
92
- _newclass = 1
93
- except __builtin__.Exception:
94
- class _object:
95
- pass
96
- _newclass = 0
97
60
 
98
61
 
99
62
  def nec_create():
100
63
  return _necpp.nec_create()
101
- nec_create = _necpp.nec_create
102
64
 
103
65
  def nec_delete(in_context):
104
66
  return _necpp.nec_delete(in_context)
105
- nec_delete = _necpp.nec_delete
106
67
 
107
68
  def nec_wire(in_context, tag_id, segment_count, xw1, yw1, zw1, xw2, yw2, zw2, rad, rdel, rrad):
108
69
  return _necpp.nec_wire(in_context, tag_id, segment_count, xw1, yw1, zw1, xw2, yw2, zw2, rad, rdel, rrad)
109
- nec_wire = _necpp.nec_wire
110
70
 
111
71
  def nec_sp_card(in_context, ns, x1, y1, z1, x2, y2, z2):
112
72
  return _necpp.nec_sp_card(in_context, ns, x1, y1, z1, x2, y2, z2)
113
- nec_sp_card = _necpp.nec_sp_card
114
73
 
115
74
  def nec_sc_card(in_context, i2, x3, y3, z3, x4, y4, z4):
116
75
  return _necpp.nec_sc_card(in_context, i2, x3, y3, z3, x4, y4, z4)
117
- nec_sc_card = _necpp.nec_sc_card
118
76
 
119
77
  def nec_gm_card(in_context, itsi, nrpt, rox, roy, roz, xs, ys, zs, its):
120
78
  return _necpp.nec_gm_card(in_context, itsi, nrpt, rox, roy, roz, xs, ys, zs, its)
121
- nec_gm_card = _necpp.nec_gm_card
122
79
 
123
80
  def nec_gx_card(in_context, i1, i2):
124
81
  return _necpp.nec_gx_card(in_context, i1, i2)
125
- nec_gx_card = _necpp.nec_gx_card
126
82
 
127
83
  def nec_geometry_complete(in_context, gpflag):
128
84
  return _necpp.nec_geometry_complete(in_context, gpflag)
129
- nec_geometry_complete = _necpp.nec_geometry_complete
130
85
 
131
86
  def nec_benchmark():
132
87
  return _necpp.nec_benchmark()
133
- nec_benchmark = _necpp.nec_benchmark
134
88
 
135
89
  def nec_error_message():
136
90
  return _necpp.nec_error_message()
137
- nec_error_message = _necpp.nec_error_message
138
91
 
139
92
  def nec_medium_parameters(in_context, permittivity, permeability):
140
93
  return _necpp.nec_medium_parameters(in_context, permittivity, permeability)
141
- nec_medium_parameters = _necpp.nec_medium_parameters
142
94
 
143
95
  def nec_gn_card(in_context, iperf, nradl, epse, sig, tmp3, tmp4, tmp5, tmp6):
144
96
  return _necpp.nec_gn_card(in_context, iperf, nradl, epse, sig, tmp3, tmp4, tmp5, tmp6)
145
- nec_gn_card = _necpp.nec_gn_card
146
97
 
147
98
  def nec_fr_card(in_context, in_ifrq, in_nfrq, in_freq_mhz, in_del_freq):
148
99
  return _necpp.nec_fr_card(in_context, in_ifrq, in_nfrq, in_freq_mhz, in_del_freq)
149
- nec_fr_card = _necpp.nec_fr_card
150
100
 
151
101
  def nec_ek_card(in_context, itmp1):
152
102
  return _necpp.nec_ek_card(in_context, itmp1)
153
- nec_ek_card = _necpp.nec_ek_card
154
103
 
155
104
  def nec_ld_card(in_context, ldtyp, ldtag, ldtagf, ldtagt, tmp1, tmp2, tmp3):
156
105
  return _necpp.nec_ld_card(in_context, ldtyp, ldtag, ldtagf, ldtagt, tmp1, tmp2, tmp3)
157
- nec_ld_card = _necpp.nec_ld_card
158
106
 
159
107
  def nec_ex_card(in_context, extype, i2, i3, i4, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6):
160
108
  return _necpp.nec_ex_card(in_context, extype, i2, i3, i4, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6)
161
- nec_ex_card = _necpp.nec_ex_card
162
109
 
163
110
  def nec_excitation_voltage(in_context, tag, segment, v_real, v_imag):
164
111
  return _necpp.nec_excitation_voltage(in_context, tag, segment, v_real, v_imag)
165
- nec_excitation_voltage = _necpp.nec_excitation_voltage
166
112
 
167
113
  def nec_excitation_current(in_context, x, y, z, a, beta, moment):
168
114
  return _necpp.nec_excitation_current(in_context, x, y, z, a, beta, moment)
169
- nec_excitation_current = _necpp.nec_excitation_current
170
115
 
171
116
  def nec_excitation_planewave(in_context, n_theta, n_phi, theta, phi, eta, dtheta, dphi, pol_ratio):
172
117
  return _necpp.nec_excitation_planewave(in_context, n_theta, n_phi, theta, phi, eta, dtheta, dphi, pol_ratio)
173
- nec_excitation_planewave = _necpp.nec_excitation_planewave
174
118
 
175
119
  def nec_tl_card(in_context, itmp1, itmp2, itmp3, itmp4, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6):
176
120
  return _necpp.nec_tl_card(in_context, itmp1, itmp2, itmp3, itmp4, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6)
177
- nec_tl_card = _necpp.nec_tl_card
178
121
 
179
122
  def nec_nt_card(in_context, itmp1, itmp2, itmp3, itmp4, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6):
180
123
  return _necpp.nec_nt_card(in_context, itmp1, itmp2, itmp3, itmp4, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6)
181
- nec_nt_card = _necpp.nec_nt_card
182
124
 
183
125
  def nec_xq_card(in_context, itmp1):
184
126
  return _necpp.nec_xq_card(in_context, itmp1)
185
- nec_xq_card = _necpp.nec_xq_card
186
127
 
187
128
  def nec_gd_card(in_context, tmp1, tmp2, tmp3, tmp4):
188
129
  return _necpp.nec_gd_card(in_context, tmp1, tmp2, tmp3, tmp4)
189
- nec_gd_card = _necpp.nec_gd_card
190
130
 
191
131
  def nec_rp_card(in_context, calc_mode, n_theta, n_phi, output_format, normalization, D, A, theta0, phi0, delta_theta, delta_phi, radial_distance, gain_norm):
192
132
  return _necpp.nec_rp_card(in_context, calc_mode, n_theta, n_phi, output_format, normalization, D, A, theta0, phi0, delta_theta, delta_phi, radial_distance, gain_norm)
193
- nec_rp_card = _necpp.nec_rp_card
194
133
 
195
134
  def nec_pt_card(in_context, itmp1, itmp2, itmp3, itmp4):
196
135
  return _necpp.nec_pt_card(in_context, itmp1, itmp2, itmp3, itmp4)
197
- nec_pt_card = _necpp.nec_pt_card
198
136
 
199
137
  def nec_pq_card(in_context, itmp1, itmp2, itmp3, itmp4):
200
138
  return _necpp.nec_pq_card(in_context, itmp1, itmp2, itmp3, itmp4)
201
- nec_pq_card = _necpp.nec_pq_card
202
139
 
203
140
  def nec_kh_card(in_context, tmp1):
204
141
  return _necpp.nec_kh_card(in_context, tmp1)
205
- nec_kh_card = _necpp.nec_kh_card
206
142
 
207
143
  def nec_ne_card(in_context, itmp1, itmp2, itmp3, itmp4, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6):
208
144
  return _necpp.nec_ne_card(in_context, itmp1, itmp2, itmp3, itmp4, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6)
209
- nec_ne_card = _necpp.nec_ne_card
210
145
 
211
146
  def nec_nh_card(in_context, itmp1, itmp2, itmp3, itmp4, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6):
212
147
  return _necpp.nec_nh_card(in_context, itmp1, itmp2, itmp3, itmp4, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6)
213
- nec_nh_card = _necpp.nec_nh_card
214
148
 
215
149
  def nec_cp_card(in_context, itmp1, itmp2, itmp3, itmp4):
216
150
  return _necpp.nec_cp_card(in_context, itmp1, itmp2, itmp3, itmp4)
217
- nec_cp_card = _necpp.nec_cp_card
218
151
 
219
152
  def nec_pl_card(in_context, ploutput_filename, itmp1, itmp2, itmp3, itmp4):
220
153
  return _necpp.nec_pl_card(in_context, ploutput_filename, itmp1, itmp2, itmp3, itmp4)
221
- nec_pl_card = _necpp.nec_pl_card
222
154
 
223
155
  def nec_gain(in_context, freq_index, theta_index, phi_index):
224
156
  return _necpp.nec_gain(in_context, freq_index, theta_index, phi_index)
225
- nec_gain = _necpp.nec_gain
226
157
 
227
158
  def nec_gain_max(in_context, freq_index):
228
159
  return _necpp.nec_gain_max(in_context, freq_index)
229
- nec_gain_max = _necpp.nec_gain_max
230
160
 
231
161
  def nec_gain_min(in_context, freq_index):
232
162
  return _necpp.nec_gain_min(in_context, freq_index)
233
- nec_gain_min = _necpp.nec_gain_min
234
163
 
235
164
  def nec_gain_mean(in_context, freq_index):
236
165
  return _necpp.nec_gain_mean(in_context, freq_index)
237
- nec_gain_mean = _necpp.nec_gain_mean
238
166
 
239
167
  def nec_gain_sd(in_context, freq_index):
240
168
  return _necpp.nec_gain_sd(in_context, freq_index)
241
- nec_gain_sd = _necpp.nec_gain_sd
242
169
 
243
170
  def nec_gain_rhcp_max(in_context, freq_index):
244
171
  return _necpp.nec_gain_rhcp_max(in_context, freq_index)
245
- nec_gain_rhcp_max = _necpp.nec_gain_rhcp_max
246
172
 
247
173
  def nec_gain_rhcp_min(in_context, freq_index):
248
174
  return _necpp.nec_gain_rhcp_min(in_context, freq_index)
249
- nec_gain_rhcp_min = _necpp.nec_gain_rhcp_min
250
175
 
251
176
  def nec_gain_rhcp_mean(in_context, freq_index):
252
177
  return _necpp.nec_gain_rhcp_mean(in_context, freq_index)
253
- nec_gain_rhcp_mean = _necpp.nec_gain_rhcp_mean
254
178
 
255
179
  def nec_gain_rhcp_sd(in_context, freq_index):
256
180
  return _necpp.nec_gain_rhcp_sd(in_context, freq_index)
257
- nec_gain_rhcp_sd = _necpp.nec_gain_rhcp_sd
258
181
 
259
182
  def nec_gain_lhcp_max(in_context, freq_index):
260
183
  return _necpp.nec_gain_lhcp_max(in_context, freq_index)
261
- nec_gain_lhcp_max = _necpp.nec_gain_lhcp_max
262
184
 
263
185
  def nec_gain_lhcp_min(in_context, freq_index):
264
186
  return _necpp.nec_gain_lhcp_min(in_context, freq_index)
265
- nec_gain_lhcp_min = _necpp.nec_gain_lhcp_min
266
187
 
267
188
  def nec_gain_lhcp_mean(in_context, freq_index):
268
189
  return _necpp.nec_gain_lhcp_mean(in_context, freq_index)
269
- nec_gain_lhcp_mean = _necpp.nec_gain_lhcp_mean
270
190
 
271
191
  def nec_gain_lhcp_sd(in_context, freq_index):
272
192
  return _necpp.nec_gain_lhcp_sd(in_context, freq_index)
273
- nec_gain_lhcp_sd = _necpp.nec_gain_lhcp_sd
274
193
 
275
194
  def nec_impedance_real(in_context, freq_index):
276
195
  return _necpp.nec_impedance_real(in_context, freq_index)
277
- nec_impedance_real = _necpp.nec_impedance_real
278
196
 
279
197
  def nec_impedance_imag(in_context, freq_index):
280
198
  return _necpp.nec_impedance_imag(in_context, freq_index)
281
- nec_impedance_imag = _necpp.nec_impedance_imag
282
- # This file is compatible with both classic and new-style classes.
283
-
284
199
 
@@ -2,7 +2,7 @@
2
2
  /* config.h.in. Generated from configure.ac by autoheader. */
3
3
 
4
4
  /* The build date */
5
- #define BUILD_DATE "2019-08-30"
5
+ #define BUILD_DATE "2026-07-06"
6
6
 
7
7
  /* Define to 1 if you have the <dlfcn.h> header file. */
8
8
  #define HAVE_DLFCN_H 1
@@ -13,12 +13,12 @@
13
13
  /* Define to 1 if you have the `m' library (-lm). */
14
14
  #define HAVE_LIBM 1
15
15
 
16
- /* Define to 1 if you have the <memory.h> header file. */
17
- #define HAVE_MEMORY_H 1
18
-
19
16
  /* Define to 1 if you have the <stdint.h> header file. */
20
17
  #define HAVE_STDINT_H 1
21
18
 
19
+ /* Define to 1 if you have the <stdio.h> header file. */
20
+ #define HAVE_STDIO_H 1
21
+
22
22
  /* Define to 1 if you have the <stdlib.h> header file. */
23
23
  #define HAVE_STDLIB_H 1
24
24
 
@@ -37,9 +37,6 @@
37
37
  /* Define to 1 if you have the <unistd.h> header file. */
38
38
  #define HAVE_UNISTD_H 1
39
39
 
40
- /* Define if you have liblapack */
41
- /* #undef LAPACK */
42
-
43
40
  /* Define to the sub-directory where libtool stores uninstalled libraries. */
44
41
  #define LT_OBJDIR ".libs/"
45
42
 
@@ -53,7 +50,7 @@
53
50
  #define PACKAGE_NAME "necpp"
54
51
 
55
52
  /* Define to the full name and version of this package. */
56
- #define PACKAGE_STRING "necpp 1.7.4"
53
+ #define PACKAGE_STRING "necpp 2.1.1"
57
54
 
58
55
  /* Define to the one symbol short name of this package. */
59
56
  #define PACKAGE_TARNAME "necpp"
@@ -62,16 +59,12 @@
62
59
  #define PACKAGE_URL ""
63
60
 
64
61
  /* Define to the version of this package. */
65
- #define PACKAGE_VERSION "1.7.4"
62
+ #define PACKAGE_VERSION "2.1.1"
66
63
 
67
- /* Define to 1 if you have the ANSI C header files. */
64
+ /* Define to 1 if all of the C90 standard headers exist (not just the ones
65
+ required in a freestanding environment). This macro is provided for
66
+ backward compatibility; new code need not use it. */
68
67
  #define STDC_HEADERS 1
69
68
 
70
- /* Define if you have eigen */
71
- /* #undef USING_EIGEN_3VECT */
72
-
73
- /* Define if you have eigen */
74
- /* #undef USING_EIGEN_ARRAY */
75
-
76
69
  /* Version number of package */
77
- #define VERSION "1.7.4"
70
+ #define VERSION "2.1.1"
@@ -15,8 +15,7 @@
15
15
  along with this program; if not, write to the Free Software
16
16
  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17
17
  */
18
- #ifndef __Antenna_Input__
19
- #define __Antenna_Input__
18
+ #pragma once
20
19
 
21
20
  #include <vector>
22
21
  #include "BaseInput.h"
@@ -113,5 +112,3 @@ public:
113
112
  return ret;
114
113
  };
115
114
  };
116
-
117
- #endif /* __Antenna_Input__ */
@@ -15,8 +15,7 @@
15
15
  along with this program; if not, write to the Free Software
16
16
  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17
17
  */
18
- #ifndef __Base_Input__
19
- #define __Base_Input__
18
+ #pragma once
20
19
 
21
20
  #include "math_util.h"
22
21
 
@@ -106,5 +105,3 @@ protected:
106
105
  return x;
107
106
  }
108
107
  };
109
-
110
- #endif /* __Base_Input__ */
@@ -15,8 +15,7 @@
15
15
  along with this program; if not, write to the Free Software
16
16
  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17
17
  */
18
- #ifndef __Current_Input__
19
- #define __Current_Input__
18
+ #pragma once
20
19
 
21
20
  #include "math_util.h"
22
21
  #include <vector>
@@ -37,6 +36,17 @@ public:
37
36
  segment(istream& m_stream)
38
37
  {
39
38
  }
39
+
40
+ nec_float diff(const segment& other) const
41
+ {
42
+ nec_float ret = 0.0;
43
+ ret += std::fabs(x - other.x);
44
+ ret += std::fabs(y - other.y);
45
+ ret += std::fabs(z - other.z);
46
+ ret += std::fabs(length - other.length);
47
+ ret += std::abs(current - other.current);
48
+ return ret;
49
+ }
40
50
  };
41
51
 
42
52
  class CurrentInput : public BaseInput
@@ -108,5 +118,3 @@ public:
108
118
  return ret;
109
119
  };
110
120
  };
111
-
112
- #endif /* __Current_Input__ */