GyotoUtils.h
Go to the documentation of this file.
/*
Copyright 2011, 2016 Thibaut Paumard
This file is part of Gyoto.
Gyoto is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Gyoto is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Gyoto. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __GyotoUtils_H_
#define __GyotoUtils_H_
#include "GyotoDefs.h"
#include <string>
#include <vector>
namespace Gyoto {
void debug(int mode);
int debug();
void verbose(int mode);
int verbose();
void convert(double * const x, const std::size_t nelem,
const double mass_sun, const double distance_kpc,
const std::string unit);
double atof(const char * str);
void help(std::string class_name);
std::vector<std::string> split(std::string const &src, std::string const &delim);
/*
boost Bessel function as implemented in
#include <boost/math/special_functions/bessel.hpp>
are 50% longer than the following, while the following
give results accurate at ~1e-6 which is more than enough.
*/
double bessi0(double xx);
double bessi1(double xx);
double bessk0(double xx);
double bessk1(double xx);
double bessk(int nn, double xx);
double hypergeom (double kappaIndex, double thetae);
void cartesianToSpherical(double const cpos[3], double spos[3]);
void sphericalToCartesian(double const spos[3], double cpos[3]);
// Keep argument names for swig!
void matrix4Invert(double ARGOUT_ARRAY2[4][4], double const IN_ARRAY2[4][4]);
// Keep argument names for swig!
void matrix4CircularInvert(double ARGOUT_ARRAY2[4][4], double const IN_ARRAY2[4][4]);
}
#endif
GyotoDefs.h
Gyoto ubiquitous macros and typedefs.
Gyoto
Namespace for the Gyoto library.
Definition GyotoAstrobj.h:44
Gyoto::split
std::vector< std::string > split(std::string const &src, std::string const &delim)
Split string.
Gyoto::matrix4Invert
void matrix4Invert(double ARGOUT_ARRAY2[4][4], double const IN_ARRAY2[4][4])
Invert 4x4 matrix.
Gyoto::hypergeom
double hypergeom(double kappaIndex, double thetae)
Gauss hypergeometric 2F1 term for kappa-distribution synchrotron.
Gyoto::sphericalToCartesian
void sphericalToCartesian(double const spos[3], double cpos[3])
Tranform from spherical 3-position to Cartesian 3-position.
Gyoto::bessk1
double bessk1(double xx)
Modified Bessel function K1.
Gyoto::bessi0
double bessi0(double xx)
Bessel function computation.
Gyoto::matrix4CircularInvert
void matrix4CircularInvert(double ARGOUT_ARRAY2[4][4], double const IN_ARRAY2[4][4])
Invert 4x4 circular spacetime metric.
Gyoto::verbose
int verbose()
Get verbosity level.
Gyoto::bessk0
double bessk0(double xx)
Modified Bessel function K0.
Gyoto::bessi1
double bessi1(double xx)
Modified Bessel function I1.
Gyoto::convert
void convert(double *const x, const std::size_t nelem, const double mass_sun, const double distance_kpc, const std::string unit)
Convert lengths (deprecated).
Gyoto::debug
int debug()
Get debug mode.
Gyoto::atof
double atof(const char *str)
Interpret C string as double.
Gyoto::bessk
double bessk(int nn, double xx)
Modified Bessel function.
Gyoto::cartesianToSpherical
void cartesianToSpherical(double const cpos[3], double spos[3])
Tranform from Cartesian 3-position to spherical 3-position.
Gyoto::help
void help(std::string class_name)
Print help on class.