nec2++ 2.1.1
c_evlcom.h
1/*
2 Copyright (C) 2004 Timothy C.A. Molteno
3
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or
7 (at your option) any later version.
8
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
13
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17*/
18#pragma once
19
20#include "math_util.h"
21
22void bessel(nec_complex z, nec_complex *j0, nec_complex *j0p);
23void hankel(nec_complex z, nec_complex *h0, nec_complex *h0p);
24
26{
27public:
28 nec_float m_ck2, m_ck2sq, m_tkmag, m_tsmag, m_ck1r, m_zph, m_rho;
29 nec_complex m_ct1, m_ct2, m_ct3, m_ck1, m_ck1sq, m_cksm;
30
31 nec_complex m_contour_a, m_contour_b;
32
35 void lambda( nec_float t, nec_complex *xlam, nec_complex *dxlam ) const;
36
37
43 void gshank( nec_complex start, nec_complex dela, complex_array& sum,
44 int nans, complex_array& seed, int ibk, nec_complex bk, nec_complex delb );
45
46
49 void rom1( int n, complex_array& sum, int nx );
50
53 void saoa( nec_float t, complex_array& ans);
54
57 void evlua( nec_complex *erv, nec_complex *ezv,
58 nec_complex *erh, nec_complex *eph );
59
60private:
62 bool m_bessel_flag;
63};
64
65/* Numerical integration convergence tests (used by Sommerfeld integration) */
66void test(nec_float f1r, nec_float f2r, nec_float *tr, nec_float f1i,
67 nec_float f2i, nec_float *ti, nec_float dmin);
68nec_float test_simple( nec_float f1r, nec_float f2r, nec_float dmin );
Definition c_evlcom.h:26
void evlua(nec_complex *erv, nec_complex *ezv, nec_complex *erh, nec_complex *eph)
evlua controls the integration contour in the complex lambda plane for evaluation of the Sommerfeld i...
Definition c_evlcom.cpp:491
void rom1(int n, complex_array &sum, int nx)
rom1 integrates the 6 Sommerfeld integrals from m_contour_a to m_contour_b in lambda....
Definition c_evlcom.cpp:218
void gshank(nec_complex start, nec_complex dela, complex_array &sum, int nans, complex_array &seed, int ibk, nec_complex bk, nec_complex delb)
gshank integrates the 6 Sommerfeld integrals from start to infinity (until convergence) in lambda....
Definition c_evlcom.cpp:47
void lambda(nec_float t, nec_complex *xlam, nec_complex *dxlam) const
Compute integration parameter xlam=lambda from parameter t.
Definition c_evlcom.cpp:35
void saoa(nec_float t, complex_array &ans)
saoa computes the integrand for each of the 6 Sommerfeld integrals for source and observer above grou...
Definition c_evlcom.cpp:382