Skip to content

Commit

Permalink
Update BSMPT to version 3 (#127)
Browse files Browse the repository at this point in the history
* initial commit of BSMPT v3

* Automated commit of cmake-format changes.

* move constants to SMparam.h

* more const correctness, pragma once and repair sh

* Partially extract NegativeBosonSpline.h into a cpp.

* Automated commit of cmake-format changes.

* enum on action status

* Removed saving the path deformation iterations

* Removed "to_format" function

* Updated information about "h2OmSens()"

* Convert "WarpPath()" to const function

* "Potencial" -> "Potential"

* Remove unnecessary TODO

* assert -> throw on vector addition

* Fixed additional asserts -> throw

* Update include/BSMPT/utility/utility.h

Co-authored-by: Philipp Basler <[email protected]>

* try to fix M_PI for windows

* add numeric library

* Added unit tests to dot product and matrix multiplication

* rename slice points to start/end

* Fix windows compilation

* Remove legacy code of negative J_boson

* Remove default constructor of "BounceActionInt"

* trackPhase -> TrackPhase

* Removed "experimental/filesystem"

* Move include inside ifndef

* add algorithm to utility.h

* Fix windows tests when potential and grad where not passed by reference.

* Removed unused variable "count" in minimum_tracer.cpp

* Remove unused function "ClearFolder()"

* Added GW spectrum to unit tests.

* Remove unused function "GradientIncreases()"

* Add "/standalone/" to the codecov ignore list.

* Tests for EW symmetry restoration

* Fix naming convention to "PascalCase". Fixed some "[i]" -> ".at[i]"

* Removed "nHiggsGauge"

* Use "enum class" in action_calculation

* Removed coment.

* Remove comment about hessians

* Const correctness in "split()"

* Moved constants into "ISMConstants"

* Remove TODO and converted into issue

* Removed documentation from .cpp files

* Converted "std::endl" -> "\n"

* Removed useless variable

* Improve names of some variables, added support for T = 0 bounce solver and added unit tests for it.

* Moved some documentation and definitions to the headers

* Remove TODO on finite differences

* Add some files to COVERAGE_EXCLUDES

* Const correctness in "TrackPhase()"

* Remove TODO in UnderShoot/Overshoot

* Removed unused function from "action_calculation.cpp"

* Function to get status of logger. If statement to see if it is worth calculate the output of logger

* Remove legacy comments from "const_velocity_spline.cpp" and use analytical version of the derivative instead.

* Added test for J_1 and increases accuracy required.

* Const correctness on "Phase" class constructors.

* Const correctness on "LocateMinimum()"

* Const correctness on "ConvertToNonFlatDirections()"

* Added unit tests for the SM. Thanks @lisabiermann

* -1 acts as a flag outside class "BounceActionInt"

* Added tests for the different vwalls.

* Removed unused function in class "BounceActionInt()"

* Added test the case of a low number of solutions.

* Remove unused function

* Add tests for Mode 0 [BP3] / Mode 1 [SM] and Mode 2 [SM] of the phase tracker.

* Update "example_point_SM" in tests

* Remove unused function

* Left Logger on "Test-gw.cpp" by mistake

* Remove TODO on "ExactSolutionLin()"

* Split error and catch if path is backwards on the bounce solver.

* Add tests when initial scan fails

* Print action when it is calculated successfully.

* Const correctness of class "BounceSolution" and added "NumberOfInitialScanTemperatures"

* Prevent situation where solution without overshoot/undershot was accepted.

* Improved case of a single bounce solution in the whole temperature range.

* Modified test to also check "GWScanTowardsLowAction" and "GWScanTowardsHighAction"

* Remove "_USE_MATH_DEFINES" in favour of "gsl/gsl_math.h" for M_PI

* Try local linter workflow

* Adjust ref in checkout

* Add git configuration for workflow

* Automatically applied linter

* Remove exit 1

* Restored copyright to "GenerateTestCompares/R2HDM.h"

* Const correctness in "GWInitialScan()" and "CalculateActionAt()"

* Remove placeholder for the manual's arxiv ref.

* Moved "Transpose()" into "utility.cpp". Removed "cvspline" namespace. Added documentation to class "cvspline"

* Added tests for "Transpose()" and "L2NormVector()" functions.

* Const correctness on class "cvspline"

* " " -> sep in function "vec_to_string()"

* Convert error codes to enum

* use std::optional<double> instead of setting double to NANs

* Add "#include <optional>" not needed on Mac

* Const correctness on "NablaNumerical()" and "HessianNumerical()"

* Const correctness in "RK5_step()"

* Const correctness in "CalculateKineticTermAction()" and "CalculatePotentialTermAction()"

* Remove class "BounceSolution" default constructor.

* Const correctness on class "BounceSolution" constructors

* Additional const correctness on "BounceSolution" constructors.

* Remove unused function "ExactSolutionCons()".

* Const correctness in "NormalForce()" and "NormalForceBernstein()"

* Const correctness in "AuxFunctionDev()"

* Remove TODO in "BackwardsPropagation()"

* Const correctness of "MinimumTracer" constructor

* Consistence initial value for all temps.

* Comment on the small constant added to the "SmallestEigenvalue"

* Correct typo on argument of "NablaNumerical()"

* Remove some static declaration on class "BounceActionInt"

* Moved "tk::spline" and "asciiplotter" into seperate folders.

* Automated commit of cmake-format changes.

* CMake changes

* Automated commit of cmake-format changes.

* Fix closing )

* remove static derivatives (#133)

* replace static derivatives through free function

* avoid copy in referenced function

* trigger workflow

* use correct header

* fix tests by keeping both Hessian methods

* Use only one version of "NumericalHessian()" and remove "dim" from "NablaNumerical()" and "NumericalHessian()"

* Increase diagonal shift of the Hessian in "LocateMinimum()"

* HessianDiagonalShift : 1e-2 -> 1e-3

* Update .github/workflows/test.yml

---------

Co-authored-by: Philipp Basler <[email protected]>
Co-authored-by: João Viana <[email protected]>

* Automated commit of cmake-format changes.

* Added commit message to tk::spline and aciiplotter README

* Clean up ".gitignore"

* "--logginglevel::complete" behaves like other logginglevels

* Fix typo from PTPlot papers. Corrected in LISA documents

* Remove "_USE_MATH_DEFINES" from tk::spline

* Removed commented out code.

* Restore FileCopyrightText file

* Rewrite and correct bug on "BackwardsPropagation()"

* Add missing gsl math include for windows

* Remove changes in spline.cpp

* Include _USE_MATH_DEFINES for spline

* Automated commit of cmake-format changes.

* Use simplified formula for diagonal elements

* Update .github/workflows/test.yml

* Formated the "HessianNumerical()" diagonal part

* Bug found slighly chaned some test values.

* Increse SNR maximum error to 5% on the unit tests

* Remove "NoSignFlip()" as we have better functions

* Ignore example

* New testing. Might take a long time

* Run tests

* More tests and removed part of function never used

* Add test to check enum to string conversion

* Automatically applied linter

* Update .github/workflows/test.yml

* Removed commented out code.

* Class "BounceActionInt" default constructor had an additional ";"

* add bracket for readability

* Automatically applied linter

---------

Co-authored-by: lisabiermann <[email protected]>
Co-authored-by: João Viana <[email protected]>
Co-authored-by: vollous <[email protected]>
Co-authored-by: Philipp Basler <[email protected]>
Co-authored-by: vollous <[email protected]>
Co-authored-by: GitHub Actions Bot <>
Co-authored-by: Philipp Basler <[email protected]>
Co-authored-by: phbasler <[email protected]>
  • Loading branch information
8 people authored Apr 30, 2024
1 parent 51985f6 commit 857306f
Show file tree
Hide file tree
Showing 113 changed files with 24,335 additions and 2,731 deletions.
4 changes: 4 additions & 0 deletions .codecov.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,7 @@ ignore:
- "src/models/ClassPotentialOrigin_deprecated.cpp"
- "src/models/ClassTemplate.cpp"
- "src/WallThickness/WallThickness1D.cpp"
- "standalone/**"
- "src/utility/spline/spline.cpp"
- "src/utility/asciiplotter/asciiplotter.cpp"
- "example/**"
51 changes: 40 additions & 11 deletions .github/workflows/cpp-linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,46 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: cpp-linter/cpp-linter-action@v2
id: linter
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
style: "file"
tidy-checks: '-*'
version: '14'
fetch-depth: 0
ref: ${{ github.head_ref }}

- name: Fail fast?!
if: steps.linter.outputs.checks-failed > 0
- name: Install clang-format
if: inputs.apply_clang_format
run: pip3 install clang-format==14.0.0

- run: git fetch origin $GITHUB_BASE_REF

- name: Set Branch name
id: branch-name
run:
echo "branchName=$GITHUB_BASE_REF" >> $GITHUB_OUTPUT

- name: Define base git diff args
id: git-diff-args
run: |
echo "args=origin/${{steps.branch-name.outputs.branchName}}..HEAD" >> $GITHUB_OUTPUT
- name: Apply clang-format on changed files
run: |
changedFileList=`git diff ${{steps.git-diff-args.outputs.args}} --name-only --diff-filter=d -- '***.hpp' '***.cpp' '***.h' '***.c'`
for file in $changedFileList; do echo "Checking file " $file; clang-format --style=file -i $file; done
- name: Check if we have local changes
id: check-changes
shell: bash
run: |
echo "Some files failed the linting checks!"
exit 1
if [[ -z $(git status --porcelain --untracked-files=no) ]]; then echo "ChangesFound=False" >> $GITHUB_OUTPUT; else echo "ChangesFound=True" >> $GITHUB_OUTPUT; fi
- name: setup git config
run: |
# setup the username and email. I tend to use 'GitHub Actions Bot' with no email by default
git config user.name "GitHub Actions Bot"
git config user.email "<>"
- name: Commit changes
if: steps.check-changes.outputs.ChangesFound == 'True'
run: |
git commit -am "Automatically applied linter"
git push
7 changes: 5 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,12 @@ name: Unit tests

on:
push:
branches: [ master ]
branches:
- master
pull_request:
branches: [ master, develop ]
branches:
- master
- develop
workflow_dispatch:


Expand Down
16 changes: 9 additions & 7 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
# SPDX-FileCopyrightText: 2021 Philipp Basler, Margarete Mühlleitner and Jonas Müller
# SPDX-FileCopyrightText: 2021 Philipp Basler, Margarete Mühlleitner and Jonas Müller
#
# SPDX-License-Identifier: GPL-3.0-or-later

build
# SPDX-License-Identifier: GPL-3.0-or-later

build/
tmp/
tmp*
local/
.*
.vscode
.atom

analyze*.py
*.aux
*.log
*.out
*.synctex.gz

CMakeUserPresets.json
__pycache__/Build.cpython-310.pyc
__pycache__/Setup.cpython-310.pyc
__pycache__/*
10 changes: 7 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
cmake_minimum_required(VERSION 3.23)
project(
BSMPT
VERSION 2.6.0
VERSION 3.0.0
LANGUAGES C CXX
DESCRIPTION
"BSMPT - Beyond the Standard Model Phase Transitions : A C++ package for the computation of the EWPT in BSM models"
Expand Down Expand Up @@ -139,7 +139,10 @@ if(EnableCoverage)
"${PROJECT_SOURCE_DIR}/src/Kfactors/Kfactors.cpp"
"${PROJECT_SOURCE_DIR}/src/models/ClassPotentialOrigin_deprecated.cpp"
"${PROJECT_SOURCE_DIR}/src/models/ClassTemplate.cpp"
"${PROJECT_SOURCE_DIR}/src/WallThickness/WallThickness1D.cpp")
"${PROJECT_SOURCE_DIR}/src/WallThickness/WallThickness1D.cpp"
"${PROJECT_SOURCE_DIR}/src/standalone/*"
"${PROJECT_SOURCE_DIR}/src/utility/spline/spline.cpp"
"${PROJECT_SOURCE_DIR}/src/utility/asciiplotter/asciiplotter.cpp")
setup_target_for_coverage_lcov(
NAME
coverage # New target name
Expand All @@ -156,6 +159,7 @@ endif(EnableCoverage)
find_lto(CXX)

add_subdirectory(src)
add_subdirectory(standalone)

# -------------------------- export as cmake package --------------------------
if(PROJECT_SOURCE_DIR STREQUAL CMAKE_SOURCE_DIR)
Expand All @@ -165,7 +169,7 @@ if(PROJECT_SOURCE_DIR STREQUAL CMAKE_SOURCE_DIR)
VERSION ${PACKAGE_VERSION}
COMPATIBILITY AnyNewerVersion)

set(ExportList Models Minimizer ThermalFunctions Utility)
set(ExportList Models Minimizer ThermalFunctions Utility Spline ASCIIPlotter)

if(BSMPTCompileBaryo)
set(ExportList ${ExportList} Baryo LibWallThickness Kfactors)
Expand Down
Loading

0 comments on commit 857306f

Please sign in to comment.