WarpX
Loading...
Searching...
No Matches
BesselRoots.H
Go to the documentation of this file.
1/* Copyright 2019 David Grote
2 *
3 * This file is part of WarpX.
4 *
5 * License: BSD-3-Clause-LBNL
6 */
7/* -------------------------------------------------------------------------
8! program to calculate the first zeroes (root abscissas) of the first
9! kind bessel function of integer order n using the subroutine rootj.
10! --------------------------------------------------------------------------
11! sample run:
12!
13! (calculate the first 10 zeroes of 1st kind bessel function of order 2).
14!
15! zeroes of bessel function of order: 2
16!
17! number of calculated zeroes: 10
18!
19! table of root abcissas (5 items per line)
20! 5.135622 8.417244 11.619841 14.795952 17.959819
21 21.116997 24.270112 27.420574 30.569204 33.716520
22!
23! table of error codes (5 items per line)
24! 0 0 0 0 0
25! 0 0 0 0 0
26!
27! --------------------------------------------------------------------------
28! reference: from numath library by tuan dang trong in fortran 77
29! [bibli 18].
30!
31! c++ release 1.0 by j-p moreau, paris
32! (www.jpmoreau.fr)
33! ------------------------------------------------------------------------ */
34
35#ifndef WARPX_BESSEL_ROOTS_H_
36#define WARPX_BESSEL_ROOTS_H_
37
38#include <AMReX_REAL.H>
39#include <AMReX_Vector.H>
40
41/*----------------------------------------------------------------------
42 * calculate the first nk zeroes of bessel function j(n, x)
43 * including the trivial root (when n > 0)
44 *
45 * inputs:
46 * n order of function j (integer >= 0) i*4
47 * nk number of first zeroes (integer > 0) i*4
48 * outputs:
49 * roots(nk) table of first zeroes (abcissas) r*8
50 * ier(nk) table of error codes (must be zeroes) i*4
51 *
52 * reference :
53 * abramowitz m. & stegun irene a.
54 * handbook of mathematical functions
55 */
56void GetBesselRoots(int n, int nk, amrex::Vector<amrex::Real>& roots, amrex::Vector<int> &ier);
57
58#endif // WARPX_BESSEL_ROOTS_H_
void GetBesselRoots(int n, int nk, amrex::Vector< amrex::Real > &roots, amrex::Vector< int > &ier)
Definition BesselRoots.cpp:80