Mantid
Loading...
Searching...
No Matches
Typedefs | Functions | Variables
Mantid::API::MuParserUtils Namespace Reference

Typedefs

using oneVarFun = double(*)(double)
 

Functions

void MANTID_API_DLL addDefaultConstants (mu::Parser &parser)
 Add a set of default constants to a muParser. More...
 
void MANTID_API_DLL extraOneVarFunctions (mu::Parser &parser)
 

Variables

const MANTID_API_DLL std::map< double, std::string > MUPARSER_CONSTANTS
 Defines convenience methods to be used with the muParser mathematical expression parser. More...
 
const MANTID_API_DLL std::map< std::string, oneVarFunMUPARSER_ONEVAR_FUNCTIONS = {{"erf", gsl_sf_erf}, {"erfc", gsl_sf_erfc}}
 

Typedef Documentation

◆ oneVarFun

typedef double(* Mantid::API::MuParserUtils::oneVarFun)(double)

Definition at line 29 of file MuParserUtils.h.

Function Documentation

◆ addDefaultConstants()

void MANTID_API_DLL Mantid::API::MuParserUtils::addDefaultConstants ( mu::Parser &  parser)

Add a set of default constants to a muParser.

The added constants are defined in MUPARSER_CONSTANTS.

Parameters
parserThe parser to be initialized.

Definition at line 42 of file MuParserUtils.cpp.

References MUPARSER_CONSTANTS.

◆ extraOneVarFunctions()

void MANTID_API_DLL Mantid::API::MuParserUtils::extraOneVarFunctions ( mu::Parser &  parser)

Definition at line 51 of file MuParserUtils.cpp.

References extraOneVarFunctions(), and MUPARSER_ONEVAR_FUNCTIONS.

Referenced by extraOneVarFunctions().

Variable Documentation

◆ MUPARSER_CONSTANTS

const std::map< double, std::string > Mantid::API::MuParserUtils::MUPARSER_CONSTANTS
Initial value:
= {
{AtomicMassUnit, "atomic_mass"},
{BoltzmannConstant, "k"},
{E_mev_toNeutronWavenumberSq, "meV_squared_wave_number_relationship"},
{h, "h"},
{h_bar, "hbar"},
{g, "g"},
{meV, "meV"},
{meVtoKelvin, "meV_kelvin_relationship"},
{meVtoWavenumber, "meV_wave_number_relationship"},
{MuonGyromagneticRatio, "muon_gyromagnetic_ratio"},
{MuonLifetime, "muon_life_time"},
{N_A, "N_A"},
{NeutronMass, "m_n"},
{NeutronMassAMU, "m_n_AMU"},
{M_PI, "pi"},
{StandardAtmosphere, "atm"}}

Defines convenience methods to be used with the muParser mathematical expression parser.

A map from constants to their muParser names.

Definition at line 21 of file MuParserUtils.cpp.

Referenced by addDefaultConstants().

◆ MUPARSER_ONEVAR_FUNCTIONS

const std::map< std::string, oneVarFun > Mantid::API::MuParserUtils::MUPARSER_ONEVAR_FUNCTIONS = {{"erf", gsl_sf_erf}, {"erfc", gsl_sf_erfc}}

Definition at line 49 of file MuParserUtils.cpp.

Referenced by extraOneVarFunctions().