Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package libecpint for openSUSE:Factory checked in at 2021-12-14 22:02:20 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/libecpint (Old) and /work/SRC/openSUSE:Factory/.libecpint.new.2520 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libecpint" Tue Dec 14 22:02:20 2021 rev:7 rq:940555 version:1.0.7 Changes: -------- --- /work/SRC/openSUSE:Factory/libecpint/libecpint.changes 2021-07-25 20:09:31.395426304 +0200 +++ /work/SRC/openSUSE:Factory/.libecpint.new.2520/libecpint.changes 2021-12-14 22:02:44.971166854 +0100 @@ -1,0 +2,8 @@ +Sun Dec 12 20:01:42 UTC 2021 - Christoph Junghans <jungh...@votca.org> + +- Update to 1.0.7: + - option to use cerf instead of Faddeeva + - googletest branch is main not master + - tests that use xml only triggered if xml included + +------------------------------------------------------------------- Old: ---- libecpint-1.0.6.tar.gz New: ---- libecpint-1.0.7.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libecpint.spec ++++++ --- /var/tmp/diff_new_pack.ZpcE8i/_old 2021-12-14 22:02:45.547167183 +0100 +++ /var/tmp/diff_new_pack.ZpcE8i/_new 2021-12-14 22:02:45.551167185 +0100 @@ -18,7 +18,7 @@ Name: libecpint -Version: 1.0.6 +Version: 1.0.7 Release: 0 %global sover 1 Summary: Efficient evaluation of integrals over ab initio effective core potentials @@ -31,6 +31,7 @@ BuildRequires: doxygen BuildRequires: gcc-c++ BuildRequires: gtest +BuildRequires: libcerf-devel >= 1.17 BuildRequires: pugixml-devel BuildRequires: python3 BuildRequires: sphinx @@ -81,18 +82,14 @@ %setup -q %build -%{cmake} -DCMAKE_SKIP_RPATH=OFF +%{cmake} -DCMAKE_SKIP_RPATH=OFF -DLIBECPINT_USE_CERF=ON %cmake_build %install %cmake_install %check -# https://github.com/robashaw/libecpint/issues/27 -%ifarch i586 -%global testargs --exclude-regex Type1Test2 -%endif -%ctest %{?testargs} +%ctest %post -n libecpint%sover -p /sbin/ldconfig %postun -n libecpint%sover -p /sbin/ldconfig ++++++ libecpint-1.0.6.tar.gz -> libecpint-1.0.7.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libecpint-1.0.6/CMakeLists.txt new/libecpint-1.0.7/CMakeLists.txt --- old/libecpint-1.0.6/CMakeLists.txt 2021-04-15 15:28:46.000000000 +0200 +++ new/libecpint-1.0.7/CMakeLists.txt 2021-12-05 15:40:21.000000000 +0100 @@ -6,10 +6,10 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_CXX_EXTENSIONS OFF) #...without compiler extensions like gnu++11 -#build type +# build type if(NOT CMAKE_BUILD_TYPE) - message(STATUS "No build type specified. Will build Release") - set (CMAKE_BUILD_TYPE Release CACHE STRING "Build type (Release/Debug/RelWithDebInfo)") + message(STATUS "No build type specified. Will build Release.") + set(CMAKE_BUILD_TYPE Release CACHE STRING "Build type (Release/Debug/RelWithDebInfo)") else() string(TOUPPER "${CMAKE_BUILD_TYPE}" _upper_build_type) if("${_upper_build_type}" STREQUAL "DEBUG") @@ -19,15 +19,15 @@ # define project project( libecpint - VERSION 1.0.5 + VERSION 1.0.7 LANGUAGES C CXX) set(API_VERSION 1) -set (CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake" ${CMAKE_MODULE_PATH}) +set(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake" ${CMAKE_MODULE_PATH}) # code generator variables -set (LIBECPINT_MAX_L "5" CACHE STRING "Maximum angular momentum") -set (LIBECPINT_MAX_UNROL "1" CACHE STRING "Maximum L for unrolling") +set(LIBECPINT_MAX_L "5" CACHE STRING "Maximum angular momentum") +set(LIBECPINT_MAX_UNROL "1" CACHE STRING "Maximum L for unrolling") # configure the config header to pass the above variables to the program configure_file ( @@ -37,6 +37,7 @@ include(GNUInstallDirs) include(ExternalProject) + option(LIBECPINT_USE_PUGIXML "Use pugixml and build file reading routines." ON) if (LIBECPINT_USE_PUGIXML) include(external/ImportPugiXML.cmake) @@ -45,22 +46,40 @@ message(STATUS "pugixml not configured; reading ECP definitions from files is disabled.") endif() +option(LIBECPINT_USE_CERF "Detect pre-built Cerf library for complex error functions. OFF builds internal Faddeeva library." OFF) + +if(MSVC) + # MSVC does not include <cmath> constants, unless _USE_MATH_DEFINES is defined. + add_definitions("/D_USE_MATH_DEFINES") + # Set the exception handling model + add_definitions("/EHsc") +endif() + add_subdirectory(external) add_subdirectory(src) option(LIBECPINT_BUILD_TESTS "Enables Libecpint tests." ON) if (LIBECPINT_BUILD_TESTS) + message(STATUS "Will build libecpint tests.") include(CTest) include(external/ImportGTest.cmake) enable_testing() add_subdirectory(tests) endif() + option(LIBECPINT_BUILD_DOCS "Enables Libecpint documentation." ON) if (LIBECPINT_BUILD_DOCS) add_subdirectory(doc) endif() -install (DIRECTORY include/libecpint DESTINATION include) -install (FILES include/libecpint.hpp DESTINATION include) -install (FILES "${CMAKE_CURRENT_BINARY_DIR}/include/libecpint/config.hpp" DESTINATION include/libecpint) -install (DIRECTORY share/libecpint DESTINATION share) +install(DIRECTORY include/libecpint DESTINATION include PATTERN "*.in" EXCLUDE) +install(FILES include/libecpint.hpp DESTINATION include) +install(FILES "${CMAKE_CURRENT_BINARY_DIR}/include/libecpint/config.hpp" DESTINATION include/libecpint) +install(DIRECTORY share/libecpint DESTINATION share) + +message("\nSummary:") +message("--------") +message(STATUS "Maximum angular momentum : ${LIBECPINT_MAX_L}") +message(STATUS "Maximum angular momentum unrolling : ${LIBECPINT_MAX_UNROL}") +message(STATUS "Build tests : ${LIBECPINT_BUILD_TESTS}") +message("") diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libecpint-1.0.6/LICENSE new/libecpint-1.0.7/LICENSE --- old/libecpint-1.0.6/LICENSE 2021-04-15 15:28:46.000000000 +0200 +++ new/libecpint-1.0.7/LICENSE 2021-12-05 15:40:21.000000000 +0100 @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2020 Robert A. Shaw +Copyright (c) 2021 Robert A. Shaw Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libecpint-1.0.6/README.md new/libecpint-1.0.7/README.md --- old/libecpint-1.0.6/README.md 2021-04-15 15:28:46.000000000 +0200 +++ new/libecpint-1.0.7/README.md 2021-12-05 15:40:21.000000000 +0100 @@ -1,10 +1,13 @@ -# Libecpint 1.0.5 +# Libecpint 1.0.7 [](https://dev.azure.com/robertshaw383/libecpint/_build/latest?definitionId=2&branchName=master) [](https://codecov.io/gh/robashaw/libecpint) [](https://libecpint.readthedocs.io/en/latest/index.html) []() +[](https://doi.org/10.5281/zenodo.4694353) +[](https://doi.org/10.21105/joss.03039) + Libecpint is a C++ library for the efficient evaluation of integrals over ab initio effective core potentials, using a mixture of generated, recursive code and Gauss-Chebyshev quadrature. It is designed to be standalone and generic, and is now in its first stable release. If you experience any problems please raise an issue here; contributions and suggestions are also welcome. ## Contributing diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libecpint-1.0.6/doc/doxygen/Doxyfile new/libecpint-1.0.7/doc/doxygen/Doxyfile --- old/libecpint-1.0.6/doc/doxygen/Doxyfile 2021-04-15 15:28:46.000000000 +0200 +++ new/libecpint-1.0.7/doc/doxygen/Doxyfile 2021-12-05 15:40:21.000000000 +0100 @@ -38,7 +38,7 @@ # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = 1.0.5 +PROJECT_NUMBER = 1.0.7 # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libecpint-1.0.6/doc/sphinx/source/conf.py new/libecpint-1.0.7/doc/sphinx/source/conf.py --- old/libecpint-1.0.6/doc/sphinx/source/conf.py 2021-04-15 15:28:46.000000000 +0200 +++ new/libecpint-1.0.7/doc/sphinx/source/conf.py 2021-12-05 15:40:21.000000000 +0100 @@ -79,7 +79,7 @@ # The short X.Y version. version = '1.0' # The full version, including alpha/beta/rc tags. -release = '1.0.0' +release = '1.0.7' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libecpint-1.0.6/example/CMakeLists.txt new/libecpint-1.0.7/example/CMakeLists.txt --- old/libecpint-1.0.6/example/CMakeLists.txt 2021-04-15 15:28:46.000000000 +0200 +++ new/libecpint-1.0.7/example/CMakeLists.txt 2021-12-05 15:40:21.000000000 +0100 @@ -1,7 +1,7 @@ cmake_minimum_required(VERSION 3.12 FATAL_ERROR) # define project -project( LibecpintExample +project( LibecpintExample VERSION 1.0 LANGUAGES CXX) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libecpint-1.0.6/external/CMakeLists.txt.in new/libecpint-1.0.7/external/CMakeLists.txt.in --- old/libecpint-1.0.6/external/CMakeLists.txt.in 2021-04-15 15:28:46.000000000 +0200 +++ new/libecpint-1.0.7/external/CMakeLists.txt.in 2021-12-05 15:40:21.000000000 +0100 @@ -5,11 +5,8 @@ include(ExternalProject) ExternalProject_Add(googletest GIT_REPOSITORY https://github.com/google/googletest.git - GIT_TAG master - SOURCE_DIR "${CMAKE_CURRENT_BINARY_DIR}/googletest-src" - BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/googletest-build" - CONFIGURE_COMMAND "" - BUILD_COMMAND "" - INSTALL_COMMAND "" + GIT_TAG main + INSTALL_DIR "${CMAKE_CURRENT_BINARY_DIR}/googletest-build" + CONFIGURE_COMMAND ${CMAKE_COMMAND} -S<SOURCE_DIR> -DCMAKE_INSTALL_PREFIX=<INSTALL_DIR> -DCMAKE_INSTALL_LIBDIR=${CMAKE_INSTALL_LIBDIR} TEST_COMMAND "" ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libecpint-1.0.6/external/Faddeeva/CMakeLists.txt new/libecpint-1.0.7/external/Faddeeva/CMakeLists.txt --- old/libecpint-1.0.6/external/Faddeeva/CMakeLists.txt 2021-04-15 15:28:46.000000000 +0200 +++ new/libecpint-1.0.7/external/Faddeeva/CMakeLists.txt 2021-12-05 15:40:21.000000000 +0100 @@ -1,3 +1,4 @@ +if (NOT LIBECPINT_USE_CERF) add_library(Faddeeva Faddeeva.cpp) set_property(TARGET Faddeeva PROPERTY CXX_STANDARD 11) set_target_properties(Faddeeva PROPERTIES SOVERSION ${API_VERSION}) @@ -10,3 +11,4 @@ set_property(TARGET Faddeeva PROPERTY POSITION_INDEPENDENT_CODE ON) endif() install(TARGETS Faddeeva EXPORT ecpintTargets DESTINATION ${CMAKE_INSTALL_LIBDIR}) +endif() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libecpint-1.0.6/external/ImportGTest.cmake new/libecpint-1.0.7/external/ImportGTest.cmake --- old/libecpint-1.0.6/external/ImportGTest.cmake 2021-04-15 15:28:46.000000000 +0200 +++ new/libecpint-1.0.7/external/ImportGTest.cmake 2021-12-05 15:40:21.000000000 +0100 @@ -6,10 +6,13 @@ ) if((NOT GTEST_LIBRARY) OR (NOT GTEST_INCLUDE_DIR)) - message(STATUS "Unable to find google test, cloning...") + message(STATUS "Unable to find google test, cloning and building ...") + + set(THREADS_REFER_PTHREAD_FLAG "ON") + find_package(Threads REQUIRED) # Download and unpack googletest at configure time - configure_file(${CMAKE_CURRENT_SOURCE_DIR}/external/CMakeLists.txt.in googletest-download/CMakeLists.txt) + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/external/CMakeLists.txt.in ${CMAKE_CURRENT_BINARY_DIR}/googletest-download/CMakeLists.txt) execute_process(COMMAND ${CMAKE_COMMAND} -G "${CMAKE_GENERATOR}" . RESULT_VARIABLE result WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/googletest-download ) @@ -27,14 +30,12 @@ # settings on Windows set(gtest_force_shared_crt ON CACHE BOOL "" FORCE) - # Add googletest directly to our build. This defines - # the gtest and gtest_main targets. - add_subdirectory( - ${CMAKE_CURRENT_BINARY_DIR}/googletest-src - ${CMAKE_CURRENT_BINARY_DIR}/googletest-build - ) - - set(GTEST_INCLUDE_DIR ${gtest_SOURCE_DIR}/include) + # Set GTEST interface to temporarily installed libgtest.a + set(GTEST_INCLUDE_DIR ${CMAKE_CURRENT_BINARY_DIR}/googletest-build/include) + set(GTEST_LIBRARY ${CMAKE_CURRENT_BINARY_DIR}/googletest-build/lib/libgtest.a) + add_library(gtest INTERFACE) + target_include_directories(gtest INTERFACE ${GTEST_INCLUDE_DIR}) + target_link_libraries(gtest INTERFACE ${GTEST_LIBRARY} Threads::Threads) else() message(STATUS "Found googletest: ${GTEST_INCLUDE_DIR} ${GTEST_LIBRARY}") add_library(gtest INTERFACE) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libecpint-1.0.6/external/ImportPugiXML.cmake new/libecpint-1.0.7/external/ImportPugiXML.cmake --- old/libecpint-1.0.6/external/ImportPugiXML.cmake 2021-04-15 15:28:46.000000000 +0200 +++ new/libecpint-1.0.7/external/ImportPugiXML.cmake 2021-12-05 15:40:21.000000000 +0100 @@ -9,12 +9,12 @@ ) if((NOT PUGIXML_LIBRARY) OR (NOT PUGIXML_INCLUDE_DIR)) - message(STATUS "Unable to find pugixml, cloning...") + message(STATUS "Unable to find pugixml, cloning and building ...") ExternalProject_Add(pugixml_external PREFIX ${EXTERNAL_BUILD_DIR}/pugixml GIT_REPOSITORY https://github.com/zeux/pugixml - CMAKE_ARGS ???-DCMAKE_INSTALL_PREFIX=<INSTALL_DIR>??? + CMAKE_ARGS "-DCMAKE_INSTALL_PREFIX=<INSTALL_DIR>" "-DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}" UPDATE_COMMAND "" INSTALL_COMMAND "" BUILD_BYPRODUCTS ${EXTERNAL_BUILD_DIR}/pugixml/src/pugixml_external-build/libpugixml${CMAKE_STATIC_LIBRARY_SUFFIX} @@ -26,6 +26,7 @@ add_library(libpugixml STATIC IMPORTED) add_dependencies(libpugixml pugixml_external) set_target_properties(libpugixml PROPERTIES IMPORTED_LOCATION ${PUGIXML_LIBRARY}) + install(FILES ${PUGIXML_LIBRARY} DESTINATION lib) else() message(STATUS "Found pugixml: ${PUGIXML_INCLUDE_DIR} ${PUGIXML_LIBRARY}") diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libecpint-1.0.6/include/libecpint/config.hpp.in new/libecpint-1.0.7/include/libecpint/config.hpp.in --- old/libecpint-1.0.6/include/libecpint/config.hpp.in 2021-04-15 15:28:46.000000000 +0200 +++ new/libecpint-1.0.7/include/libecpint/config.hpp.in 2021-12-05 15:40:21.000000000 +0100 @@ -29,6 +29,6 @@ #cmakedefine LIBECPINT_MAX_L @LIBECPINT_MAX_L@ // Angular momentum below which integrals are unrolled -#cmakedefine LIBECPINT_MAX_UNROL @LIBECPINT_MAX_UNROL@ +#define LIBECPINT_MAX_UNROL @LIBECPINT_MAX_UNROL@ #endif diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libecpint-1.0.6/share/libecpint/parseecp.py new/libecpint-1.0.7/share/libecpint/parseecp.py --- old/libecpint-1.0.6/share/libecpint/parseecp.py 2021-04-15 15:28:46.000000000 +0200 +++ new/libecpint-1.0.7/share/libecpint/parseecp.py 2021-12-05 15:40:21.000000000 +0100 @@ -12,7 +12,7 @@ class Shell: """ Container for a shell of an ECP i.e. the Gaussian expansion of a fixed angular momentum - + Members: lval - angular momentum quantumm number of shell powers - the power of r for each Gaussian in the shell @@ -30,7 +30,7 @@ class Atom: """ Container for an ECP for a specific atom type - + Members: name - name of the atom, e.g. 'O' for oxygen ncore - the number of core electrons in the ECP @@ -45,7 +45,7 @@ self.maxl = 0 self.nshells = nshells self.shells = [] - + def tokenize(line, sep=','): """Given a line of input, cleans up and returns tokens, split by the separator (sep) @@ -54,28 +54,28 @@ line = line.strip() tokens = line.split(sep) # get rid of additional whitespace - for token in tokens: + for token in tokens: token = token.replace(' ', '') return tokens - + def parse_ecp(file): """Given a MOLPRO-format ECP file, returns Atom objects (ECPs) for every - atom type defined in that file. + atom type defined in that file. """ atoms = [] atomnames = {} - + # read in the file lines = file.readlines() nlines = len(lines) - + # loop to the end of the file linenumber = 0 atomnumber = 0 while linenumber < nlines: tokens = tokenize(lines[linenumber], sep=',') - - # all lines where ECP definitions start will have + + # all lines where ECP definitions start will have # at least two bits "ecp,AtomName" if (len(tokens) > 2): if (tokens[0].lower() == "ecp"): @@ -89,11 +89,11 @@ new_atom.ncore = int(tokens[2]) new_atom.maxl = int(tokens[3]) # there should then be maxl+1 lines definining the shells - # in the order [maxL, 0, 1, ..., maxL-1] + # in the order [maxL, 0, 1, ..., maxL-1] for i in range(new_atom.maxl+1): linenumber += 1 tokens = tokenize(lines[linenumber], sep=';') - + # could be blank lines or comments, so check first if(len(tokens) > 1): # shell definition has form "nx; n,x,c; n,x,c; ..." @@ -102,7 +102,7 @@ l = i-1 if (i==0): l = new_atom.maxl - + # create a container for the shell new_shell = Shell(lval=l, nexp=nprims) # fill in the details of the shell as described above @@ -112,23 +112,23 @@ new_shell.powers.append(subtokens[0]) new_shell.exps.append(subtokens[1]) new_shell.contr.append(subtokens[2]) - + # append the new shell to the Atom new_atom.shells.append(new_shell) # end of Atom definition, append atoms.append(new_atom) - + linenumber += 1 - + # Return all the atoms found return atoms def write_ecp_basis(atoms, name): """Given a list of Atom objects defining ECPs, and a name for the ECP basis, - this writes the basis to XML file. + this writes the basis to XML file. """ filename = "xml/" + name + ".xml" - + # write into a binary xml file using LXML package with open(filename, 'wb') as new_file: # format is Root -> Atom1 --> Shell1 @@ -136,13 +136,13 @@ # Atom2 --> etc. root = etree.Element("root", name=name) tree = etree.ElementTree(root) - + for atom in atoms: child = etree.SubElement(root, atom.name, ncore = str(atom.ncore), maxl=str(atom.maxl)) - + for shell in atom.shells: schild = etree.SubElement(child, "Shell", lval=str(shell.lval), nexp=str(shell.nexp)) - + for i in range(shell.nexp): try: xchild = etree.SubElement(schild, "nxc", n=shell.powers[i], x=shell.exps[i], c=shell.contr[i]) @@ -162,4 +162,3 @@ input_file = open('raw/' + name + '.ecp', 'r') atoms = parse_ecp(input_file) write_ecp_basis(atoms, name) - diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libecpint-1.0.6/src/CMakeLists.txt new/libecpint-1.0.7/src/CMakeLists.txt --- old/libecpint-1.0.6/src/CMakeLists.txt 2021-04-15 15:28:46.000000000 +0200 +++ new/libecpint-1.0.7/src/CMakeLists.txt 2021-12-05 15:40:21.000000000 +0100 @@ -3,9 +3,11 @@ # Target: generate # ================== -add_executable(generate generate.cpp - lib/mathutil.cpp - lib/angular.cpp) +add_executable(generate + generate.cpp + lib/mathutil.cpp + lib/angular.cpp) + set_property(TARGET generate PROPERTY CXX_STANDARD 11) target_include_directories(generate PRIVATE @@ -50,10 +52,31 @@ $<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include/libecpint> $<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include> ) -target_link_libraries(ecpint - PRIVATE - Faddeeva -) + +if (LIBECPINT_USE_CERF) + find_package(cerf CONFIG REQUIRED) # QUIET) # COMPONENTS C) + + if(${cerf_FOUND}) + get_property(_loc TARGET cerf::cerf PROPERTY LOCATION) + message(STATUS "${Cyan}Found cerf${ColourReset}: ${_loc}") + else() + if(${CMAKE_INSIST_FIND_PACKAGE_cerf}) + message(FATAL_ERROR "Suitable cerf could not be externally located as user insists") + endif() + endif() + target_compile_definitions(ecpint PRIVATE USING_CERF=1) + target_link_libraries(ecpint + PRIVATE + cerf::cerf + ) +else() + message(STATUS "${Cyan}Using Faddeeva${ColourReset}: internal") + target_link_libraries(ecpint + PRIVATE + Faddeeva + ) +endif() + if(LIBECPINT_USE_PUGIXML) target_include_directories(ecpint PRIVATE ${PUGIXML_INCLUDE_DIR}) target_link_libraries(ecpint PRIVATE libpugixml) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libecpint-1.0.6/src/config.cmake.in new/libecpint-1.0.7/src/config.cmake.in --- old/libecpint-1.0.6/src/config.cmake.in 2021-04-15 15:28:46.000000000 +0200 +++ new/libecpint-1.0.7/src/config.cmake.in 2021-12-05 15:40:21.000000000 +0100 @@ -1,3 +1,17 @@ -include("${CMAKE_CURRENT_LIST_DIR}/ecpint-targets.cmake") - @PACKAGE_INIT@ + +#----------------------------------------------------------------------------- +# Don't include targets if this file is being picked up by another +# project which has already built this as a subproject +#----------------------------------------------------------------------------- +if(NOT TARGET ECPINT::ecpint) + + include("${CMAKE_CURRENT_LIST_DIR}/ecpint-targets.cmake") + + if(@LIBECPINT_USE_CERF@) + include(CMakeFindDependencyMacro) + if(NOT TARGET cerf::cerf) + find_dependency(cerf) + endif() + endif() +endif() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libecpint-1.0.6/src/generate.cpp new/libecpint-1.0.7/src/generate.cpp --- old/libecpint-1.0.6/src/generate.cpp 2021-04-15 15:28:46.000000000 +0200 +++ new/libecpint-1.0.7/src/generate.cpp 2021-12-05 15:40:21.000000000 +0100 @@ -1,6 +1,6 @@ -/* +/* * Copyright (c) 2020 Robert Shaw -* This file is a part of Libecpint. + This file is a part of Libecpint. * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libecpint-1.0.6/src/lib/ecpint.cpp new/libecpint-1.0.7/src/lib/ecpint.cpp --- old/libecpint-1.0.6/src/lib/ecpint.cpp 2021-04-15 15:28:46.000000000 +0200 +++ new/libecpint-1.0.7/src/lib/ecpint.cpp 2021-12-05 15:40:21.000000000 +0100 @@ -26,7 +26,6 @@ #include <iostream> #include <cmath> #include <cassert> -#include "Faddeeva.hpp" #include "mathutil.hpp" #include "qgen.hpp" #include <cassert> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libecpint-1.0.6/src/lib/radial_gen.cpp new/libecpint-1.0.7/src/lib/radial_gen.cpp --- old/libecpint-1.0.6/src/lib/radial_gen.cpp 2021-04-15 15:28:46.000000000 +0200 +++ new/libecpint-1.0.7/src/lib/radial_gen.cpp 2021-12-05 15:40:21.000000000 +0100 @@ -24,7 +24,11 @@ #include "radial.hpp" #include "mathutil.hpp" +#ifdef USING_CERF +#include "cerf.h" +#else #include "Faddeeva.hpp" +#endif #include <iostream> namespace libecpint { @@ -199,8 +203,13 @@ double result = 0.0; // G1A, G1B may not be required, but it seems to be quicker to calculate than to check if needed +#ifdef USING_CERF + double daw1 = X1 * dawson(root_p * P1); + double daw2 = X2 * dawson(root_p * P2); +#else double daw1 = X1 * Faddeeva::Dawson(root_p * P1); double daw2 = X2 * Faddeeva::Dawson(root_p * P2); +#endif double G1B = 2.0 * ROOT_PI * (daw1 - daw2); double G1A = 2.0 * ROOT_PI * (daw1 + daw2); double H2 = ROOT_PI * ( X1 + X2 ) * o_root_p; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libecpint-1.0.6/src/lib/radial_quad.cpp new/libecpint-1.0.7/src/lib/radial_quad.cpp --- old/libecpint-1.0.6/src/lib/radial_quad.cpp 2021-04-15 15:28:46.000000000 +0200 +++ new/libecpint-1.0.7/src/lib/radial_quad.cpp 2021-12-05 15:40:21.000000000 +0100 @@ -24,7 +24,6 @@ #include "radial.hpp" #include "mathutil.hpp" -#include "Faddeeva.hpp" #include <iostream> #include <cmath> @@ -276,7 +275,7 @@ double besselValue1 = bessie.upper_bound(kA * P, l1); double besselValue2 = bessie.upper_bound(kB * P, l2); double Fres = FAST_POW[N](P) * std::exp(-n * P * P - a * zA * zA - b * zB * zB) * besselValue1 * besselValue2; - return (0.5 * std::sqrt(M_PI/p) * Fres * (1.0 + Faddeeva::erf(std::sqrt(p)*P))); + return (0.5 * std::sqrt(M_PI/p) * Fres * (1.0 + std::erf(std::sqrt(p)*P))); } void RadialIntegral::type2( diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libecpint-1.0.6/src/makelist.py new/libecpint-1.0.7/src/makelist.py --- old/libecpint-1.0.6/src/makelist.py 2021-04-15 15:28:46.000000000 +0200 +++ new/libecpint-1.0.7/src/makelist.py 2021-12-05 15:40:21.000000000 +0100 @@ -1,5 +1,5 @@ # takes the arguments of max angular momentum -# and file prefix, then generates a list of all the +# and file prefix, then generates a list of all the # CPP files that will be generateds import sys @@ -12,7 +12,7 @@ for i in range(j+1): for k in range(max_am+1): if j == i == k == max_am: - file.write(prefix + "/generated/Q" + str(i) + str(j) + str(k) + ".cpp") + file.write(prefix + "/generated/Q" + str(i) + str(j) + str(k) + ".cpp") else: file.write(prefix + "/generated/Q" + str(i) + str(j) + str(k) + ".cpp\n") file.close() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libecpint-1.0.6/tests/lib/CMakeLists.txt new/libecpint-1.0.7/tests/lib/CMakeLists.txt --- old/libecpint-1.0.6/tests/lib/CMakeLists.txt 2021-04-15 15:28:46.000000000 +0200 +++ new/libecpint-1.0.7/tests/lib/CMakeLists.txt 2021-12-05 15:40:21.000000000 +0100 @@ -5,7 +5,9 @@ add_subdirectory(hess_test1) add_subdirectory(hess_test2) add_subdirectory(api_test1) +if (LIBECPINT_USE_PUGIXML) add_subdirectory(api_test2) +add_subdirectory(stress_test) +endif() add_subdirectory(type1_test1) add_subdirectory(type1_test2) -add_subdirectory(stress_test)