ccgsl 2.7.2
C++wrappersforGnuScientificLibrary
sf_coulomb.hpp
Go to the documentation of this file.
1/*
2 * $Id: sf_coulomb.hpp 9 2010-06-13 14:02:43Z jdl3 $
3 * Copyright (C) 2010 John D Lamb
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or (at
8 * your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18 */
19
20#ifndef CCGSL_SF_COULOMB_HPP
21#define CCGSL_SF_COULOMB_HPP
22
23#include<gsl/gsl_sf_coulomb.h>
24#include"mode.hpp"
25#include"sf_result.hpp"
26
27namespace gsl {
28 namespace sf {
38 inline int hydrogenicR_1_e( double const Z, double const r, result& result ){
39 return gsl_sf_hydrogenicR_1_e( Z, r, &result ); }
48 inline double hydrogenicR_1( double const Z, double const r ){
49 return gsl_sf_hydrogenicR_1( Z, r ); }
61 inline int hydrogenicR_e( int const n, int const l, double const Z, double const r, result& result ){
62 return gsl_sf_hydrogenicR_e( n, l, Z, r, &result ); }
73 inline double hydrogenicR( int const n, int const l, double const Z, double const r ){
74 return gsl_sf_hydrogenicR( n, l, Z, r ); }
78 namespace coulomb {
79#ifndef DOXYGEN_SKIP
111 inline int wave_FG_e( double const eta, double const x, double const lam_F, int const k_lam_G,
112 result& F, result& Fp, result& G, result& Gp, double* exp_F, double* exp_G ){
113 return gsl_sf_coulomb_wave_FG_e( eta, x, lam_F, k_lam_G, &F, &Fp, &G, &Gp, exp_F, exp_G ); }
114#endif // DOXYGEN_SKIP
146 inline int wave_FG_e( double const eta, double const x, double const lam_F, int const k_lam_G,
147 result& F, result& Fp, result& G, result& Gp, double& exp_F, double& exp_G ){
148 return gsl_sf_coulomb_wave_FG_e( eta, x, lam_F, k_lam_G, &F, &Fp, &G, &Gp, &exp_F, &exp_G ); }
149#ifndef DOXYGEN_SKIP
160 inline int wave_F_array( double lam_min, int kmax, double eta, double x,
161 double* fc_array, double* F_exponent ){
162 return gsl_sf_coulomb_wave_F_array( lam_min, kmax, eta, x, fc_array, F_exponent ); }
163#endif // DOXYGEN_SKIP
174 template<typename DATA>
175 inline int wave_F_array( double lam_min, int kmax, double eta, double x,
176 DATA& fc_array, double& F_exponent ){
177 if(fc_array.size() < static_cast<size_t>(kmax)){ return GSL_EBADLEN;}
178 return gsl_sf_coulomb_wave_F_array( lam_min, kmax, eta, x, fc_array.data(),
179 &F_exponent ); }
180#ifndef DOXYGEN_SKIP
193 inline int wave_FG_array( double lam_min, int kmax, double eta, double x, double* fc_array,
194 double* gc_array, double* F_exponent, double* G_exponent ){
195 return gsl_sf_coulomb_wave_FG_array( lam_min, kmax, eta, x, fc_array, gc_array,
196 F_exponent, G_exponent ); }
197#endif // DOXYGEN_SKIP
210 template<typename DATA>
211 inline int wave_FG_array( double lam_min, int kmax, double eta, double x, DATA& fc_array,
212 DATA& gc_array, double& F_exponent, double& G_exponent ){
213 if(fc_array.size() < static_cast<size_t>(kmax)){ return GSL_EBADLEN;}
214 if(gc_array.size() < static_cast<size_t>(kmax)){ return GSL_EBADLEN;}
215 return gsl_sf_coulomb_wave_FG_array( lam_min, kmax, eta, x, fc_array.data(),
216 gc_array.data(), &F_exponent, &G_exponent ); }
217#ifndef DOXYGEN_SKIP
232 inline int wave_FGp_array( double lam_min, int kmax, double eta, double x,
233 double* fc_array, double* fcp_array, double* gc_array,
234 double* gcp_array, double* F_exponent,
235 double* G_exponent ){
236 return gsl_sf_coulomb_wave_FGp_array( lam_min, kmax, eta, x, fc_array, fcp_array,
237 gc_array, gcp_array, F_exponent, G_exponent ); }
238#endif // DOXYGEN_SKIP
253 template<typename DATA>
254 inline int wave_FGp_array( double lam_min, int kmax, double eta, double x,
255 DATA& fc_array, DATA& fcp_array, DATA& gc_array,
256 DATA& gcp_array, double& F_exponent,
257 double& G_exponent ){
258 if(fc_array.size() < static_cast<size_t>(kmax)){ return GSL_EBADLEN;}
259 if(fcp_array.size() < static_cast<size_t>(kmax)){ return GSL_EBADLEN;}
260 if(gc_array.size() < static_cast<size_t>(kmax)){ return GSL_EBADLEN;}
261 if(gcp_array.size() < static_cast<size_t>(kmax)){ return GSL_EBADLEN;}
262 return gsl_sf_coulomb_wave_FGp_array( lam_min, kmax, eta, x, fc_array.data(),
263 fcp_array.data(), gc_array.data(),
264 gcp_array.data(), &F_exponent, &G_exponent ); }
265#ifndef DOXYGEN_SKIP
276 inline int wave_sphF_array( double lam_min, int kmax, double eta, double x,
277 double* fc_array, double* F_exponent ){
278 return gsl_sf_coulomb_wave_sphF_array( lam_min, kmax, eta, x, fc_array, F_exponent ); }
279#endif // DOXYGEN_SKIP
290 template<typename DATA>
291 inline int wave_sphF_array( double lam_min, int kmax, double eta, double x,
292 DATA& fc_array, double& F_exponent ){
293 if(fc_array.size() < static_cast<size_t>(kmax)){ return GSL_EBADLEN;}
294 return gsl_sf_coulomb_wave_sphF_array( lam_min, kmax, eta, x, fc_array.data(),
295 &F_exponent ); }
303 inline int CL_e( double L, double eta, result& result ){
304 return gsl_sf_coulomb_CL_e( L, eta, &result ); }
305#ifndef DOXYGEN_SKIP
314 inline int CL_array( double Lmin, int kmax, double eta, double* cl ){
315 return gsl_sf_coulomb_CL_array( Lmin, kmax, eta, cl ); }
316#endif // DOXYGEN_SKIP
325 template<typename DATA>
326 inline int CL_array( double Lmin, int kmax, double eta, DATA& cl ){
327 if(cl.size() < static_cast<size_t>(kmax)){ return GSL_EBADLEN;}
328 return gsl_sf_coulomb_CL_array( Lmin, kmax, eta, cl.data() ); }
329 }
330 }
331}
332
333#endif
size_t n(workspace const &w)
C++ version of gsl_rstat_n().
Definition: rstat.hpp:299
int wave_F_array(double lam_min, int kmax, double eta, double x, DATA &fc_array, double &F_exponent)
C++ version of gsl_sf_coulomb_wave_F_array().
Definition: sf_coulomb.hpp:175
int CL_e(double L, double eta, result &result)
C++ version of gsl_sf_coulomb_CL_e().
Definition: sf_coulomb.hpp:303
int wave_FG_array(double lam_min, int kmax, double eta, double x, DATA &fc_array, DATA &gc_array, double &F_exponent, double &G_exponent)
C++ version of gsl_sf_coulomb_wave_FG_array().
Definition: sf_coulomb.hpp:211
int wave_FG_e(double const eta, double const x, double const lam_F, int const k_lam_G, result &F, result &Fp, result &G, result &Gp, double &exp_F, double &exp_G)
C++ version of gsl_sf_coulomb_wave_FG_e().
Definition: sf_coulomb.hpp:146
int wave_FGp_array(double lam_min, int kmax, double eta, double x, DATA &fc_array, DATA &fcp_array, DATA &gc_array, DATA &gcp_array, double &F_exponent, double &G_exponent)
C++ version of gsl_sf_coulomb_wave_FGp_array().
Definition: sf_coulomb.hpp:254
int wave_sphF_array(double lam_min, int kmax, double eta, double x, DATA &fc_array, double &F_exponent)
C++ version of gsl_sf_coulomb_wave_sphF_array().
Definition: sf_coulomb.hpp:291
int CL_array(double Lmin, int kmax, double eta, DATA &cl)
C++ version of gsl_sf_coulomb_CL_array().
Definition: sf_coulomb.hpp:326
double F(double phi, double k, mode_t mode)
C++ version of gsl_sf_ellint_F().
Definition: sf_ellint.hpp:138
double hydrogenicR(int const n, int const l, double const Z, double const r)
C++ version of gsl_sf_hydrogenicR().
Definition: sf_coulomb.hpp:73
double eta(double const s)
C++ version of gsl_sf_eta().
Definition: sf_zeta.hpp:181
int hydrogenicR_e(int const n, int const l, double const Z, double const r, result &result)
C++ version of gsl_sf_hydrogenicR_e().
Definition: sf_coulomb.hpp:61
int hydrogenicR_1_e(double const Z, double const r, result &result)
C++ version of gsl_sf_hydrogenicR_1().
Definition: sf_coulomb.hpp:38
double hydrogenicR_1(double const Z, double const r)
C++ version of gsl_sf_hydrogenicR_1().
Definition: sf_coulomb.hpp:48
gsl_sf_result result
Typedef for gsl_sf_result.
Definition: sf_result.hpp:30
The gsl package creates an interface to the GNU Scientific Library for C++.
Definition: blas.hpp:34