diff --git a/.gitattributes b/.gitattributes index aefc904b6..98107f318 100644 --- a/.gitattributes +++ b/.gitattributes @@ -58,8 +58,6 @@ model_files/SMtower export-ignore models/fmssm export-ignore models/fmssmn export-ignore -models/sm export-ignore -models/smcw export-ignore models/SoftsusyMSSM export-ignore models/SoftsusyNMSSM export-ignore models/SoftsusyFlavourMSSM export-ignore diff --git a/.gitignore b/.gitignore index a9c569db4..8c61f218d 100644 --- a/.gitignore +++ b/.gitignore @@ -57,8 +57,6 @@ models/fmssmn/fmssmn_lattice_rge.f models/fmssmn/fmssmn_lattice_translator.inc models/*/LesHouches.out.* models/**/ -!models/sm/ -!models/smcw/ !models/SoftsusyMSSM/ !models/SoftsusyNMSSM/ !models/SoftsusyFlavourMSSM/ diff --git a/ChangeLog b/ChangeLog index 3686acaa9..b9d73f397 100644 --- a/ChangeLog +++ b/ChangeLog @@ -96,6 +96,19 @@ FlexibleSUSY-1.7.3 [not released yet] function recalculate_mw_pole(). This bug was only present if the W pole mass is used as input (not GF). + * Bugfix (commit bd5ee68): Correctly handle whitespace in directory + names inside the configure script and search for headers in $CPATH + and $CPLUS_INCLUDE_PATH . + Thanks to Joshua Ellis. + + * Bugfix (commit bc770ae): Ensure that phase of (complex) mu + parameter has magnitude 1 in the CMSSMCPV. + Thanks to Jobst Ziebell. + + * Bugfix (commit beb4683): Accept SLHA output blocks specified as + strings (not symbols). + Thanks to Joshua Ellis. + FlexibleSUSY-1.7.2 [December, 15 2016] * Feature (commit b052e35): New flag FlexibleSUSY[23] to disable the diff --git a/configure b/configure index fad3fd01a..a5c810351 100755 --- a/configure +++ b/configure @@ -27,10 +27,9 @@ DATE=$(date 2>/dev/null || echo unknown) # platform information debmultiarch="" -# default library directories -ld_library_path=$(echo "${LD_LIBRARY_PATH}" | tr ':' ' ') -default_lib_paths="${ld_library_path} /usr/lib /usr/local/lib" -default_inc_paths="/usr/include /usr/local/include" +# default library and include directories +default_lib_paths="$LD_LIBRARY_PATH:/usr/lib:/usr/local/lib" +default_inc_paths="$CPATH:$CPLUS_INCLUDE_PATH:/usr/include:/usr/local/include" # configure log file logfile="$BASEDIR/config.log" @@ -358,7 +357,7 @@ contains_not() { #_____________________________________________________________________ check_library() { # This function will try to locate a library [$1] in the directory - # given in $2 or in a default path [$*]. + # given in $2 or in a default path [$3]. # # The result of the search is stored in found_lib and found_dir, # which should be immediately copied, since the variables value will @@ -368,12 +367,15 @@ check_library() { if test $# -lt 3 ; then echo "check_library: Too few arguments" return 1 + elif test $# -gt 3 ; then + echo "check_library: Too many arguments. Default path should be colon-separated." + return 1 fi # Save arguments in local names - lib=$1 ; shift - libdirl=$1 - libdirs="$*" + lib="$1" + libdirl="$2" + libdirs="$3" # check if we got a specific argument as to where the library # is to be found if test ! "x$libdirl" = "x" ; then @@ -394,26 +396,37 @@ check_library() { found_lib="" if test "x$machine_word_size" = "x64"; then - for p in ${libdirs}; do + IFS=":" + for p in $libdirs; do + unset IFS libdir64=$(echo "$p" | grep lib | sed -e 's|lib$|lib64|g' -e 's|lib/|lib64/|g') - libdirs="$libdirs $libdir64" - done + libdirs="$libdirs:$libdir64" + done + unset IFS fi if test "x$machine_word_size" = "x32"; then - for p in ${libdirs}; do + IFS=":" + for p in $libdirs; do + unset IFS libdir32=$(echo "$p" | grep lib | sed -e 's|lib$|lib32|g' -e 's|lib/|lib32/|g') - libdirs="$libdirs $libdir32" - done + libdirs="$libdirs:$libdir32" + done + unset IFS fi # look first in the DEB_HOST_MULTIARCH directories if test "x$debmultiarch" != "x" ; then - for p in ${libdirs}; do + IFS=":" + for p in $libdirs; do + unset IFS multiarch_libdir=$(echo "$p" | sed "s|lib$|lib/$debmultiarch|") - libdirs="$multiarch_libdir $libdirs" - done + libdirs="$multiarch_libdir:$libdirs" + done + unset IFS fi - for p in ${libdirs}; do + IFS=":" + for p in $libdirs; do + unset IFS for l in ${libs}; do liblist=$(echo $p/$l) # expands wildcard for n in ${liblist} ; do @@ -425,6 +438,7 @@ check_library() { done done done + unset IFS if test "x$found_dir" = "x" || test "x$found_lib" = "x" ; then result "not found in $libdirs" @@ -439,7 +453,7 @@ check_library() { #_____________________________________________________________________ check_header() { # This function will try to locate a header file [$1] in the - # directory given in $2 or in a default path [$*]. + # directory given in $2 or in a default path [$3]. # # The result of the search is stored in found_hdr and found_dir, # which should be immediately copied, since the variables value @@ -449,11 +463,14 @@ check_header() { if test $# -lt 2 ; then echo "check_header: Too few arguments" return 1 + elif test $# -gt 3 ; then + echo "check_header: Too many arguments. The default paths should be colon-separated." + return 1 fi # Save arguments in local names - hdr=$1 ; shift - hdrdirl=$1 + hdr="$1" ; shift + hdrdirl="$1" hdrdirs="$*" # check if we got a specific argument as to where the library # is to be found @@ -474,7 +491,9 @@ check_header() { found_dir="" found_hdr="" - for p in ${hdrdirs}; do + IFS=":" + for p in $hdrdirs; do + unset IFS for h in ${hdrs}; do hdrlist=$(echo $p/$h) # expands wildcard for n in ${hdrlist} ; do @@ -486,6 +505,7 @@ check_header() { done done done + unset IFS if test "x$found_dir" = "x" || test "x$found_hdr" = "x" ; then result "not found in $hdrdirs" @@ -1047,14 +1067,20 @@ check_platform() { logmsg "Machine word size: ${machine_word_size}" logmsg "" - for p in $(echo "$PATH" | tr ':' ' '); do + IFS=":" + for p in $PATH; do + unset IFS logmsg "PATH: ${p}" done + unset IFS logmsg "" - for p in ${ld_library_path}; do + IFS=":" + for p in $ld_library_path; do + unset IFS logmsg "LD_LIBRARY_PATH: ${p}" done + unset IFS logmsg "" operating_system=$( (uname -s) 2>/dev/null || echo unknown) @@ -1513,8 +1539,14 @@ check_cxxflags() { #_____________________________________________________________________ check_eigen_incl() { - eigen_inc_paths="$default_inc_paths /usr/include/eigen3 \ - /usr/local/include/eigen3" + # Eigen headers are usually in the `eigen3` subdirectory of the include paths. + eigen_inc_paths="" + IFS=":" + for inc_path in $default_inc_paths; do + unset IFS + eigen_inc_paths="$eigen_inc_paths:$inc_path/eigen3:$inc_path" + done + unset IFS check_header "Eigen/Core" "$eigen_inc_dir" "$eigen_inc_paths" if test "x$found_hdr" = "x" ; then message "Error: Eigen 3 must be installed, see http://eigen.tuxfamily.org" @@ -1617,7 +1649,7 @@ check_fortran_libs() { case "$FC" in gfortran*) - gfortran_lib_search_paths=$(${FC} -print-search-dirs | sed -n -e '/libraries:/s/libraries: *=//p' | tr ':' ' ') + gfortran_lib_search_paths=$(${FC} -print-search-dirs | sed -n -e '/libraries:/s/libraries: *=//p') check_library "libgfortran" "$gfortran_lib_search_paths" "$default_lib_paths" if test "x$found_lib" = "x" ; then message "Error: libgfortran not found in $gfortran_lib_search_paths $default_lib_paths" diff --git a/meta/WriteOut.m b/meta/WriteOut.m index c4d13a5ad..39ba6ba4c 100644 --- a/meta/WriteOut.m +++ b/meta/WriteOut.m @@ -664,7 +664,7 @@ "}\n" ]; -ReadSLHAPhysicalMixingMatrixBlock[{parameter_, blockName_Symbol}, struct_String:"PHYSICAL", defMacro_String:"DEFINE_PHYSICAL_PARAMETER"] := +ReadSLHAPhysicalMixingMatrixBlock[{parameter_, blockName_}, struct_String:"PHYSICAL", defMacro_String:"DEFINE_PHYSICAL_PARAMETER"] := Module[{paramStr, blockNameStr}, paramStr = CConversion`ToValidCSymbolString[parameter]; blockNameStr = ToString[blockName]; diff --git a/models/sm/module.mk b/models/sm/module.mk deleted file mode 100644 index 732b6c3e2..000000000 --- a/models/sm/module.mk +++ /dev/null @@ -1,42 +0,0 @@ -DIR := models/sm -MODNAME := sm -WITH_$(MODNAME) := sm - -LIBsm_SRC := - -ifneq ($(findstring two_scale,$(SOLVERS)),) -LIBsm_SRC += \ - $(DIR)/sm_two_scale.cpp \ - $(DIR)/sm_two_scale_convergence_tester.cpp \ - $(DIR)/sm_two_scale_experimental_constraint.cpp -endif - -LIBsm_OBJ := \ - $(patsubst %.cpp, %.o, $(filter %.cpp, $(LIBsm_SRC))) \ - $(patsubst %.f, %.o, $(filter %.f, $(LIBsm_SRC))) - -LIBsm_DEP := \ - $(LIBsm_OBJ:.o=.d) - -LIBsm := $(DIR)/lib$(MODNAME)$(MODULE_LIBEXT) - -.PHONY: all-$(MODNAME) clean-$(MODNAME) distclean-$(MODNAME) - -all-$(MODNAME): $(LIBsm) - -clean-$(MODNAME): - rm -rf $(LIBsm_OBJ) - -distclean-$(MODNAME): clean-$(MODNAME) - rm -rf $(LIBsm_DEP) - rm -rf $(LIBsm) - -clean:: clean-$(MODNAME) - -distclean:: distclean-$(MODNAME) - -$(LIBsm): $(LIBsm_OBJ) - $(MODULE_MAKE_LIB_CMD) $@ $^ - -ALLDEP += $(LIBsm_DEP) -ALLLIB += $(LIBsm) diff --git a/models/sm/sm.hpp b/models/sm/sm.hpp deleted file mode 100644 index 8bc62746b..000000000 --- a/models/sm/sm.hpp +++ /dev/null @@ -1,29 +0,0 @@ -// ==================================================================== -// This file is part of FlexibleSUSY. -// -// FlexibleSUSY is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published -// by the Free Software Foundation, either version 3 of the License, -// or (at your option) any later version. -// -// FlexibleSUSY is distributed in the hope that it will be useful, but -// WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with FlexibleSUSY. If not, see -// . -// ==================================================================== - -#ifndef SM_H -#define SM_H - -namespace flexiblesusy { - -template -class StandardModel; - -} - -#endif diff --git a/models/sm/sm_two_scale.cpp b/models/sm/sm_two_scale.cpp deleted file mode 100644 index 9104dcb37..000000000 --- a/models/sm/sm_two_scale.cpp +++ /dev/null @@ -1,275 +0,0 @@ -// ==================================================================== -// This file is part of FlexibleSUSY. -// -// FlexibleSUSY is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published -// by the Free Software Foundation, either version 3 of the License, -// or (at your option) any later version. -// -// FlexibleSUSY is distributed in the hope that it will be useful, but -// WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with FlexibleSUSY. If not, see -// . -// ==================================================================== - -#include "sm_two_scale.hpp" -#include "error.hpp" - -#include - -using namespace softsusy; - -namespace flexiblesusy { - -StandardModel::StandardModel() - : yu(3, 3), yd(3, 3), ye(3, 3), g(3) - , precision(1.0e-3) -{ - setPars(numStandardModelPars); - setMu(0.0); - setLoops(1); - setThresholds(0); -} - -StandardModel::StandardModel(const StandardModel& s) - : yu(s.yu), yd(s.yd), ye(s.ye), g(s.g) -{ - setPars(numStandardModelPars); - setMu(s.displayMu()); - setLoops(s.displayLoops()); - setThresholds(s.displayThresholds()); -} - -StandardModel::StandardModel(const DoubleMatrix& SMu, const DoubleMatrix& SMd, - const DoubleMatrix& SMe, const DoubleVector& g_) - : yu(SMu), yd(SMd), ye(SMe), g(g_) -{ - setPars(numStandardModelPars); - setMu(0.0); - setLoops(1); - setThresholds(0); -} - -StandardModel::~StandardModel() -{ -} - -void StandardModel::run_to(double scale, double eps) -{ - if (eps < 0.0) - eps = precision; - if (RGE::runto(scale, eps)) - throw NonPerturbativeRunningError(scale); -} - -const StandardModel& StandardModel::operator=(const StandardModel& s) -{ - if (this == &s) return *this; - yu = s.yu; - yd = s.yd; - ye = s.ye; - g = s.g; - setMu(s.displayMu()); - setLoops(s.displayLoops()); - setThresholds(s.displayThresholds()); - return *this; -} - -void StandardModel::setGaugeCoupling(int i, double f) -{ - g(i) = f; -} - -void StandardModel::setAllGauge(const DoubleVector& v) -{ - assert(v.displayStart() == 1 && v.displayEnd() == 3); - g = v; -} - -DoubleVector StandardModel::displayGauge() const -{ - return g; -} - -double StandardModel::displayGaugeCoupling(int i) const -{ - return g.display(i); -} - -void StandardModel::setYukawaElement(yukawa k, int i, int j, double f) -{ - switch (k) { - case YU: - yu(i, j) = f; - break; - case YD: - yd(i, j) = f; - break; - case YE: - ye(i, j) = f; - break; - default: - assert(false && "StandardModel::setYukawaElement called with illegal k"); - break; - } -} - -void StandardModel::setYukawaMatrix(yukawa k, const DoubleMatrix& m) -{ - switch (k) { - case YU: - yu = m; - break; - case YD: - yd = m; - break; - case YE: - ye = m; - break; - default: - assert(false && "StandardModel::setYukawaMatrix called with illegal k"); - break; - } -} - -double StandardModel::displayYukawaElement(yukawa k, int i, int j) const -{ - switch (k) { - case YU: - return yu.display(i, j); - break; - case YD: - return yd.display(i, j); - break; - case YE: - return ye.display(i, j); - break; - default: - assert(false && "StandardModel::displayYukawaElement called with illegal k"); - break; - } - return 0.0; -} - -DoubleMatrix StandardModel::displayYukawaMatrix(yukawa k) const -{ - switch (k) { - case YU: - return yu; - break; - case YD: - return yd; - break; - case YE: - return ye; - break; - default: - assert(false && "StandardModel::displayYukawaMatrix called with illegal k"); - break; - } -} - -//Peter:: edited to include new Essm parameters - -const DoubleVector StandardModel::display() const -{ - DoubleVector y(numStandardModelPars); - int i, j, k = 0; - for (i = 1; i <= 3; i++) - for (j = 1; j <= 3; j++) { - k++; - y(k) = yu.display(i, j); - y(k + 9) = yd.display(i, j); - y(k + 18) = ye.display(i, j); - } - k = 27; - for (i = 1; i <= 3; i++) { - k++; - y(k) = g.display(i); - } - - return y; -} -//Peter:: edited to include new Essm parameters - -void StandardModel::set(const DoubleVector& y) -{ - int i, j, k = 0; - for (i = 1; i <= 3; i++) - for (j = 1; j <= 3; j++) { - k++; - yu(i, j) = y.display(k); - yd(i, j) = y.display(k + 9); - ye(i, j) = y.display(k + 18); - } - k = 27; - for (i = 1; i <= 3; i++) { - k++; - g(i) = y.display(k); - } -} - -std::ostream& operator <<(std::ostream& left, const StandardModel& s) -{ - left << "SM parameters at Q: " << s.get_scale() - << '\n' - << " Y^U" << s.displayYukawaMatrix(StandardModel::YU) - << " Y^D" << s.displayYukawaMatrix(StandardModel::YD) - << " Y^E" << s.displayYukawaMatrix(StandardModel::YE) - << '\n' - << " g1: " << s.displayGaugeCoupling(1) - << " g2: " << s.displayGaugeCoupling(2) - << " g3: " << s.displayGaugeCoupling(3) - << '\n' - << " thresholds: " << s.displayThresholds() - << " #loops: " << s.displayLoops() << '\n'; - return left; -} - -// Outputs derivatives (DRbar scheme) in the form of ds -StandardModel StandardModel::calc_beta() const -{ - static const double oneO16Pisq = 1.0 / (16.0 * PI * PI); - DoubleMatrix dyu(3, 3), dyd(3, 3), dye(3, 3); - DoubleVector dg(3); - - dyu(3, 3) = oneO16Pisq * yu.display(3, 3) * ( - -17.0 / 20.0 * sqr(displayGaugeCoupling(1)) - - 9.0 / 4.0 * sqr(displayGaugeCoupling(2)) - - 8.0 * sqr(displayGaugeCoupling(3)) - + 4.5 * sqr(yu.display(3, 3)) - + 1.5 * sqr(yd.display(3, 3)) - + sqr(ye.display(3, 3))); - - dyd(3, 3) = oneO16Pisq * yd.display(3, 3) * ( - -0.25 * sqr(displayGaugeCoupling(1)) - - 9.0 / 4.0 * sqr(displayGaugeCoupling(2)) - - 8.0 * sqr(displayGaugeCoupling(3)) - + 1.5 * sqr(yu.display(3, 3)) - + 4.5 * sqr(yd.display(3, 3)) - + sqr(ye.display(3, 3))); - - dye(3, 3) = oneO16Pisq * ye.display(3, 3) * ( - -9.0 / 4.0 * sqr(displayGaugeCoupling(1)) - -9.0 / 4.0 * sqr(displayGaugeCoupling(2)) - + 3.0 * sqr(yu.display(3, 3)) - + 3.0 * sqr(yd.display(3, 3)) - + 2.5 * sqr(ye.display(3, 3))); - - dg(1) = oneO16Pisq * std::pow(displayGaugeCoupling(1), 3) * (41.0 / 10.0); - dg(2) = oneO16Pisq * std::pow(displayGaugeCoupling(2), 3) * (-19.0 / 6.0); - dg(3) = oneO16Pisq * std::pow(displayGaugeCoupling(3), 3) * (-7.0); - - return StandardModel(dyu, dyd, dye, dg); -} - -DoubleVector StandardModel::beta() const -{ - return calc_beta().display(); -} - -} diff --git a/models/sm/sm_two_scale.hpp b/models/sm/sm_two_scale.hpp deleted file mode 100644 index f4b0eeffa..000000000 --- a/models/sm/sm_two_scale.hpp +++ /dev/null @@ -1,105 +0,0 @@ -// ==================================================================== -// This file is part of FlexibleSUSY. -// -// FlexibleSUSY is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published -// by the Free Software Foundation, either version 3 of the License, -// or (at your option) any later version. -// -// FlexibleSUSY is distributed in the hope that it will be useful, but -// WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with FlexibleSUSY. If not, see -// . -// ==================================================================== - -#ifndef SM_TWO_SCALE_H -#define SM_TWO_SCALE_H - -#include "rge.h" -#include "linalg.h" -#include "model.hpp" -#include "sm.hpp" - -#include - -namespace flexiblesusy { - -class Two_scale; - -/// Formatted output -std::ostream& operator <<(std::ostream&, const StandardModel&); - -template<> -class StandardModel: public Model, protected softsusy::RGE { -private: - softsusy::DoubleMatrix yu, yd, ye; ///< Yukawa matrices for ups, downs and leptons - softsusy::DoubleVector g; ///< Gauge couplings (g1 = sqrt(5/3) g_Y) - double precision; - -public: - const static int numStandardModelPars = 3 * 3 * 3 + 3; - typedef enum {YU = 1, YD, YE} yukawa; - - StandardModel(); - StandardModel(const StandardModel&); - StandardModel(const softsusy::DoubleMatrix& yu, const softsusy::DoubleMatrix& yd, - const softsusy::DoubleMatrix& ye, const softsusy::DoubleVector& g); - - virtual ~StandardModel(); - - virtual void calculate_spectrum() {} - virtual void clear_problems() {} - virtual std::string name() const { return "SM"; } - virtual void run_to(double scale, double eps = -1.0); - virtual void print(std::ostream& s) const { s << *this; } - virtual void set_precision(double p) { precision = p; } - - /// sets object to be equal to another - const StandardModel & operator=(const StandardModel& s); - - void calculate_DRbar_masses() {} - - /// Sets Yukawa matrix element - void setYukawaElement(yukawa, int, int, double); - /// Sets whole Yukawa matrix - void setYukawaMatrix(yukawa, const softsusy::DoubleMatrix&); - /// Set a single gauge coupling - virtual void setGaugeCoupling(int, double); - /// Set all gauge couplings - virtual void setAllGauge(const softsusy::DoubleVector&); - /// Sets renormalisation scale - void setScale(double mu) { RGE::setMu(mu); } - - /// Returns a single Yukawa matrix element - double displayYukawaElement(yukawa, int, int) const; - /// Returns a whole Yukawa matrix - softsusy::DoubleMatrix displayYukawaMatrix(yukawa) const; - /// Returns a single gauge coupling - virtual double displayGaugeCoupling(int) const; - /// Returns all gauge couplings - virtual softsusy::DoubleVector displayGauge() const; - /// Return renomalisation scale - double get_scale() const { return RGE::displayMu(); } - /// Return number of loops - int displayLoops() const { return RGE::displayLoops(); } - /// Return level of threshold approximation - int displayThresholds() const { return RGE::displayThresholds(); } - /// Calculate beta functions - StandardModel calc_beta() const; - -protected: - /// Sets all RGE parameters to elements of vector - virtual void set(const softsusy::DoubleVector&); - /// Returns all parameters as elements of a vector - virtual const softsusy::DoubleVector display() const; - /// Calculate beta functions - virtual softsusy::DoubleVector beta() const; -}; - -} - -#endif diff --git a/models/sm/sm_two_scale_convergence_tester.cpp b/models/sm/sm_two_scale_convergence_tester.cpp deleted file mode 100644 index b97a74faf..000000000 --- a/models/sm/sm_two_scale_convergence_tester.cpp +++ /dev/null @@ -1,29 +0,0 @@ - -#include "sm_two_scale_convergence_tester.hpp" -#include - -namespace flexiblesusy { - -StandardModel_convergence_tester::StandardModel_convergence_tester(StandardModel* sm_) - : Convergence_tester() - , sm(sm_) -{ - assert(sm && "pointer to StandardModel must not be zero"); -} - -StandardModel_convergence_tester::~StandardModel_convergence_tester() -{ -} - -/** - * Returns allways true, because the Standard Model is assumed to be a - * fixed theory. - * - * @return true - */ -bool StandardModel_convergence_tester::accuracy_goal_reached() -{ - return true; -} - -} diff --git a/models/sm/sm_two_scale_convergence_tester.hpp b/models/sm/sm_two_scale_convergence_tester.hpp deleted file mode 100644 index f54019b60..000000000 --- a/models/sm/sm_two_scale_convergence_tester.hpp +++ /dev/null @@ -1,52 +0,0 @@ -// ==================================================================== -// This file is part of FlexibleSUSY. -// -// FlexibleSUSY is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published -// by the Free Software Foundation, either version 3 of the License, -// or (at your option) any later version. -// -// FlexibleSUSY is distributed in the hope that it will be useful, but -// WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with FlexibleSUSY. If not, see -// . -// ==================================================================== - -#ifndef SM_TWO_SCALE_CONVERGENCE_TESTER_H -#define SM_TWO_SCALE_CONVERGENCE_TESTER_H - -#include "convergence_tester.hpp" - -namespace flexiblesusy { - -class Two_scale; - -template -class StandardModel; - -/** - * @class StandardModel_convergence_tester - * @brief Tests the StandardModel class for convergence - * - * This class tests the StandardModel class for convergence - * during an iteration between a high and a low scale. The Standard - * Model is assumed to be a fixed theory (all parameters are known), - * the function accuracy_goal_reached() returns allways true. - */ -class StandardModel_convergence_tester : public Convergence_tester { -public: - StandardModel_convergence_tester(StandardModel*); - virtual ~StandardModel_convergence_tester(); - virtual bool accuracy_goal_reached(); - -private: - StandardModel* sm; ///< the model to test for convergence -}; - -} - -#endif diff --git a/models/sm/sm_two_scale_experimental_constraint.cpp b/models/sm/sm_two_scale_experimental_constraint.cpp deleted file mode 100644 index c2e96753a..000000000 --- a/models/sm/sm_two_scale_experimental_constraint.cpp +++ /dev/null @@ -1,75 +0,0 @@ -// ==================================================================== -// This file is part of FlexibleSUSY. -// -// FlexibleSUSY is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published -// by the Free Software Foundation, either version 3 of the License, -// or (at your option) any later version. -// -// FlexibleSUSY is distributed in the hope that it will be useful, but -// WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with FlexibleSUSY. If not, see -// . -// ==================================================================== - -#include "sm_two_scale_experimental_constraint.hpp" -#include "sm_two_scale.hpp" -#include "logger.hpp" - -#include - -namespace flexiblesusy { - -StandardModel_exp_constraint::StandardModel_exp_constraint() - : Single_scale_constraint() - , sm(NULL) -{ -} - -StandardModel_exp_constraint::~StandardModel_exp_constraint() -{ -} - -/** - * Apply all experimental constraints to the Standard Model class. It - * is assumed that the Standard Model class is at the Z mass scale. - * If this is not the case, a warning is printed. - */ -void StandardModel_exp_constraint::apply() -{ - assert(sm && "pointer to StandardModel must not be zero"); - - VERBOSE_MSG("Applying SM experimental constraints at scale " - << sm->get_scale()); - if (std::fabs(Electroweak_constants::MZ - sm->get_scale()) > 1.0) - WARNING("Applying the experimental constraints " - "of StandardModel at scale " << sm->get_scale() - << " != MZ is not save!"); - - sm->setYukawaElement(StandardModel::YU, 3, 3, Electroweak_constants::yt); - sm->setYukawaElement(StandardModel::YD, 3, 3, Electroweak_constants::yb); - sm->setYukawaElement(StandardModel::YE, 3, 3, Electroweak_constants::ytau); - sm->setGaugeCoupling(1, Electroweak_constants::g1); - sm->setGaugeCoupling(2, Electroweak_constants::g2); - sm->setGaugeCoupling(3, Electroweak_constants::g3); -} - -/** - * Returns the on-shell Z mass MZ - * @return MZ - */ -double StandardModel_exp_constraint::get_scale() const -{ - return Electroweak_constants::MZ; -} - -void StandardModel_exp_constraint::set_model(Model* model) -{ - sm = cast_model*>(model); -} - -} diff --git a/models/sm/sm_two_scale_experimental_constraint.hpp b/models/sm/sm_two_scale_experimental_constraint.hpp deleted file mode 100644 index fe0fe3e5a..000000000 --- a/models/sm/sm_two_scale_experimental_constraint.hpp +++ /dev/null @@ -1,54 +0,0 @@ -// ==================================================================== -// This file is part of FlexibleSUSY. -// -// FlexibleSUSY is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published -// by the Free Software Foundation, either version 3 of the License, -// or (at your option) any later version. -// -// FlexibleSUSY is distributed in the hope that it will be useful, but -// WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with FlexibleSUSY. If not, see -// . -// ==================================================================== - -#ifndef SM_TWO_SCALE_EXP_CONSTRAINT_H -#define SM_TWO_SCALE_EXP_CONSTRAINT_H - -#include "single_scale_constraint.hpp" -#include "ew_input.hpp" -#include - -namespace flexiblesusy { - -class Two_scale; - -template -class StandardModel; - -/** - * @class StandardModel_exp_constraint - * @brief Experimental constraints of the Standard Model - * - * This class applies all experimental constraints to the Standard - * Model at the Z mass scale. - */ -class StandardModel_exp_constraint : public Single_scale_constraint { -public: - StandardModel_exp_constraint(); - virtual ~StandardModel_exp_constraint(); - virtual void apply(); - virtual double get_scale() const; - virtual void set_model(Model*); - -private: - StandardModel* sm; ///< model to apply the constraints to -}; - -} - -#endif diff --git a/models/smcw/module.mk b/models/smcw/module.mk deleted file mode 100644 index a14027401..000000000 --- a/models/smcw/module.mk +++ /dev/null @@ -1,42 +0,0 @@ -DIR := models/smcw -MODNAME := smcw -WITH_$(MODNAME) := smcw - -LIBsmcw_SRC := - -ifneq ($(findstring two_scale,$(SOLVERS)),) -LIBsmcw_SRC += \ - $(DIR)/smcw_two_scale.cpp \ - $(DIR)/smcw_two_scale_convergence_tester.cpp \ - $(DIR)/smcw_two_scale_gut_constraint.cpp -endif - -LIBsmcw_OBJ := \ - $(patsubst %.cpp, %.o, $(filter %.cpp, $(LIBsmcw_SRC))) \ - $(patsubst %.f, %.o, $(filter %.f, $(LIBsmcw_SRC))) - -LIBsmcw_DEP := \ - $(LIBsmcw_OBJ:.o=.d) - -LIBsmcw := $(DIR)/lib$(MODNAME)$(MODULE_LIBEXT) - -.PHONY: all-$(MODNAME) clean-$(MODNAME) distclean-$(MODNAME) - -all-$(MODNAME): $(LIBsmcw) - -clean-$(MODNAME): - rm -rf $(LIBsmcw_OBJ) - -distclean-$(MODNAME): clean-$(MODNAME) - rm -rf $(LIBsmcw_DEP) - rm -rf $(LIBsmcw) - -clean:: clean-$(MODNAME) - -distclean:: distclean-$(MODNAME) - -$(LIBsmcw): $(LIBsmcw_OBJ) - $(MODULE_MAKE_LIB_CMD) $@ $^ - -ALLDEP += $(LIBsmcw_DEP) -ALLLIB += $(LIBsmcw) diff --git a/models/smcw/smcw.hpp b/models/smcw/smcw.hpp deleted file mode 100644 index 53fcee373..000000000 --- a/models/smcw/smcw.hpp +++ /dev/null @@ -1,11 +0,0 @@ -#ifndef SMCW_H -#define SMCW_H - -namespace flexiblesusy { - -template -class StandardModelCW; - -} - -#endif diff --git a/models/smcw/smcw_two_scale.cpp b/models/smcw/smcw_two_scale.cpp deleted file mode 100644 index f1779448e..000000000 --- a/models/smcw/smcw_two_scale.cpp +++ /dev/null @@ -1,182 +0,0 @@ -// ==================================================================== -// This file is part of FlexibleSUSY. -// -// FlexibleSUSY is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published -// by the Free Software Foundation, either version 3 of the License, -// or (at your option) any later version. -// -// FlexibleSUSY is distributed in the hope that it will be useful, but -// WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with FlexibleSUSY. If not, see -// . -// ==================================================================== - -#include "smcw_two_scale.hpp" - -#include - -using namespace softsusy; - -namespace flexiblesusy { - -StandardModelCW::StandardModelCW() - : StandardModel() - , g4(0.0) - , lambda(0.0) - , vs(0.0) -{ - setPars(numStandardModelCWPars); -} - -StandardModelCW::StandardModelCW(const StandardModelCW& smcw) - : StandardModel(smcw) - , g4(smcw.g4) - , lambda(smcw.lambda) - , vs(smcw.vs) -{ - setPars(numStandardModelCWPars); -} - -StandardModelCW::StandardModelCW(const StandardModel& sm, double g4_, double lambda_, double vs_) - : StandardModel(sm) - , g4(g4_) - , lambda(lambda_) - , vs(vs_) -{ - setPars(numStandardModelCWPars); -} - -StandardModelCW::StandardModelCW(const DoubleMatrix& SMu, - const DoubleMatrix& SMd, - const DoubleMatrix& SMe, - const DoubleVector& g_, - double lambda_, double vs_) - : StandardModel(SMu, SMd, SMe, g_) - , g4(g_(4)) - , lambda(lambda_) - , vs(vs_) -{ - setPars(numStandardModelCWPars); -} - -StandardModelCW::~StandardModelCW() -{ -} - -const StandardModelCW& StandardModelCW::operator=(const StandardModelCW& smcw) -{ - if (this == &smcw) return *this; - StandardModel::operator=(smcw); - g4 = smcw.g4; - lambda = smcw.lambda; - vs = smcw.vs; - return *this; -} - -void StandardModelCW::setGaugeCoupling(int i, double f) -{ - assert(i <= 4 && "gauge coupling index > 4"); - assert(i >= 1 && "gauge coupling index < 1"); - if (i == 4) - g4 = f; - else - StandardModel::setGaugeCoupling(i, f); -} - -void StandardModelCW::setAllGauge(const DoubleVector& v) -{ - assert(v.displayStart() == 1 && v.displayEnd() >= 4); - g4 = v(4); - for (int i = 1; i <= 3; ++i) - StandardModel::setGaugeCoupling(i, v(i)); -} - -DoubleVector StandardModelCW::displayGauge() const -{ - DoubleVector g(StandardModel::displayGauge()); - g.setEnd(4); - g(4) = g4; - return g; -} - -double StandardModelCW::displayGaugeCoupling(int i) const -{ - assert(i >= 1 && "i < 1"); - assert(i <= 4 && "i > 4"); - if (i == 4) - return g4; - else - return StandardModel::displayGaugeCoupling(i); -} - -const DoubleVector StandardModelCW::display() const -{ - DoubleVector y(StandardModel::display()); - y.setEnd(numStandardModelCWPars); - y(numStandardModelCWPars - 2) = g4; - y(numStandardModelCWPars - 1) = lambda; - y(numStandardModelCWPars) = vs; - - return y; -} - -void StandardModelCW::set(const DoubleVector& y) -{ - assert(y.displayStart() == 1 && y.displayEnd() >= numStandardModelCWPars); - StandardModel::set(y); - g4 = y(numStandardModelCWPars - 2); - lambda = y(numStandardModelCWPars - 1); - vs = y(numStandardModelCWPars); -} - -std::ostream& operator <<(std::ostream& left, const StandardModelCW& s) -{ - left << "SMCW parameters at Q: " << s.get_scale() - << '\n' - << " Y^U" << s.displayYukawaMatrix(StandardModelCW::YU) - << " Y^D" << s.displayYukawaMatrix(StandardModelCW::YD) - << " Y^E" << s.displayYukawaMatrix(StandardModelCW::YE) - << '\n' - << " g1: " << s.displayGaugeCoupling(1) - << " g2: " << s.displayGaugeCoupling(2) - << " g3: " << s.displayGaugeCoupling(3) - << " g4: " << s.displayGaugeCoupling(4) - << '\n' - << " lambda: " << s.displayLambda() - << " vs: " << s.displayVs() - << '\n' - << " thresholds: " << s.displayThresholds() - << " #loops: " << s.displayLoops() << '\n'; - return left; -} - -// Outputs derivatives (DRbar scheme) in the form of ds -StandardModelCW StandardModelCW::calc_beta() const -{ - static const double oneO16Pisq = 1.0 / (16.0 * PI * PI); - double dg4, dlambda; - - dg4 = oneO16Pisq * std::pow(g4, 3) / 3.0; - dlambda = oneO16Pisq * (2.0 / 3.0) * (5.0 * lambda * lambda - - 18.0 * g4 * g4 * lambda - + 54.0 * std::pow(g4, 4)); - - return StandardModelCW(StandardModel::calc_beta(), dg4, dlambda, 0.0); -} - -DoubleVector StandardModelCW::beta() const -{ - return calc_beta().display(); -} - -double StandardModelCW::calcZprimeMass() const -{ - return vs * g4; -} - -} // namespace flexiblesusy diff --git a/models/smcw/smcw_two_scale.hpp b/models/smcw/smcw_two_scale.hpp deleted file mode 100644 index 68aa44bfc..000000000 --- a/models/smcw/smcw_two_scale.hpp +++ /dev/null @@ -1,98 +0,0 @@ -// ==================================================================== -// This file is part of FlexibleSUSY. -// -// FlexibleSUSY is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published -// by the Free Software Foundation, either version 3 of the License, -// or (at your option) any later version. -// -// FlexibleSUSY is distributed in the hope that it will be useful, but -// WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with FlexibleSUSY. If not, see -// . -// ==================================================================== - -#ifndef SMCW_TWO_SCALE_H -#define SMCW_TWO_SCALE_H - -#include "smcw.hpp" -#include "linalg.h" -#include "sm_two_scale.hpp" - -#include - -namespace flexiblesusy { - -class Two_scale; - -/// Formatted output -std::ostream& operator <<(std::ostream&, const StandardModelCW&); - -template<> -class StandardModelCW: public StandardModel { -public: - const static int numStandardModelCWPars = - StandardModel::numStandardModelPars + 3; - - StandardModelCW(); - StandardModelCW(const StandardModelCW&); - StandardModelCW(const StandardModel&, double, double, double); - StandardModelCW(const softsusy::DoubleMatrix& yu, const softsusy::DoubleMatrix& yd, - const softsusy::DoubleMatrix& ye, const softsusy::DoubleVector& g, - double lambda, double vs); - - virtual ~StandardModelCW(); - - virtual void calculate_spectrum() {} - virtual std::string name() const { return "SMCW"; } - virtual void print(std::ostream& s) const { s << *this; } - - /// sets object to be equal to another - const StandardModelCW & operator=(const StandardModelCW& s); - - void calculate_DRbar_masses() {} - - /// Set a single gauge coupling - virtual void setGaugeCoupling(int, double); - /// Set all gauge couplings - virtual void setAllGauge(const softsusy::DoubleVector&); - /// Set lambda parameter - void setLambda(double l) { lambda = l; } - /// Set s VEV - void setVs(double v) { vs = v; } - - /// Returns a single gauge coupling - virtual double displayGaugeCoupling(int) const; - /// Returns all gauge couplings - virtual softsusy::DoubleVector displayGauge() const; - /// Returns lambda parameter - double displayLambda() const { return lambda; } - /// Returns s VEV - double displayVs() const { return vs; } - /// Calculate beta functions - StandardModelCW calc_beta() const; - - /// Calculate Z' mass - double calcZprimeMass() const; - -protected: - /// Sets all RGE parameters to elements of vector - virtual void set(const softsusy::DoubleVector&); - /// Returns all parameters as elements of a vector - virtual const softsusy::DoubleVector display() const; - /// Calculate beta functions - virtual softsusy::DoubleVector beta() const; - -private: - double g4; ///< g4 gauge coupling - double lambda; ///< scalar potential parameter lambda - double vs; ///< VEV of singlet field -}; - -} - -#endif diff --git a/models/smcw/smcw_two_scale_convergence_tester.cpp b/models/smcw/smcw_two_scale_convergence_tester.cpp deleted file mode 100644 index d311d1607..000000000 --- a/models/smcw/smcw_two_scale_convergence_tester.cpp +++ /dev/null @@ -1,51 +0,0 @@ -// ==================================================================== -// This file is part of FlexibleSUSY. -// -// FlexibleSUSY is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published -// by the Free Software Foundation, either version 3 of the License, -// or (at your option) any later version. -// -// FlexibleSUSY is distributed in the hope that it will be useful, but -// WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with FlexibleSUSY. If not, see -// . -// ==================================================================== - -#include "smcw_two_scale_convergence_tester.hpp" - -namespace flexiblesusy { - -StandardModelCW_convergence_tester::StandardModelCW_convergence_tester(StandardModelCW* smcw_, double accuracy_goal_) - : Convergence_tester_DRbar >(smcw_, accuracy_goal_) -{ -} - -StandardModelCW_convergence_tester::~StandardModelCW_convergence_tester() -{ -} - -double StandardModelCW_convergence_tester::max_rel_diff() const -{ - const StandardModelCW& model = get_current_iteration_model(); - const StandardModelCW& last_iteration_model = get_last_iteration_model(); - - const double dg4 = std::fabs(model.displayGaugeCoupling(4) - - last_iteration_model.displayGaugeCoupling(4)); - const double dlamda = std::fabs(model.displayLambda() - - last_iteration_model.displayLambda()); - const double max_diff = std::max(dg4, dlamda); - - return max_diff; -} - -int StandardModelCW_convergence_tester::max_iterations() const -{ - return 10; -} - -} // namespace flexiblesusy diff --git a/models/smcw/smcw_two_scale_convergence_tester.hpp b/models/smcw/smcw_two_scale_convergence_tester.hpp deleted file mode 100644 index 6f7cea49e..000000000 --- a/models/smcw/smcw_two_scale_convergence_tester.hpp +++ /dev/null @@ -1,39 +0,0 @@ -// ==================================================================== -// This file is part of FlexibleSUSY. -// -// FlexibleSUSY is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published -// by the Free Software Foundation, either version 3 of the License, -// or (at your option) any later version. -// -// FlexibleSUSY is distributed in the hope that it will be useful, but -// WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with FlexibleSUSY. If not, see -// . -// ==================================================================== - -#ifndef SMCW_TWO_SCALE_CONVERGENCE_TESTER_H -#define SMCW_TWO_SCALE_CONVERGENCE_TESTER_H - -#include "convergence_tester_drbar.hpp" -#include "smcw_two_scale.hpp" - -namespace flexiblesusy { - -class StandardModelCW_convergence_tester : public Convergence_tester_DRbar > { -public: - StandardModelCW_convergence_tester(StandardModelCW*, double); - virtual ~StandardModelCW_convergence_tester(); - virtual int max_iterations() const; - -protected: - virtual double max_rel_diff() const; -}; - -} - -#endif diff --git a/models/smcw/smcw_two_scale_gut_constraint.cpp b/models/smcw/smcw_two_scale_gut_constraint.cpp deleted file mode 100644 index 58b174e60..000000000 --- a/models/smcw/smcw_two_scale_gut_constraint.cpp +++ /dev/null @@ -1,50 +0,0 @@ - -#include "smcw_two_scale_gut_constraint.hpp" -#include - -namespace flexiblesusy { - -StandardModelCWGUTConstraint::StandardModelCWGUTConstraint(double estimated_scale_, double lambda_at_mgut_) - : Single_scale_constraint() - , estimated_scale(estimated_scale_) - , smcw(NULL) - , gut_scale_calculator() - , lambda_at_mgut(lambda_at_mgut_) -{ -} - -StandardModelCWGUTConstraint::~StandardModelCWGUTConstraint() -{ -} - -void StandardModelCWGUTConstraint::apply() -{ - assert(smcw && "Error: pointer to StandardModelCW cannot be zero"); - - update_scale(); - - const double g1 = smcw->displayGaugeCoupling(1); - const double g2 = smcw->displayGaugeCoupling(2); - const double g_mean = 0.5 * (g1 + g2); - smcw->setGaugeCoupling(1, g_mean); - smcw->setGaugeCoupling(2, g_mean); - smcw->setGaugeCoupling(4, g_mean); - smcw->setLambda(lambda_at_mgut); -} - -double StandardModelCWGUTConstraint::get_scale() const -{ - return estimated_scale; -} - -void StandardModelCWGUTConstraint::set_model(Model* model) -{ - smcw = cast_model*>(model); -} - -void StandardModelCWGUTConstraint::update_scale() -{ - estimated_scale = gut_scale_calculator.calculateGUTScale(*smcw); -} - -} diff --git a/models/smcw/smcw_two_scale_gut_constraint.hpp b/models/smcw/smcw_two_scale_gut_constraint.hpp deleted file mode 100644 index 93fc843d5..000000000 --- a/models/smcw/smcw_two_scale_gut_constraint.hpp +++ /dev/null @@ -1,47 +0,0 @@ -// ==================================================================== -// This file is part of FlexibleSUSY. -// -// FlexibleSUSY is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published -// by the Free Software Foundation, either version 3 of the License, -// or (at your option) any later version. -// -// FlexibleSUSY is distributed in the hope that it will be useful, but -// WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with FlexibleSUSY. If not, see -// . -// ==================================================================== - -#ifndef SMCW_GUT_CONSTRAINT_H -#define SMCW_GUT_CONSTRAINT_H - -#include "single_scale_constraint.hpp" -#include "smcw_two_scale.hpp" -#include "gut_scale_calculator.hpp" - -namespace flexiblesusy { - -class StandardModelCWGUTConstraint : public Single_scale_constraint { -public: - StandardModelCWGUTConstraint(double, double); - virtual ~StandardModelCWGUTConstraint(); - virtual void apply(); - virtual double get_scale() const; - virtual void set_model(Model*); - -private: - double estimated_scale; - StandardModelCW* smcw; - GUT_scale_calculator > gut_scale_calculator; - double lambda_at_mgut; - - void update_scale(); -}; - -} - -#endif diff --git a/test/module.mk b/test/module.mk index ce1c1d58a..304363d2e 100644 --- a/test/module.mk +++ b/test/module.mk @@ -141,14 +141,6 @@ TEST_SRC += \ $(DIR)/test_SMSSM_one_loop_spectrum.cpp \ $(DIR)/test_SMSSM_tree_level_spectrum.cpp endif -ifeq ($(WITH_sm),yes) -TEST_SRC += \ - $(DIR)/test_two_scale_sm.cpp -endif -ifeq ($(WITH_sm) $(WITH_smcw),yes yes) -TEST_SRC += \ - $(DIR)/test_two_scale_sm_smcw_integration.cpp -endif endif # ifneq ($(findstring two_scale,$(SOLVERS)),) @@ -613,12 +605,6 @@ $(DIR)/test_two_scale_mssm_initial_guesser.x: $(DIR)/test_two_scale_mssm_initial $(DIR)/test_two_scale_running_precision.x: $(DIR)/test_two_scale_running_precision.o $(LIBFLEXI) $(filter-out -%,$(LOOPFUNCLIBS)) $(CXX) -o $@ $(call abspathx,$^) $(filter -%,$(LOOPFUNCLIBS)) $(BOOSTTESTLIBS) $(BOOSTTHREADLIBS) $(FLIBS) -$(DIR)/test_two_scale_sm_smcw_integration.x: $(DIR)/test_two_scale_sm_smcw_integration.o $(LIBsmcw) $(LIBsm) $(LIBFLEXI) $(filter-out -%,$(LOOPFUNCLIBS)) - $(CXX) -o $@ $(call abspathx,$^) $(filter -%,$(LOOPFUNCLIBS)) $(BOOSTTESTLIBS) $(BOOSTTHREADLIBS) $(FLIBS) - -$(DIR)/test_two_scale_sm.x: $(DIR)/test_two_scale_sm.o $(LIBsm) $(LIBFLEXI) $(filter-out -%,$(LOOPFUNCLIBS)) - $(CXX) -o $@ $(call abspathx,$^) $(filter -%,$(LOOPFUNCLIBS)) $(BOOSTTESTLIBS) $(BOOSTTHREADLIBS) $(FLIBS) - $(DIR)/test_two_scale_solver.x: $(DIR)/test_two_scale_solver.o $(LIBSoftsusyMSSM) $(LIBFLEXI) $(filter-out -%,$(LOOPFUNCLIBS)) $(CXX) -o $@ $(call abspathx,$^) $(filter -%,$(LOOPFUNCLIBS)) $(BOOSTTESTLIBS) $(BOOSTTHREADLIBS) $(FLIBS) diff --git a/test/test_two_scale_sm.cpp b/test/test_two_scale_sm.cpp deleted file mode 100644 index 124e1f2f9..000000000 --- a/test/test_two_scale_sm.cpp +++ /dev/null @@ -1,42 +0,0 @@ -#include "sm_two_scale.hpp" -#include "sm_two_scale_experimental_constraint.hpp" - -#define BOOST_TEST_DYN_LINK -#define BOOST_TEST_MODULE test_two_scale_sm - -#include - -using namespace flexiblesusy; -using namespace softsusy; - -#define YU StandardModel::YU -#define YD StandardModel::YD -#define YE StandardModel::YE - -BOOST_AUTO_TEST_CASE( test_electroweak_constaint ) -{ - StandardModel sm; - sm.setScale(Electroweak_constants::MZ); - StandardModel_exp_constraint sm_ew_constraint; - sm_ew_constraint.set_model(&sm); - const DoubleMatrix zero3x3(3,3); - - // check that sm is initialized to zero - for (int i = 1; i <= 3; ++i) - BOOST_CHECK_EQUAL(sm.displayGaugeCoupling(i), 0.0); - - BOOST_CHECK_EQUAL(sm.displayYukawaMatrix(YU), zero3x3); - BOOST_CHECK_EQUAL(sm.displayYukawaMatrix(YD), zero3x3); - BOOST_CHECK_EQUAL(sm.displayYukawaMatrix(YE), zero3x3); - - sm_ew_constraint.apply(); - - // check that ew constraints have been applied - BOOST_CHECK_EQUAL(sm.displayGaugeCoupling(1), Electroweak_constants::g1); - BOOST_CHECK_EQUAL(sm.displayGaugeCoupling(2), Electroweak_constants::g2); - BOOST_CHECK_EQUAL(sm.displayGaugeCoupling(3), Electroweak_constants::g3); - - BOOST_CHECK_EQUAL(sm.displayYukawaElement(YU, 3, 3), Electroweak_constants::yt); - BOOST_CHECK_EQUAL(sm.displayYukawaElement(YD, 3, 3), Electroweak_constants::yb); - BOOST_CHECK_EQUAL(sm.displayYukawaElement(YE, 3, 3), Electroweak_constants::ytau); -} diff --git a/test/test_two_scale_sm_smcw_integration.cpp b/test/test_two_scale_sm_smcw_integration.cpp deleted file mode 100644 index f506b34c7..000000000 --- a/test/test_two_scale_sm_smcw_integration.cpp +++ /dev/null @@ -1,425 +0,0 @@ -#include "model.hpp" -#include "two_scale_solver.hpp" -#include "single_scale_matching.hpp" -#include "sm_two_scale.hpp" -#include "sm_two_scale_experimental_constraint.hpp" -#include "smcw_two_scale.hpp" -#include "smcw_two_scale_gut_constraint.hpp" -#include "smcw_two_scale_convergence_tester.hpp" -#include "linalg.h" -#include "coupling_monitor.hpp" -#include "error.hpp" - -#define BOOST_TEST_DYN_LINK -#define BOOST_TEST_MODULE test_two_scale_sm_smcw_integration - -#include - -using namespace flexiblesusy; -using namespace softsusy; - -#define YU StandardModel::YU -#define YD StandardModel::YD -#define YE StandardModel::YE - -class Trivial_SM_SMCW_matching_condition_upwards: public Single_scale_matching { -public: - Trivial_SM_SMCW_matching_condition_upwards() - : Single_scale_matching() - , sm(0) - , smcw(0) - {} - virtual ~Trivial_SM_SMCW_matching_condition_upwards() {} - virtual void match() { - // ensure that both models are at the matching scale - smcw->setScale(sm->get_scale()); - // copy parameters - smcw->setYukawaMatrix(YU, sm->displayYukawaMatrix(YU)); - smcw->setYukawaMatrix(YD, sm->displayYukawaMatrix(YD)); - smcw->setYukawaMatrix(YE, sm->displayYukawaMatrix(YE)); - for (int i = 1; i <= 3; ++i) - smcw->setGaugeCoupling(i, sm->displayGaugeCoupling(i)); - } - virtual double get_scale() const { - return 3000; - } - virtual void set_models(Model* sm_, Model* smcw_) { - sm = cast_model*>(sm_); - smcw = cast_model*>(smcw_); - } -private: - StandardModel* sm; - StandardModelCW* smcw; -}; - -class Trivial_SM_SMCW_matching_condition_downwards: public Single_scale_matching { -public: - Trivial_SM_SMCW_matching_condition_downwards() - : Single_scale_matching() - , sm(0) - , smcw(0) - {} - virtual ~Trivial_SM_SMCW_matching_condition_downwards() {} - virtual void match() { - // ensure that both models are at the matching scale - BOOST_REQUIRE(sm->get_scale() == smcw->get_scale()); - // copy parameters - sm->setYukawaMatrix(YU, smcw->displayYukawaMatrix(YU)); - sm->setYukawaMatrix(YD, smcw->displayYukawaMatrix(YD)); - sm->setYukawaMatrix(YE, smcw->displayYukawaMatrix(YE)); - for (int i = 1; i <= 3; ++i) - sm->setGaugeCoupling(i, smcw->displayGaugeCoupling(i)); - } - virtual double get_scale() const { - return 3000; - } - virtual void set_models(Model* smcw_, Model* sm_) { - sm = cast_model*>(sm_); - smcw = cast_model*>(smcw_); - } -private: - StandardModel* sm; - StandardModelCW* smcw; -}; - -class Dynamic_SM_SMCW_matching_condition_downwards: public Single_scale_matching { -public: - Dynamic_SM_SMCW_matching_condition_downwards() - : Single_scale_matching() - , sm(0) - , smcw(0) - , scale(3000) // initial guess - {} - virtual ~Dynamic_SM_SMCW_matching_condition_downwards() {} - virtual void match() { - // ensure that both models are at the matching scale - BOOST_REQUIRE(sm->get_scale() == smcw->get_scale()); - // copy parameters - sm->setYukawaMatrix(YU, smcw->displayYukawaMatrix(YU)); - sm->setYukawaMatrix(YD, smcw->displayYukawaMatrix(YD)); - sm->setYukawaMatrix(YE, smcw->displayYukawaMatrix(YE)); - for (int i = 1; i <= 3; ++i) - sm->setGaugeCoupling(i, smcw->displayGaugeCoupling(i)); - update_scale(); - } - virtual double get_scale() const { - return scale; - } - virtual void set_models(Model* smcw_, Model* sm_) { - sm = cast_model*>(sm_); - smcw = cast_model*>(smcw_); - } - virtual void update_scale() { - const double new_scale = smcw->calcZprimeMass(); - if (new_scale != 0.0) - scale = new_scale; - } - -private: - StandardModel* sm; - StandardModelCW* smcw; - double scale; ///< dynamic matching scale -}; - -class Dynamic_SM_SMCW_matching_condition_upwards: public Single_scale_matching { -public: - Dynamic_SM_SMCW_matching_condition_upwards() - : Single_scale_matching() - , sm(0) - , smcw(0) - , scale(3000) // initial guess - {} - virtual ~Dynamic_SM_SMCW_matching_condition_upwards() {} - virtual void match() { - // ensure that both models are at the matching scale - smcw->setScale(sm->get_scale()); - // copy parameters - smcw->setYukawaMatrix(YU, sm->displayYukawaMatrix(YU)); - smcw->setYukawaMatrix(YD, sm->displayYukawaMatrix(YD)); - smcw->setYukawaMatrix(YE, sm->displayYukawaMatrix(YE)); - for (int i = 1; i <= 3; ++i) - smcw->setGaugeCoupling(i, sm->displayGaugeCoupling(i)); - } - virtual double get_scale() const { - return scale; - } - virtual void set_models(Model* sm_, Model* smcw_) { - sm = cast_model*>(sm_); - smcw = cast_model*>(smcw_); - } - virtual void update_scale() { - const double new_scale = smcw->calcZprimeMass(); - if (new_scale != 0.0) - scale = new_scale; - } - -private: - StandardModel* sm; - StandardModelCW* smcw; - double scale; ///< dynamic matching scale -}; - -BOOST_AUTO_TEST_CASE( test_trival_matching ) -{ - BOOST_TEST_MESSAGE("test if trivial matching condition leaves parameters invariant"); - - const double vev = 246; - const double root2 = sqrt(2.0); - const double mtoprun = 165; - const double mbrun = 2.9; - const double mtau = 1.77699; - const double yt = mtoprun * root2 / vev; - const double yb = mbrun * root2 / vev; - const double ytau = mtau * root2 / vev; - - const double MZ = 91.1876; - const double aem = 1.0 / 127.918; // at MZ - const double sinthWsq = 0.23122; - const double alpha1 = 5.0 * aem / (3.0 * (1.0 - sinthWsq)); - const double alpha2 = aem / sinthWsq; - const double alpha3 = 0.1187; // at MZ - - StandardModel* sm = new StandardModel(); - sm->setScale(MZ); - sm->setYukawaElement(YU, 3, 3, yt); - sm->setYukawaElement(YD, 3, 3, yb); - sm->setYukawaElement(YE, 3, 3, ytau); - sm->setGaugeCoupling(1, sqrt(4 * PI * alpha1)); - sm->setGaugeCoupling(2, sqrt(4 * PI * alpha2)); - sm->setGaugeCoupling(3, sqrt(4 * PI * alpha3)); - - StandardModelCW* smcw = new StandardModelCW(); - smcw->setScale(MZ); - - // this trivial matching condition simply forwards the parameters - // of one model to the other - Trivial_SM_SMCW_matching_condition_downwards mcd; - Trivial_SM_SMCW_matching_condition_upwards mcu; - - // create convergence tester for the CW-Standard Model - StandardModelCW_convergence_tester convergence_tester(smcw, 0.01); - - RGFlow solver; - solver.add(&mcu, sm, smcw); - solver.add(&mcd, smcw, sm); - solver.set_convergence_tester(&convergence_tester); - - // run two scale solver and ensure that no errors occure - try { - solver.solve(); - } catch (Error& e) { - BOOST_ERROR(e.what()); - } - - // check that g4 and lambda are 0.0 - BOOST_CHECK_EQUAL(smcw->displayGaugeCoupling(4), 0.0); - BOOST_CHECK_EQUAL(smcw->displayLambda(), 0.0); - - // check that the SM parameters are the same in both models - for (int i = 1; i <= 3; ++i) - BOOST_CHECK_EQUAL(smcw->displayGaugeCoupling(i), - sm->displayGaugeCoupling(i)); - - BOOST_CHECK_EQUAL(smcw->displayYukawaMatrix(YU), sm->displayYukawaMatrix(YU)); - BOOST_CHECK_EQUAL(smcw->displayYukawaMatrix(YD), sm->displayYukawaMatrix(YD)); - BOOST_CHECK_EQUAL(smcw->displayYukawaMatrix(YE), sm->displayYukawaMatrix(YE)); - - delete smcw; - delete sm; -} - -BOOST_AUTO_TEST_CASE( test_sm_smcw_constraints ) -{ - BOOST_TEST_MESSAGE("test if SM and SMCW constraints are applied correctly"); - - // create Standard Model and the EW constraints - StandardModel sm; - sm.setScale(Electroweak_constants::MZ); - StandardModel_exp_constraint sm_ew_constraint; - sm_ew_constraint.set_model(&sm); - - // create CW-Standard Model and the GUT constraint - StandardModelCW smcw; - smcw.setScale(Electroweak_constants::MZ); - const double lambda_at_mgut = 1.0; - StandardModelCWGUTConstraint smcw_gut_constraint(1.0e12, lambda_at_mgut); - smcw_gut_constraint.set_model(&smcw); - - // create trivial matching condition - Trivial_SM_SMCW_matching_condition_upwards mcu; - Trivial_SM_SMCW_matching_condition_downwards mcd; - - // create convergence tester for the CW-Standard Model - StandardModelCW_convergence_tester convergence_tester(&smcw, 1.0e-4); - - // create two scale solver - RGFlow solver; - solver.add(&sm_ew_constraint, &sm); - solver.add(&mcu, &sm, &smcw); - solver.add(&smcw_gut_constraint, &smcw); - solver.add(&mcd, &smcw, &sm); - solver.set_convergence_tester(&convergence_tester); - - // run two scale solver and ensure that no errors occure - try { - solver.solve(); - } catch (Error& e) { - BOOST_ERROR(e.what()); - } - - // to make the parameter comparison work, run sm to the same scale as smcw - sm.run_to(smcw.get_scale()); - - // check that the SM parameters are the same in both models - for (int i = 1; i <= 3; ++i) - BOOST_CHECK_CLOSE(smcw.displayGaugeCoupling(i), - sm.displayGaugeCoupling(i), 0.002); - - for (int i = 1; i <= 3; ++i) { - for (int k = 1; k <= 3; ++k) { - BOOST_CHECK_CLOSE(smcw.displayYukawaElement(YU, i, k), - sm.displayYukawaElement(YU, i, k), 0.002); - BOOST_CHECK_CLOSE(smcw.displayYukawaElement(YD, i, k), - sm.displayYukawaElement(YD, i, k), 0.002); - BOOST_CHECK_CLOSE(smcw.displayYukawaElement(YE, i, k), - sm.displayYukawaElement(YE, i, k), 0.002); - } - } - - // get the GUT scale value - const double gut_scale = smcw_gut_constraint.get_scale(); - - // run CW-Standard Model to the GUT scale and test equality of g1 - // and g2 - smcw.run_to(gut_scale); - const double g1_at_mgut = smcw.displayGaugeCoupling(1); - const double g2_at_mgut = smcw.displayGaugeCoupling(2); - const double g4_at_mgut = smcw.displayGaugeCoupling(4); - BOOST_CHECK_CLOSE(g1_at_mgut, g2_at_mgut, 1.0e-8); - BOOST_CHECK_CLOSE(g1_at_mgut, g4_at_mgut, 1.0e-7); - - // check that the input value lambda(MGUT) was applied correctly - const double lambda_at_mgut_output = smcw.displayLambda(); - BOOST_CHECK_CLOSE(lambda_at_mgut, lambda_at_mgut_output, 1.0e-4); -} - -BOOST_AUTO_TEST_CASE( test_sm_smcw_convergence ) -{ - BOOST_TEST_MESSAGE("test if two scale solver with SM and SMCW converges"); - - // create Standard Model and the EW constraints - StandardModel sm; - sm.setScale(Electroweak_constants::MZ); - StandardModel_exp_constraint sm_ew_constraint; - sm_ew_constraint.set_model(&sm); - - // create CW-Standard Model and the GUT constraint - StandardModelCW smcw; - smcw.setScale(Electroweak_constants::MZ); - const double lambda_at_mgut = 1.0; - StandardModelCWGUTConstraint smcw_gut_constraint(1.0e12, lambda_at_mgut); - smcw_gut_constraint.set_model(&smcw); - - // create trivial matching condition - Trivial_SM_SMCW_matching_condition_upwards mcu; - Trivial_SM_SMCW_matching_condition_downwards mcd; - - // create convergence tester for the CW-Standard Model - StandardModelCW_convergence_tester convergence_tester(&smcw, 0.01); - - // create two scale solver - RGFlow solver; - solver.set_convergence_tester(&convergence_tester); - solver.add(&sm_ew_constraint, &sm); - solver.add(&mcu, &sm, &smcw); - solver.add(&smcw_gut_constraint, &smcw); - solver.add(&mcd, &smcw, &sm); - - // run two scale solver and ensure that no errors occure - try { - solver.solve(); - } catch (Error& e) { - BOOST_ERROR(e.what()); - } - BOOST_TEST_MESSAGE("convergence after " << solver.number_of_iterations_done() - << " iterations"); - BOOST_CHECK_EQUAL(solver.number_of_iterations_done(), 3u); - -#if 0 - // create data: all gauge couplings at different scales - sm.run_to(Electroweak_constants::MZ); - smcw.run_to(3000); - const double gut_scale = smcw_gut_constraint.get_scale(); - - Coupling_monitor cm; - Gauge_coupling_getter gcg; - cm.run(sm , gcg, Electroweak_constants::MZ, 3000, 50, true); - cm.run(smcw, gcg, 3000, gut_scale, 100, true); - cm.write_to_file("running_coupling.dat"); -#endif -} - -BOOST_AUTO_TEST_CASE( test_sm_smcw_dynamic_convergence ) -{ - BOOST_TEST_MESSAGE("test if two scale solver with SM and SMCW and dynamic MC converges"); - - // create Standard Model and the EW constraints - StandardModel sm; - sm.setScale(Electroweak_constants::MZ); - StandardModel_exp_constraint sm_ew_constraint; - sm_ew_constraint.set_model(&sm); - - // create CW-Standard Model and the GUT constraint - StandardModelCW smcw; - smcw.setScale(Electroweak_constants::MZ); - smcw.setVs(5000.0); - const double lambda_at_mgut = 1.0; - StandardModelCWGUTConstraint smcw_gut_constraint(1.0e12, lambda_at_mgut); - smcw_gut_constraint.set_model(&smcw); - - // create dynamic matching condition - Dynamic_SM_SMCW_matching_condition_upwards mcu; - Dynamic_SM_SMCW_matching_condition_downwards mcd; - - // create convergence tester for the CW-Standard Model - StandardModelCW_convergence_tester convergence_tester(&smcw, 0.01); - - // create two scale solver - RGFlow solver; - solver.set_convergence_tester(&convergence_tester); - solver.add(&sm_ew_constraint, &sm); - solver.add(&mcu, &sm, &smcw); - solver.add(&smcw_gut_constraint, &smcw); - solver.add(&mcd, &smcw, &sm); - - // run two scale solver and ensure that no errors occure - try { - solver.solve(); - } catch (Error& e) { - BOOST_ERROR(e.what()); - } - BOOST_TEST_MESSAGE("convergence after " << solver.number_of_iterations_done() - << " iterations"); - BOOST_CHECK_EQUAL(solver.number_of_iterations_done(), 3u); - - // check that the matching scale is approx. the Z' mass - // (assumption: smcw is currently at the matching scale) - mcu.update_scale(); - BOOST_CHECK_CLOSE(mcu.get_scale(), smcw.calcZprimeMass(), 1.0e-8); - BOOST_CHECK_CLOSE(mcd.get_scale(), smcw.calcZprimeMass(), 1.0e-8); - -#if 0 - // create data: all gauge couplings at different scales - const double gut_scale = smcw_gut_constraint.get_scale(); - const double matching_scale = mc.get_scale(); - - sm.run_to(Electroweak_constants::MZ); - smcw.run_to(matching_scale); - - Coupling_monitor cm; - Gauge_coupling_getter gcg; - cm.run(sm , gcg, Electroweak_constants::MZ, matching_scale, 50, true); - cm.run(smcw, gcg, matching_scale, gut_scale, 100, true); - cm.write_to_file("running_coupling.dat"); -#endif -}