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 <array>
21
22#include "math_util.h"
23
24void bessel(nec_complex z, nec_complex *j0, nec_complex *j0p);
25void hankel(nec_complex z, nec_complex *h0, nec_complex *h0p);
26
28{
29public:
30 nec_float m_ck2, m_ck2sq, m_tkmag, m_tsmag, m_ck1r, m_zph, m_rho;
31 nec_complex m_ct1, m_ct2, m_ct3, m_ck1, m_ck1sq, m_cksm;
32
33 nec_complex m_contour_a, m_contour_b;
34
37 void lambda( nec_float t, nec_complex *xlam, nec_complex *dxlam ) const;
38
39
45 void gshank( nec_complex start, nec_complex dela, nec_complex* sum,
46 int nans, nec_complex* seed, int ibk, nec_complex bk, nec_complex delb );
47
48
51 void rom1( int n, nec_complex* sum, int nx );
52
55 void saoa( nec_float t, std::array<nec_complex,6>& ans);
56
59 void evlua( nec_complex *erv, nec_complex *ezv,
60 nec_complex *erh, nec_complex *eph );
61
64 void set_bessel_flag(bool f) { m_bessel_flag = f; }
65
66private:
68 bool m_bessel_flag;
69};
70
71/* Numerical integration convergence tests (used by Sommerfeld integration) */
72void test(nec_float f1r, nec_float f2r, nec_float *tr, nec_float f1i,
73 nec_float f2i, nec_float *ti, nec_float dmin);
74nec_float test_simple( nec_float f1r, nec_float f2r, nec_float dmin );
Definition c_evlcom.h:28
void rom1(int n, nec_complex *sum, int nx)
rom1 integrates the 6 Sommerfeld integrals from m_contour_a to m_contour_b in lambda....
Definition c_evlcom.cpp:220
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 gshank(nec_complex start, nec_complex dela, nec_complex *sum, int nans, nec_complex *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:49
void saoa(nec_float t, std::array< nec_complex, 6 > &ans)
saoa computes the integrand for each of the 6 Sommerfeld integrals for source and observer above grou...
Definition c_evlcom.cpp:390
void lambda(nec_float t, nec_complex *xlam, nec_complex *dxlam) const
Compute integration parameter xlam=lambda from parameter t.
Definition c_evlcom.cpp:37
void set_bessel_flag(bool f)
Test support: select the Bessel-function form (true) or the Hankel-function form (false) of the integ...
Definition c_evlcom.h:64