OPAL (Object Oriented Parallel Accelerator Library) 2024.2
OPAL
tanhderiv Namespace Reference

Classes

struct  my_f_params
 

Functions

double my_f (double x, void *p)
 Integrand. More...
 
double integrate (const double &a, const double &s0, const double &lambdaleft, const double &lambdaright, const int &n)
 Perform Cauchy's integral to find derivative. More...
 

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:
Collaboration graph
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 a, my_f(), and Hypervolume::n.

Referenced by 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().