BSMPT 3.0.7
BSMPT - Beyond the Standard Model Phase Transitions : A C++ package for the computation of the EWPT in BSM models
Loading...
Searching...
No Matches
Minimizer.h File Reference
#include <BSMPT/config.h>
#include <BSMPT/models/IncludeAllModels.h>
#include <memory>
#include <thread>
#include <vector>

Go to the source code of this file.

Classes

struct  BSMPT::Minimizer::MinimizersToUse
 The MinimizersToUse struct used as a return of GetMinimizers. More...
 
struct  BSMPT::Minimizer::EWPTReturnType
 The EWPTReturnType struct Contains the following information. More...
 

Namespaces

namespace  BSMPT
 This classes calculates the Bounce action of the potential with a set temperature.
 

Enumerations

enum class  BSMPT::Minimizer::MinimizerStatus {
  SUCCESS = 1 , NOTVANISHINGATFINALTEMP = -1 , NOTNLOSTABLE = -2 , NUMERICALLYUNSTABLE = -3 ,
  BELOWTHRESHOLD = -4 , NLOVEVZEROORINF = -5
}
 The MinimizerStatus enum for the Statusflags of the minimizer.
 

Functions

constexpr int BSMPT::Minimizer::CalcWhichMinimizer (bool UseGSL=UseGSLDefault, bool UseCMAES=UseLibCMAESDefault, bool UseNLopt=UseNLoptDefault)
 CalcWhichMinimizer Calculates the WhichMinimizer value with the given Minimizer options.
 
MinimizersToUse BSMPT::Minimizer::GetMinimizers (int WhichMinimizer)
 GetMinimizers returns a struct containing the bools deciding which minimizers should be used or not.
 
std::vector< double > BSMPT::Minimizer::Minimize_gen_all (const std::shared_ptr< Class_Potential_Origin > &modelPointer, const double &Temp, std::vector< double > &Check, const std::vector< double > &start, const int &WhichMinimizer=WhichMinimizerDefault, bool UseMultithreading=true)
 Minimization of the Model Minimizes the given Potential with parameters par and CT-parameters parCT at a given Temperature Temp and writes the solution in the std::vector sol. The Minimization Debugging Options are written in the std::vector Check. The std::vector Start gives the start value for the CMA-ES Minimization.
 
EWPTReturnType BSMPT::Minimizer::PTFinder_gen_all (const std::shared_ptr< Class_Potential_Origin > &modelPointer, const double &TempStart, const double &TempEnd, const int &WhichMinimizer=WhichMinimizerDefault, bool UseMultithreading=true)
 
std::vector< double > BSMPT::Minimizer::Minimize_gen_all_tree_level (const ModelID::ModelIDs &Model, const std::vector< double > &par, const std::vector< double > &parCT, std::vector< double > &Check, const std::vector< double > &start, int WhichMinimizer=WhichMinimizerDefault, bool UseMultithreading=true)
 Minimize_gen_all_tree_level Minimizes the tree-level potential.
 
std::vector< double > BSMPT::Minimizer::Minimize_gen_all_tree_level (const ModelID::ModelIDs &Model, const std::vector< double > &par, const std::vector< double > &parCT, const ISMConstants &SMConstants, std::vector< double > &Check, const std::vector< double > &start, int WhichMinimizer=WhichMinimizerDefault, bool UseMultithreading=true)
 Minimize_gen_all_tree_level Minimizes the tree-level potential.
 
std::vector< std::vector< double > > BSMPT::Minimizer::FindNextLocalMinima (const std::shared_ptr< Class_Potential_Origin > &model, const std::vector< double > &StartingPoint, const double &temperature, int WhichMinimizer=WhichMinimizerDefault)
 FindNextLocalMinima finds the local minima from the given starting point at the given temperature.
 
std::vector< std::vector< std::pair< double, std::vector< double > > > > BSMPT::Minimizer::MinimaDevelopmentWithTemperature (const std::shared_ptr< Class_Potential_Origin > &model, const double &StartingTemperature, const double &FinalTemperature, const double &StepsizeTemperature, const std::vector< std::pair< double, double > > &RNGRanges, const std::size_t &seed, const std::size_t &NumberOfStartingPoints, const int &WhichMinimizer)
 MinimaDevelopmentWithTemperature calculates the temperature development of several local minima.
 

Variables

const bool BSMPT::Minimizer::UseGSLDefault = true
 UseGSLDefault Use the GSL minimizer in the default settings.
 
const bool BSMPT::Minimizer::UseLibCMAESDefault = false
 UseLibCMAESDefault Use the Libcmaes minimizer in the default settings.
 
const bool BSMPT::Minimizer::UseNLoptDefault = false
 UseNLoptDefault Use the NLopt minimizer in the default settings.
 
const std::size_t BSMPT::Minimizer::Num_threads = std::thread::hardware_concurrency()
 
constexpr int BSMPT::Minimizer::WhichMinimizerDefault = CalcWhichMinimizer()
 WhichMinimizerDefault default value for the Minimizers to use.
 

Function Documentation

◆ CalcWhichMinimizer()

constexpr int BSMPT::Minimizer::CalcWhichMinimizer ( bool  UseGSL = UseGSLDefault,
bool  UseCMAES = UseLibCMAESDefault,
bool  UseNLopt = UseNLoptDefault 
)
constexpr

CalcWhichMinimizer Calculates the WhichMinimizer value with the given Minimizer options.

Parameters
UseGSLShould GSL be used?
UseCMAESShould CMAES be used?
UseNLoptShould NLopt be used?
Returns

◆ FindNextLocalMinima()

std::vector< std::vector< double > > BSMPT::Minimizer::FindNextLocalMinima ( const std::shared_ptr< Class_Potential_Origin > &  model,
const std::vector< double > &  StartingPoint,
const double &  temperature,
int  WhichMinimizer = WhichMinimizerDefault 
)

FindNextLocalMinima finds the local minima from the given starting point at the given temperature.

Parameters
modelParameter point to minimize
StartingPointStarting point from where to look for the next local minima
temperatureTemperature at which to minimize the potential
WhichMinimizerWhich Minimizer should be used? CMAES is not used here as it is only a global minimizer
Returns
A vector containing the local minima. In case different Minima find different minima all solutions are given.

◆ GetMinimizers()

MinimizersToUse BSMPT::Minimizer::GetMinimizers ( int  WhichMinimizer)

GetMinimizers returns a struct containing the bools deciding which minimizers should be used or not.

Parameters
WhichMinimizer
Returns

◆ MinimaDevelopmentWithTemperature()

std::vector< std::vector< std::pair< double, std::vector< double > > > > BSMPT::Minimizer::MinimaDevelopmentWithTemperature ( const std::shared_ptr< Class_Potential_Origin > &  model,
const double &  StartingTemperature,
const double &  FinalTemperature,
const double &  StepsizeTemperature,
const std::vector< std::pair< double, double > > &  RNGRanges,
const std::size_t &  seed,
const std::size_t &  NumberOfStartingPoints,
const int &  WhichMinimizer 
)

MinimaDevelopmentWithTemperature calculates the temperature development of several local minima.

Parameters
modelThe used model and parameter point
StartingTemperatureThe first temperature at which to calculate the local minima from the random points
FinalTemperatureThe final temperature for the temperature development
StepsizeTemperatureThe stepsize for the temperature development
RNGRangesThe ranges for the RNG generated starting point at StartingTemperature
seedThe seed used for the RNG
NumberOfStartingPointsHow many RNG points should be generated
WhichMinimizerWhich minimizers should be used?
Returns
List of Minima development, each member being a list for one point with the entries <Temperature, Minimum>

◆ Minimize_gen_all_tree_level() [1/2]

std::vector< double > BSMPT::Minimizer::Minimize_gen_all_tree_level ( const ModelID::ModelIDs Model,
const std::vector< double > &  par,
const std::vector< double > &  parCT,
const ISMConstants SMConstants,
std::vector< double > &  Check,
const std::vector< double > &  start,
int  WhichMinimizer = WhichMinimizerDefault,
bool  UseMultithreading = true 
)

Minimize_gen_all_tree_level Minimizes the tree-level potential.

Parameters
ModelWhich Model to minimize
parparameters of the point
parCTcounterterm parameters
SMConstantsThe SM Constants used for the minimisation
CheckVector to safe the error flags during the minimization
startStarting point for the minimization
WhichMinimizerWhich minimizers should be taken? 1 = CMAES, 2 = GSL, 4 = NLOPT, to use multiple add the numbers
Returns
the global minimum

◆ Minimize_gen_all_tree_level() [2/2]

std::vector< double > BSMPT::Minimizer::Minimize_gen_all_tree_level ( const ModelID::ModelIDs Model,
const std::vector< double > &  par,
const std::vector< double > &  parCT,
std::vector< double > &  Check,
const std::vector< double > &  start,
int  WhichMinimizer = WhichMinimizerDefault,
bool  UseMultithreading = true 
)

Minimize_gen_all_tree_level Minimizes the tree-level potential.

Parameters
ModelWhich Model to minimize
parparameters of the point
parCTcounterterm parameters
CheckVector to safe the error flags during the minimization
startStarting point for the minimization
WhichMinimizerWhich minimizers should be taken? 1 = CMAES, 2 = GSL, 4 = NLOPT, to use multiple add the numbers
Returns
the global minimum

◆ PTFinder_gen_all()

EWPTReturnType BSMPT::Minimizer::PTFinder_gen_all ( const std::shared_ptr< Class_Potential_Origin > &  modelPointer,
const double &  TempStart,
const double &  TempEnd,
const int &  WhichMinimizer = WhichMinimizerDefault,
bool  UseMultithreading = true 
)

Uses a bisection method between the Temperature TempStart and TempEnde to find the phase transition in the Model and writes the solution in the vector sol.

Parameters
modelPointershared_ptr to the parameter point
TempStartLow temperature for the starting interval of the bisection method
TempEndHigh temperature for the starting interval of the bisection method
WhichMinimizerWhich minimizers should be taken? 1 = CMAES, 2 = GSL, 4 = NLOPT, to use multiple add the numbers
Returns
The information are returned in a EWPTReturnType struct