Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/development' into feature-SplitMSSM
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander Voigt authored and Alexander Voigt committed Sep 12, 2015
2 parents f9ceb96 + e64916b commit 2acf439
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 0 deletions.
1 change: 1 addition & 0 deletions meta/FlexibleSUSY.m
Expand Up @@ -59,6 +59,7 @@
EDRbar;
ThetaWDRbar;
SCALE;
THRESHOLD;
UseHiggs2LoopNMSSM;
EffectiveMu;
EffectiveMASqr;
Expand Down
7 changes: 7 additions & 0 deletions src/wrappers.hpp
Expand Up @@ -479,6 +479,13 @@ std::string ToString(T a)
return boost::lexical_cast<std::string>(a);
}

/// step function (0 for x < 0, 1 otherwise)
template <typename T>
unsigned UnitStep(T x)
{
return x < T() ? 0 : 1;
}

inline double ZeroSqrt(double x)
{
return (x > 0.0 ? std::sqrt(x) : 0.0);
Expand Down
1 change: 1 addition & 0 deletions templates/two_scale_high_scale_constraint.cpp.in
Expand Up @@ -46,6 +46,7 @@ namespace flexiblesusy {
#define STANDARDDEVIATION(p) Electroweak_constants::Error_##p
#define Pole(p) model->get_physical().p
#define SCALE model->get_scale()
#define THRESHOLD static_cast<int>(model->get_thresholds())
#define MODEL model
#define MODELCLASSNAME @ModelName@<Two_scale>

Expand Down
1 change: 1 addition & 0 deletions templates/two_scale_low_scale_constraint.cpp.in
Expand Up @@ -50,6 +50,7 @@ namespace flexiblesusy {
#define CKM ckm
#define PMNS pmns
#define THETAW theta_w
#define THRESHOLD static_cast<int>(model->get_thresholds())
#define ALPHA_EM_DRBAR alpha_em_drbar
#define CALCULATE_DRBAR_MASSES() model->calculate_DRbar_masses()

Expand Down
1 change: 1 addition & 0 deletions templates/two_scale_susy_scale_constraint.cpp.in
Expand Up @@ -43,6 +43,7 @@ namespace flexiblesusy {
#define STANDARDDEVIATION(p) Electroweak_constants::Error_##p
#define Pole(p) model->get_physical().p
#define SCALE model->get_scale()
#define THRESHOLD static_cast<int>(model->get_thresholds())
#define MODEL model
#define MODELCLASSNAME @ModelName@<Two_scale>

Expand Down
11 changes: 11 additions & 0 deletions test/test_wrappers.cpp
Expand Up @@ -60,6 +60,17 @@ BOOST_AUTO_TEST_CASE( test_Delta )
BOOST_CHECK_EQUAL(Delta(-2,0), 0);
}

BOOST_AUTO_TEST_CASE( test_UnitStep )
{
BOOST_CHECK_EQUAL(UnitStep(-1 ), 0);
BOOST_CHECK_EQUAL(UnitStep(-2 ), 0);
BOOST_CHECK_EQUAL(UnitStep(-0.5), 0);
BOOST_CHECK_EQUAL(UnitStep(0 ), 1);
BOOST_CHECK_EQUAL(UnitStep(0.5 ), 1);
BOOST_CHECK_EQUAL(UnitStep(1 ), 1);
BOOST_CHECK_EQUAL(UnitStep(2 ), 1);
}

using namespace std;

DoubleMatrix random_real_matrix(int n, int m)
Expand Down

0 comments on commit 2acf439

Please sign in to comment.