Classes | Public Member Functions | Protected Member Functions | Protected Attributes | Private Attributes | List of all members
PLMD::switchContainers::leptonSwitch Class Reference
Inheritance diagram for PLMD::switchContainers::leptonSwitch:
Inheritance graph
[legend]

Classes

class  funcAndDeriv
 Lepton expression. More...
 

Public Member Functions

 leptonSwitch (double D0, double DMAX, double R0, const std::string &func)
 
double calculate (const double distance, double &dfunc) const override
 the driver for the function (prepares rdist or returns 1 or 0 automatically) More...
 
double calculateSqr (const double distance2, double &dfunc) const override
 
std::string description () const
 
double get_d0 () const
 
double get_dmax () const
 
double get_dmax2 () const
 
double get_r0 () const
 
void removeStretch ()
 
void setupStretch ()
 

Protected Member Functions

double function (const double, double &) const override
 
std::string specificDescription () const override
 

Protected Attributes

double d0 =0.0
 Minimum distance (before this, function is one) More...
 
double dmax =0.0
 Maximum distance (after this, function is zero) More...
 
double dmax_2 =0.0
 Square of dmax, useful in calculateSqr() More...
 
double invr0 =0.0
 We store the inverse to avoid a division. More...
 
double invr0_2 =0.0
 Square of invr0, useful in calculateSqr() More...
 
std::string mytype
 
double shift =0.0
 
double stretch =1.0
 Parameters for stretching the function to zero at d_max. More...
 

Private Attributes

std::vector< funcAndDerivexpressions {}
 
std::string lepton_func
 Function for lepton. More...
 
bool leptonx2 =false
 Set to true if lepton only uses x2. More...
 

Constructor & Destructor Documentation

◆ leptonSwitch()

PLMD::switchContainers::leptonSwitch::leptonSwitch ( double  D0,
double  DMAX,
double  R0,
const std::string &  func 
)
inline

Member Function Documentation

◆ calculate()

double PLMD::switchContainers::leptonSwitch::calculate ( const double  distance,
double &  dfunc 
) const
inlineoverridevirtual

the driver for the function (prepares rdist or returns 1 or 0 automatically)

Reimplemented from PLMD::switchContainers::baseSwitch.

◆ calculateSqr()

double PLMD::switchContainers::leptonSwitch::calculateSqr ( const double  distance2,
double &  dfunc 
) const
inlineoverridevirtual

◆ description()

std::string PLMD::switchContainers::baseSwitch::description ( ) const
inherited

◆ function()

double PLMD::switchContainers::leptonSwitch::function ( const double  ,
double &   
) const
inlineoverrideprotectedvirtual

◆ get_d0()

double PLMD::switchContainers::baseSwitch::get_d0 ( ) const
inherited

◆ get_dmax()

double PLMD::switchContainers::baseSwitch::get_dmax ( ) const
inherited

◆ get_dmax2()

double PLMD::switchContainers::baseSwitch::get_dmax2 ( ) const
inherited

◆ get_r0()

double PLMD::switchContainers::baseSwitch::get_r0 ( ) const
inherited

◆ removeStretch()

void PLMD::switchContainers::baseSwitch::removeStretch ( )
inherited

◆ setupStretch()

void PLMD::switchContainers::baseSwitch::setupStretch ( )
inherited

◆ specificDescription()

std::string PLMD::switchContainers::leptonSwitch::specificDescription ( ) const
inlineoverrideprotectedvirtual

Member Data Documentation

◆ d0

double PLMD::switchContainers::baseSwitch::d0 =0.0
protectedinherited

Minimum distance (before this, function is one)

◆ dmax

double PLMD::switchContainers::baseSwitch::dmax =0.0
protectedinherited

Maximum distance (after this, function is zero)

◆ dmax_2

double PLMD::switchContainers::baseSwitch::dmax_2 =0.0
protectedinherited

Square of dmax, useful in calculateSqr()

◆ expressions

std::vector<funcAndDeriv> PLMD::switchContainers::leptonSwitch::expressions {}
private
Warning
Since lepton::CompiledExpression is mutable, a vector is necessary for multithreading!

◆ invr0

double PLMD::switchContainers::baseSwitch::invr0 =0.0
protectedinherited

We store the inverse to avoid a division.

◆ invr0_2

double PLMD::switchContainers::baseSwitch::invr0_2 =0.0
protectedinherited

Square of invr0, useful in calculateSqr()

◆ lepton_func

std::string PLMD::switchContainers::leptonSwitch::lepton_func
private

Function for lepton.

◆ leptonx2

bool PLMD::switchContainers::leptonSwitch::leptonx2 =false
private

Set to true if lepton only uses x2.

◆ mytype

std::string PLMD::switchContainers::baseSwitch::mytype
protectedinherited

◆ shift

double PLMD::switchContainers::baseSwitch::shift =0.0
protectedinherited

◆ stretch

double PLMD::switchContainers::baseSwitch::stretch =1.0
protectedinherited

Parameters for stretching the function to zero at d_max.


The documentation for this class was generated from the following file: