Skip to content

Commit

Permalink
Merge branch 'develop' into fix_Thigh_start_true_vacuum
Browse files Browse the repository at this point in the history
  • Loading branch information
vollous authored Dec 20, 2024
2 parents c43f6b1 + 8f5d454 commit a0a4c78
Show file tree
Hide file tree
Showing 12 changed files with 2,351 additions and 701 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/doc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:
name: documentation
path: documentation
- name: Deploy
uses: JamesIves/github-pages-deploy-action@v4.6.9
uses: JamesIves/github-pages-deploy-action@v4.7.2
with:
branch: gh-pages # The branch the action should deploy to.
folder: documentation # The folder the action should deploy.
Expand Down
19 changes: 15 additions & 4 deletions .github/workflows/linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,22 @@ concurrency:
jobs:
linter:
runs-on: ubuntu-latest
env:
LocalCommit: ${{ github.event.pull_request.head.repo.full_name == github.repository && github.actor != 'dependabot[bot]' }}

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.head_ref }}
token: ${{ secrets.LINTER_PAT }}
if: env.LocalCommit == 'true'

- name: Install clang-format
if: inputs.apply_clang_format
run: pip3 install clang-format==14.0.0
- uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.head_ref }}
if: env.LocalCommit != 'true'

- run: git fetch origin $GITHUB_BASE_REF

Expand Down Expand Up @@ -59,8 +64,14 @@ jobs:
git config user.email "<>"
- name: Commit changes
if: steps.check-changes.outputs.ChangesFound == 'True'
if: steps.check-changes.outputs.ChangesFound == 'True' && env.LocalCommit == 'true'
run: |
git commit -am "Automatically applied linter"
git push
- name: Notify that changes are required
if: ${{ steps.check-changes.outputs.ChangesFound == 'True' && env.LocalCommit != 'true' }}
run: |
echo "Linter changes are required" >> $GITHUB_STEP_SUMMARY
exit 1
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
tests-fullSetup:
strategy:
matrix:
setup: [ {os: ubuntu-latest}, {os: windows-latest}, {os: macos-latest}, {os: ubuntu-20.04}]
setup: [ {os: ubuntu-latest}, {os: windows-latest}, {os: macos-latest}]
runs-on: ${{matrix.setup.os}}
if: "!contains(github.event.head_commit.message, 'skip-ci')"

Expand Down
692 changes: 11 additions & 681 deletions include/BSMPT/ThermalFunctions/NegativeBosonSpline.h

Large diffs are not rendered by default.

14 changes: 12 additions & 2 deletions include/BSMPT/transition_tracer/transition_tracer.h
Original file line number Diff line number Diff line change
Expand Up @@ -181,14 +181,24 @@ class TransitionTracer

/**
* @brief Store the list of bounce solutions
*
*/
std::vector<BounceSolution> ListBounceSolution;

/**
* @brief output data storage
*/
output output_store;

/**
* @brief CheckMassRatio
* @param input
* @param vev
* @param temp
* @return maximal ratio
*/
double CheckMassRatio(const user_input &input,
const std::vector<double> &vec,
const double &temp) const;
};

} // namespace BSMPT
} // namespace BSMPT
693 changes: 692 additions & 1 deletion src/ThermalFunctions/NegativeBosonSpline.cpp

Large diffs are not rendered by default.

9 changes: 0 additions & 9 deletions src/ThermalFunctions/ThermalFunctions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -338,15 +338,6 @@ double JbosonInterpolated(const double &x, int diff)
return res;
}

tk::spline JbosonNegativeSpline(NegLinearIntTransposed[0],
NegLinearIntTransposed[1],
tk::spline::cspline,
false,
tk::spline::first_deriv,
-pow(M_PI, 2) / 12,
tk::spline::first_deriv,
3.816357189);

double JbosonInterpolatedNegative(const double &x, int diff)
{
if (x >= 0) return 0;
Expand Down
76 changes: 75 additions & 1 deletion src/transition_tracer/transition_tracer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,9 @@ TransitionTracer::TransitionTracer(user_input &input)
new_transition_data.crit_false_vev =
pair.false_phase.Get(pair.crit_temp).point;

auto max_ratio = CheckMassRatio(
input, new_transition_data.crit_false_vev, pair.crit_temp);

BounceSolution bounce(input.modelPointer,
mintracer,
pair,
Expand Down Expand Up @@ -172,6 +175,11 @@ TransitionTracer::TransitionTracer(user_input &input)
.Get(new_transition_data.nucl_approx_temp.value_or(
EmptyValue))
.point;

auto max_ratio =
CheckMassRatio(input,
new_transition_data.nucl_approx_false_vev,
bounce.GetNucleationTempApprox());
}
else
{
Expand All @@ -195,6 +203,11 @@ TransitionTracer::TransitionTracer(user_input &input)
pair.false_phase
.Get(new_transition_data.nucl_temp.value_or(EmptyValue))
.point;

auto max_ratio =
CheckMassRatio(input,
new_transition_data.nucl_false_vev,
bounce.GetNucleationTemp());
}
else
{
Expand All @@ -218,6 +231,11 @@ TransitionTracer::TransitionTracer(user_input &input)
pair.false_phase
.Get(new_transition_data.perc_temp.value_or(EmptyValue))
.point;

auto max_ratio =
CheckMassRatio(input,
new_transition_data.perc_false_vev,
bounce.GetPercolationTemp());
}
else
{
Expand All @@ -243,6 +261,11 @@ TransitionTracer::TransitionTracer(user_input &input)
.Get(
new_transition_data.compl_temp.value_or(EmptyValue))
.point;

auto max_ratio =
CheckMassRatio(input,
new_transition_data.compl_false_vev,
bounce.GetCompletionTemp());
}
else
{
Expand Down Expand Up @@ -489,4 +512,55 @@ TransitionTracer::~TransitionTracer()
{
}

} // namespace BSMPT
double TransitionTracer::CheckMassRatio(const user_input &input,
const std::vector<double> &vec,
const double &temp) const
{
std::stringstream ss;
std::vector<double> massOverTempSq, massOverTempSqGauge;
massOverTempSq = input.modelPointer->HiggsMassesSquared(
input.modelPointer->MinimizeOrderVEV(vec), temp) /
std::pow(temp, 2);
massOverTempSqGauge = input.modelPointer->GaugeMassesSquared(
input.modelPointer->MinimizeOrderVEV(vec), temp) /
std::pow(temp, 2);

massOverTempSq.insert(massOverTempSq.end(),
massOverTempSqGauge.begin(),
massOverTempSqGauge.end());

int color = 0;
for (auto el : massOverTempSq)
{
if (el > 0.25) // m/T > 0.5
{
color = 1;
if (el > 1) // m/T > 1.0
{
color = 2;
break;
}
}
}

if (color == 0)
{
ss << "\n\033[1;92mm^2(vev_false, T = " << std::to_string(temp)
<< ") / T^2 = " << vec_to_string(massOverTempSq) << "\033[0m\n";
}
else if (color == 1)
{
ss << "\n\033[1;93mm^2(vev_false, T = " << std::to_string(temp)
<< ") / T^2 = " << vec_to_string(massOverTempSq) << "\033[0m\n";
}
else
{
ss << "\n\033[1;91mm^2(vev_false, T = " << std::to_string(temp)
<< ") / T^2 = " << vec_to_string(massOverTempSq) << "\033[0m\n";
}

Logger::Write(LoggingLevel::TransitionDetailed, ss.str());
return *std::max_element(massOverTempSq.begin(), massOverTempSq.end());
}

} // namespace BSMPT
54 changes: 53 additions & 1 deletion tests/unittests/Test-gw.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -683,6 +683,58 @@ TEST_CASE("Checking phase tracking for SM with Mode 2", "[gw]")
REQUIRE(vac.PhasesList.size() == 2);
}

TEST_CASE("Check maximal thermal mass squared over temperature ratio")
{
const std::vector<double> example_point_SM{
/* muSq = */ -7823.7540500000005,
/* lambda = */ 0.12905349405143487};

using namespace BSMPT;
const auto SMConstants = GetSMConstants();
std::shared_ptr<BSMPT::Class_Potential_Origin> modelPointer =
ModelID::FChoose(ModelID::ModelIDs::SM, SMConstants);
modelPointer->initModel(example_point_SM);

std::shared_ptr<MinimumTracer> MinTracer(
new MinimumTracer(modelPointer, Minimizer::WhichMinimizerDefault, false));

user_input input;
input.modelPointer = modelPointer;
input.gw_calculation = true;
TransitionTracer trans(input);
trans.ListBounceSolution.at(0).CalculatePercolationTemp();

auto output = trans.output_store;

REQUIRE(0.781639 == Approx(trans.CheckMassRatio(
input,
output.vec_trans_data.at(0).crit_false_vev,
output.vec_trans_data.at(0).crit_temp.value()))
.epsilon(1e-2));
REQUIRE(0.781639 ==
Approx(trans.CheckMassRatio(
input,
output.vec_trans_data.at(0).nucl_approx_false_vev,
output.vec_trans_data.at(0).nucl_approx_temp.value()))
.epsilon(1e-2));
REQUIRE(0.781639 == Approx(trans.CheckMassRatio(
input,
output.vec_trans_data.at(0).nucl_false_vev,
output.vec_trans_data.at(0).nucl_temp.value()))
.epsilon(1e-2));
REQUIRE(0.781639 == Approx(trans.CheckMassRatio(
input,
output.vec_trans_data.at(0).perc_false_vev,
output.vec_trans_data.at(0).perc_temp.value()))
.epsilon(1e-2));
REQUIRE(0.781639 ==
Approx(trans.CheckMassRatio(
input,
output.vec_trans_data.at(0).compl_false_vev,
output.vec_trans_data.at(0).compl_temp.value()))
.epsilon(1e-2));
}

TEST_CASE("Checking phase tracking and GW for BP3", "[gw]")
{
const std::vector<double> example_point_CXSM{/* v = */ 245.34120667410863,
Expand Down Expand Up @@ -843,7 +895,7 @@ TEST_CASE("Checking phase tracking and GW for BP3 (low sample)", "[gw]")
}

TEST_CASE(
"Checking phase tracking and GW for BP3 (low sample) (suposed to fail)",
"Checking phase tracking and GW for BP3 (low sample) (supposed to fail)",
"[gw]")
{
const std::vector<double> example_point_CXSM{/* v = */ 245.34120667410863,
Expand Down
Loading

0 comments on commit a0a4c78

Please sign in to comment.