Garfield++ 4.0
A toolkit for the detailed simulation of particle detectors based on ionisation measurement in gases and semiconductors
Loading...
Searching...
No Matches
Numerics.cc File Reference
#include <cmath>
#include <iostream>
#include <algorithm>
#include <numeric>
#include <array>
#include "Garfield/Numerics.hh"

Go to the source code of this file.

Namespaces

namespace  Garfield
 
namespace  Garfield::Numerics
 Collection of numerical routines.
 
namespace  Garfield::Numerics::QUADPACK
 
namespace  Garfield::Numerics::CERNLIB
 Linear algebra routines from CERNLIB.
 

Functions

void Garfield::Numerics::QUADPACK::qagi (std::function< double(double)> f, double bound, const int inf, const double epsabs, const double epsrel, double &result, double &abserr, unsigned int &status)
 
void Garfield::Numerics::QUADPACK::qk15i (std::function< double(double)> f, double bound, const int inf, const double a, const double b, double &result, double &abserr, double &resabs, double &resasc)
 
void Garfield::Numerics::QUADPACK::qk15 (std::function< double(double)> f, const double a, const double b, double &result, double &abserr, double &resabs, double &resasc)
 15-point Gauss-Kronrod integration with finite integration range.
 
int Garfield::Numerics::CERNLIB::deqn (const int n, std::vector< std::vector< double > > &a, std::vector< double > &b)
 
void Garfield::Numerics::CERNLIB::dfact (const int n, std::vector< std::vector< double > > &a, std::vector< int > &ir, int &ifail, double &det, int &jfail)
 
void Garfield::Numerics::CERNLIB::dfeqn (const int n, std::vector< std::vector< double > > &a, std::vector< int > &ir, std::vector< double > &b)
 
int Garfield::Numerics::CERNLIB::dinv (const int n, std::vector< std::vector< double > > &a)
 Replace square matrix A by its inverse.
 
void Garfield::Numerics::CERNLIB::dfinv (const int n, std::vector< std::vector< double > > &a, std::vector< int > &ir)
 
int Garfield::Numerics::CERNLIB::deqinv (const int n, std::vector< std::vector< double > > &a, std::vector< double > &b)
 Replaces b by the solution x of Ax = b, and replace A by its inverse.
 
void Garfield::Numerics::CERNLIB::cfact (const int n, std::vector< std::vector< std::complex< double > > > &a, std::vector< int > &ir, int &ifail, std::complex< double > &det, int &jfail)
 
void Garfield::Numerics::CERNLIB::cfinv (const int n, std::vector< std::vector< std::complex< double > > > &a, std::vector< int > &ir)
 
int Garfield::Numerics::CERNLIB::cinv (const int n, std::vector< std::vector< std::complex< double > > > &a)
 Replace square matrix A by its inverse.
 
double Garfield::Numerics::Divdif (const std::vector< double > &f, const std::vector< double > &a, int nn, double x, int mm)
 
bool Garfield::Numerics::Boxin2 (const std::vector< std::vector< double > > &value, const std::vector< double > &xAxis, const std::vector< double > &yAxis, const int nx, const int ny, const double xx, const double yy, double &f, const int iOrder)
 
bool Garfield::Numerics::Boxin3 (const std::vector< std::vector< std::vector< double > > > &value, const std::vector< double > &xAxis, const std::vector< double > &yAxis, const std::vector< double > &zAxis, const int nx, const int ny, const int nz, const double xx, const double yy, const double zz, double &f, const int iOrder)
 
bool Garfield::Numerics::LeastSquaresFit (std::function< double(double, const std::vector< double > &)> f, std::vector< double > &par, std::vector< double > &epar, const std::vector< double > &x, const std::vector< double > &y, const std::vector< double > &ey, const unsigned int nMaxIter, const double diff, double &chi2, const double eps, const bool debug, const bool verbose)
 Least-squares minimisation.