Skip to content

Commit

Permalink
Merge pull request #6 from vbertone/IntrinsicHeavyFlavours
Browse files Browse the repository at this point in the history
Intrinsic heavy flavours
  • Loading branch information
vbertone authored Aug 10, 2020
2 parents b214628 + 7e332ad commit e2bfafa
Show file tree
Hide file tree
Showing 159 changed files with 6,756 additions and 4,428 deletions.
5 changes: 3 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
version: 2
jobs:
build:
machine: true
machine:
image: ubuntu-1604:202004-01
steps:
- checkout
- run: sudo apt-get update
- run: sudo apt-get install g++ cmake valgrind
- run: cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_FLAGS_DEBUG="-g -fsanitize=address -std=c++11" . && make
- run: cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_FLAGS_DEBUG="-g -fsanitize=address -std=c++11" . && make -j8
- run: ctest -V
7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,15 @@ tests/ogata_test
tests/gpd_test
tests/polylog_test
tests/expansion_test
tests/siaxsec_test
doc/src/codes/FOvsAsy
doc/src/codes/logs
doc/src/codes/EvolutionFactor
doc/src/codes/LeptonicModulation
doc/src/codes/PhaseSpaceRedFactor
doc/src/codes/NewPrescription
doc/src/codes/PhaseSpacePowerCorrs
doc/src/codes/Alphas

# Compiled Object files
*.slo
Expand Down Expand Up @@ -79,4 +81,7 @@ bin/apfelxx-config
*.ipynb_checkpoints/

# Python
__pycache__
__pycache__

# Build directory
build
73 changes: 41 additions & 32 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,57 +1,66 @@
cmake_minimum_required (VERSION 2.6)
# Set a default build type if none was specified
if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
message(STATUS "Setting build type to 'Release' as none was specified.")
set(CMAKE_BUILD_TYPE Release CACHE STRING "Choose the type of build." FORCE)
# Set the possible values of build type for cmake-gui
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release"
"MinSizeRel" "RelWithDebInfo")
endif()
# BASIC DEFINITIONS ========================================================================

if (NOT DEFINED CMAKE_MACOSX_RPATH)
set(CMAKE_MACOSX_RPATH 0)
endif()
# define minimum version of cmake
cmake_minimum_required (VERSION 3.5)

# the project name
# define project name and its language
project(apfel CXX Fortran)

# activating some global properties for the project
set(apfel_VERSION 4.3.0)
# define c++ standard and issue all the warning demanded by this standard
set(CMAKE_BUILD_TYPE Release)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -fPIC")
#set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -Wall -Wextra -fPIC")
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -fPIC")
set(CMAKE_SHARED_LINKER_FLAGS -w)

if (NOT DEFINED CMAKE_MACOSX_RPATH)
set(CMAKE_MACOSX_RPATH 0)
endif()

# VERSION ==============================================================================

set(apfel_VERSION 4.4.0)

# export version to file
configure_file(
"${PROJECT_SOURCE_DIR}/inc/apfel/version.h.in"
"${PROJECT_BINARY_DIR}/inc/apfel/version.h"
"${PROJECT_SOURCE_DIR}/inc/apfel/version.h"
)

# CONFIG SCRIPT =========================================================================

# Configuration script
set(prefix ${CMAKE_INSTALL_PREFIX})
set(exec_prefix "${prefix}")
set(includedir "${prefix}/include")
set(libdir "${prefix}/lib")
configure_file(
"${PROJECT_SOURCE_DIR}/bin/apfelxx-config.in"
"${PROJECT_SOURCE_DIR}/bin/apfelxx-config"
)
configure_file("${PROJECT_SOURCE_DIR}/bin/apfelxx-config.in" "${PROJECT_SOURCE_DIR}/bin/apfelxx-config")

# FINALIZE ==================================================================================

# include directory
include_directories(${PROJECT_SOURCE_DIR}/inc)

# build target library
add_subdirectory(src)
# generate list of source files
file(GLOB_RECURSE source_files src/*)

# build test codes
enable_testing()
add_subdirectory(tests)

# define target library
set(LIBRARY_OUTPUT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/lib)

add_library(apfelxx SHARED ${source_files})

option(BUILD_TESTS "Build tests code" ON)
if(BUILD_TESTS)
enable_testing()
add_subdirectory(tests)
endif(BUILD_TESTS)
# define libraries to be linked
target_link_libraries(apfelxx)

install(FILES ${PROJECT_SOURCE_DIR}/bin/apfelxx-config
DESTINATION bin
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
# install
install(TARGETS apfelxx
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib)
install(DIRECTORY inc/apfel DESTINATION include)
install(FILES ${PROJECT_SOURCE_DIR}/bin/apfelxx-config DESTINATION bin
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
11 changes: 5 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
[![CircleCI](https://circleci.com/gh/vbertone/apfelxx.svg?style=svg&circle-token=079509ce5a2d4da15596d7812b33dca48eec8dc7)](https://circleci.com/gh/vbertone/apfelxx)
[![CodeFactor](https://www.codefactor.io/repository/github/vbertone/apfelxx/badge)](https://www.codefactor.io/repository/github/vbertone/apfelxx)

![alt text](https://github.com/vbertone/apfelxx/raw/master/resources/logo.png "Logo APFEL")

# APFEL++: A PDF evolution library in C++

APFEL++ is a C++ rewriting of the Fortran 77 evolution code APFEL (see
http://apfel.hepforge.org and
https://github.com/scarrazza/apfel). APFEL++ is based on a completely
https://github.com/vbertone/apfel). APFEL++ is based on a completely
new code design and guarantees a better performance along with a more
optimal memory management. The new modular structure allows for a
better maintainability and an easier extensibility. This makes APFEL++
Expand All @@ -18,7 +19,7 @@ sections, are easily implementable in APFEL++.

## Homebrew (macOS)

APFEL++ is available through the [Homebrew-hep](https://github.com/davidchall/homebrew-hep) tap of [Homebrew](https://brew.sh). After having installed Homebrew and tapped Homebrew-hep, the latest stable release of APFEL++ is downloaded and installed with:
APFEL++ is available through the [Homebrew-hep](https://github.com/davidchall/homebrew-hep) tap of [Homebrew](https://brew.sh). After having installed Homebrew and tapped Homebrew-hep, the latest stable release of APFEL++ can be downloaded and installed with:
```Shell
brew install apfelxx
```
Expand Down Expand Up @@ -47,7 +48,8 @@ The code can be compiled using the following procedure:

```Shell
cd apfelxx
cmake -DCMAKE_INSTALL_PREFIX=/your/installation/path/ .
mkdir build && cd build
cmake -DCMAKE_INSTALL_PREFIX=/your/installation/path/ ..
make && make install
```
By the default, if no prefix specification is given, the program will
Expand All @@ -64,9 +66,6 @@ ccmake .
Code documentation generated with Doxygen can be found here:
https://vbertone.github.io/apfelxx/html/index.html.

Visit also the HepForge webpage http://apfel.hepforge.org and the
APFEL Web interface http://apfel.mi.infn.it/.

## Relevant references

- V. Bertone, *APFEL++: A new PDF evolution library in C++*, [arXiv:1708.00911](https://arxiv.org/pdf/1708.00911.pdf).
Expand Down
Loading

0 comments on commit e2bfafa

Please sign in to comment.