OPALX (Object Oriented Parallel Accelerator Library for Exascal) MINIorX
OPALX
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



Class Documentation

◆ tanhderiv::my_f_params

struct tanhderiv::my_f_params

Definition at line 39 of file tanhDeriv.cpp.

Collaboration diagram for tanhderiv::my_f_params:
Class Members
double a
double lambdaleft
double lambdaright
int n
double r
double s0

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 my_f().

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

Here is the call graph for this function:
Here is the caller 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().

Here is the caller graph for this function: