OPAL (Object Oriented Parallel Accelerator Library)  2021.1.99
OPAL
Classes | Functions
tanhderiv Namespace Reference

Classes

struct  my_f_params
 

Functions

double my_f (double x, void *p)
 
double integrate (const double &a, const double &s0, const double &lambdaleft, const double &lambdaright, const int &n)
 

Detailed Description


Integrate performs a contour integral to find the nth derivative of the
Tanh model fringe function. It uses Cauchy's integral formula to do so.


Class category: AbsBeamline
Author: Martin Duy Tat


Function Documentation

◆ integrate()

double tanhderiv::integrate ( const double &  a,
const double &  s0,
const double &  lambdaleft,
const double &  lambdaright,
const int &  n 
)

Perform Cauchy's integral to find derivative

Parameters
a-> Point of differentiation
s0-> Centre fringe length
lambdaleft-> Left fringe field length
lambdaright-> Left fringe field length
n-> nth derivative

Definition at line 66 of file tanhDeriv.cpp.

References a, my_f(), and Hypervolume::n.

Referenced by MultipoleTBase::getFringeDeriv(), and MultipoleT::getFringeDeriv().

Here is the call graph for this function:

◆ my_f()

double tanhderiv::my_f ( double  x,
void *  p 
)

Integrand

Parameters
x-> Independent parameter to be integrated
p-> Pointer to struct of parameters

Definition at line 48 of file tanhDeriv.cpp.

References tanhderiv::my_f_params::a, tanhderiv::my_f_params::lambdaleft, tanhderiv::my_f_params::lambdaright, tanhderiv::my_f_params::n, tanhderiv::my_f_params::r, and tanhderiv::my_f_params::s0.

Referenced by integrate().