Skip to content

Commit

Permalink
Rename get_scale() to scl() in Lattice_model_interactions
Browse files Browse the repository at this point in the history
so that it can be represented by the same name in a Mathematica
expression.
  • Loading branch information
jhyeon committed Sep 5, 2014
1 parent 7d89481 commit cca418d
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 12 deletions.
7 changes: 5 additions & 2 deletions meta/Lattice.m
Expand Up @@ -70,6 +70,8 @@

Format[scl0, CForm] := Format["scl0", OutputForm];

Format[scl[], CForm] := Format["scl()", OutputForm];

Format[drv[ap_, p_], CForm] :=
Format[DrvToCFormString[drv[ap, p]], OutputForm];

Expand Down Expand Up @@ -153,12 +155,13 @@
softHiggsMasses,
treeEwsbEquations, shiftHiggsMasses,
ewsbConstraints, ewsbEquations, ewsbDep, ewsbList,
fixTsusy, tsusyConstraint = (Exp[t] scl0)^4 - Lattice`Private`M2[Global`Su[{1}]] Lattice`Private`M2[Global`Su[{6}]] /. sarahOperatorReplacementRules
fixTsusy, tsusyConstraint = (scl[])^4 - Lattice`Private`M2[Global`Su[{1}]] Lattice`Private`M2[Global`Su[{6}]] /. sarahOperatorReplacementRules,
},
DeclaredRealQ[a | scl0] := True;
DeclaredRealQ[a | scl0 | scl[]] := True;
DeclaredRealQ[_] := False;
DependenceNode[(SARAH`A0|SARAH`B0|SARAH`B1|SARAH`B00|SARAH`B22|
SARAH`F0|SARAH`G0|SARAH`H0)[m__]] := {Re[t], m};
SetDependenceNode[scl[], Re[t]];
parameters = RealVariables[parameterRules];
enumRules = EnumRules[parameters];
enumParameters = EnumParameters[enumRules];
Expand Down
16 changes: 8 additions & 8 deletions src/lattice_model_interactions.cpp
Expand Up @@ -36,42 +36,42 @@ using namespace passarino_veltman;

double Lattice_model_interactions::A0(double m2) const
{
return ReA0(m2, Sqr(get_scale()));
return ReA0(m2, Sqr(scl()));
}

double Lattice_model_interactions::B0(double p2, double m21, double m22) const
{
return ReB0(p2, m21, m22, Sqr(get_scale()));
return ReB0(p2, m21, m22, Sqr(scl()));
}

double Lattice_model_interactions::B1(double p2, double m21, double m22) const
{
return ReB1(p2, m21, m22, Sqr(get_scale()));
return ReB1(p2, m21, m22, Sqr(scl()));
}

double Lattice_model_interactions::B00(double p2, double m21, double m22) const
{
return ReB00(p2, m21, m22, Sqr(get_scale()));
return ReB00(p2, m21, m22, Sqr(scl()));
}

double Lattice_model_interactions::B22(double p2, double m21, double m22) const
{
return ReB22(p2, m21, m22, Sqr(get_scale()));
return ReB22(p2, m21, m22, Sqr(scl()));
}

double Lattice_model_interactions::H0(double p2, double m21, double m22) const
{
return ReH0(p2, m21, m22, Sqr(get_scale()));
return ReH0(p2, m21, m22, Sqr(scl()));
}

double Lattice_model_interactions::F0(double p2, double m21, double m22) const
{
return ReF0(p2, m21, m22, Sqr(get_scale()));
return ReF0(p2, m21, m22, Sqr(scl()));
}

double Lattice_model_interactions::G0(double p2, double m21, double m22) const
{
return ReG0(p2, m21, m22, Sqr(get_scale()));
return ReG0(p2, m21, m22, Sqr(scl()));
}

}
3 changes: 1 addition & 2 deletions src/lattice_model_interactions.hpp
Expand Up @@ -27,13 +27,12 @@ class Lattice_model_interactions {
public:
Lattice_model_interactions();
void set(const Eigen::VectorXd& x, double scl0);
double scl() const ATTR(pure) { return std::exp(x[0]) * scl0; }

protected:
Eigen::Map<const Eigen::VectorXd> x;
double scl0;

double get_scale() const ATTR(pure) { return std::exp(x[0]) * scl0; }

double A0(double m2) const ATTR(pure);
double B0(double p2, double m21, double m22) const ATTR(pure);
double B1(double p2, double m21, double m22) const ATTR(pure);
Expand Down

0 comments on commit cca418d

Please sign in to comment.