qupled 1.3.2__tar.gz → 1.3.3__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (149) hide show
  1. {qupled-1.3.2 → qupled-1.3.3}/.github/workflows/build-macos-wheels.yml +16 -6
  2. {qupled-1.3.2 → qupled-1.3.3}/.github/workflows/release.yml +7 -1
  3. {qupled-1.3.2 → qupled-1.3.3}/PKG-INFO +1 -1
  4. {qupled-1.3.2 → qupled-1.3.3}/docs/introduction.rst +20 -7
  5. {qupled-1.3.2 → qupled-1.3.3}/pyproject.toml +1 -1
  6. {qupled-1.3.2 → qupled-1.3.3}/setup.py +1 -1
  7. qupled-1.3.3/src/qupled/native/include/format.hpp +40 -0
  8. {qupled-1.3.2 → qupled-1.3.3}/src/qupled/native/src/CMakeLists.txt +17 -3
  9. {qupled-1.3.2 → qupled-1.3.3}/src/qupled/native/src/iet.cpp +13 -11
  10. {qupled-1.3.2 → qupled-1.3.3}/src/qupled/native/src/input.cpp +1 -1
  11. {qupled-1.3.2 → qupled-1.3.3}/src/qupled/native/src/qstls.cpp +11 -10
  12. {qupled-1.3.2 → qupled-1.3.3}/src/qupled/native/src/qstlsiet.cpp +3 -3
  13. {qupled-1.3.2 → qupled-1.3.3}/src/qupled/native/src/qvsstls.cpp +10 -4
  14. {qupled-1.3.2 → qupled-1.3.3}/src/qupled/native/src/stls.cpp +4 -4
  15. {qupled-1.3.2 → qupled-1.3.3}/src/qupled/native/src/stlsiet.cpp +1 -1
  16. {qupled-1.3.2 → qupled-1.3.3}/src/qupled/native/src/vsbase.cpp +6 -6
  17. {qupled-1.3.2 → qupled-1.3.3}/src/qupled/native/src/vsstls.cpp +0 -1
  18. {qupled-1.3.2 → qupled-1.3.3}/src/qupled.egg-info/PKG-INFO +1 -1
  19. {qupled-1.3.2 → qupled-1.3.3}/src/qupled.egg-info/SOURCES.txt +1 -0
  20. {qupled-1.3.2 → qupled-1.3.3}/.clang-format +0 -0
  21. {qupled-1.3.2 → qupled-1.3.3}/.devcontainer/Dockerfile +0 -0
  22. {qupled-1.3.2 → qupled-1.3.3}/.devcontainer/devcontainer.json +0 -0
  23. {qupled-1.3.2 → qupled-1.3.3}/.github/workflows/build-and-test.yml +0 -0
  24. {qupled-1.3.2 → qupled-1.3.3}/.github/workflows/build-linux-wheels.yml +0 -0
  25. {qupled-1.3.2 → qupled-1.3.3}/.github/workflows/build-sdist.yml +0 -0
  26. {qupled-1.3.2 → qupled-1.3.3}/.github/workflows/formatting.yml +0 -0
  27. {qupled-1.3.2 → qupled-1.3.3}/.gitignore +0 -0
  28. {qupled-1.3.2 → qupled-1.3.3}/.readthedocs.yaml +0 -0
  29. {qupled-1.3.2 → qupled-1.3.3}/LICENSE +0 -0
  30. {qupled-1.3.2 → qupled-1.3.3}/MANIFEST.in +0 -0
  31. {qupled-1.3.2 → qupled-1.3.3}/README.md +0 -0
  32. {qupled-1.3.2 → qupled-1.3.3}/dev/devtool.py +0 -0
  33. {qupled-1.3.2 → qupled-1.3.3}/dev/requirements-apt.txt +0 -0
  34. {qupled-1.3.2 → qupled-1.3.3}/dev/requirements-brew.txt +0 -0
  35. {qupled-1.3.2 → qupled-1.3.3}/dev/requirements-pip.txt +0 -0
  36. {qupled-1.3.2 → qupled-1.3.3}/devtool +0 -0
  37. {qupled-1.3.2 → qupled-1.3.3}/docs/_static/css/rdt_theme_python_properties.css +0 -0
  38. {qupled-1.3.2 → qupled-1.3.3}/docs/conf.py +0 -0
  39. {qupled-1.3.2 → qupled-1.3.3}/docs/contribute.rst +0 -0
  40. {qupled-1.3.2 → qupled-1.3.3}/docs/examples.rst +0 -0
  41. {qupled-1.3.2 → qupled-1.3.3}/docs/index.rst +0 -0
  42. {qupled-1.3.2 → qupled-1.3.3}/docs/make.bat +0 -0
  43. {qupled-1.3.2 → qupled-1.3.3}/docs/qupled.rst +0 -0
  44. {qupled-1.3.2 → qupled-1.3.3}/docs/requirements.txt +0 -0
  45. {qupled-1.3.2 → qupled-1.3.3}/examples/docs/fixed_adr.py +0 -0
  46. {qupled-1.3.2 → qupled-1.3.3}/examples/docs/initial_guess_stls.py +0 -0
  47. {qupled-1.3.2 → qupled-1.3.3}/examples/docs/solve_quantum_schemes.py +0 -0
  48. {qupled-1.3.2 → qupled-1.3.3}/examples/docs/solve_qvsstls.py +0 -0
  49. {qupled-1.3.2 → qupled-1.3.3}/examples/docs/solve_rpa_and_esa.py +0 -0
  50. {qupled-1.3.2 → qupled-1.3.3}/examples/docs/solve_stls.py +0 -0
  51. {qupled-1.3.2 → qupled-1.3.3}/examples/docs/solve_stls_iet.py +0 -0
  52. {qupled-1.3.2 → qupled-1.3.3}/examples/docs/solve_vsstls.py +0 -0
  53. {qupled-1.3.2 → qupled-1.3.3}/examples/readme/create_cover.py +0 -0
  54. {qupled-1.3.2 → qupled-1.3.3}/examples/readme/qupled_animation_dark.svg +0 -0
  55. {qupled-1.3.2 → qupled-1.3.3}/examples/readme/qupled_animation_light.svg +0 -0
  56. {qupled-1.3.2 → qupled-1.3.3}/examples/tests/test_examples.py +0 -0
  57. {qupled-1.3.2 → qupled-1.3.3}/manylinux/Dockerfile.manylinux_2_28 +0 -0
  58. {qupled-1.3.2 → qupled-1.3.3}/manylinux/build_manylinux_2_28 +0 -0
  59. {qupled-1.3.2 → qupled-1.3.3}/setup.cfg +0 -0
  60. {qupled-1.3.2 → qupled-1.3.3}/src/qupled/__init__.py +0 -0
  61. {qupled-1.3.2 → qupled-1.3.3}/src/qupled/database.py +0 -0
  62. {qupled-1.3.2 → qupled-1.3.3}/src/qupled/esa.py +0 -0
  63. {qupled-1.3.2 → qupled-1.3.3}/src/qupled/hf.py +0 -0
  64. {qupled-1.3.2 → qupled-1.3.3}/src/qupled/mpi.py +0 -0
  65. {qupled-1.3.2 → qupled-1.3.3}/src/qupled/native/include/chemical_potential.hpp +0 -0
  66. {qupled-1.3.2 → qupled-1.3.3}/src/qupled/native/include/database.hpp +0 -0
  67. {qupled-1.3.2 → qupled-1.3.3}/src/qupled/native/include/dual.hpp +0 -0
  68. {qupled-1.3.2 → qupled-1.3.3}/src/qupled/native/include/esa.hpp +0 -0
  69. {qupled-1.3.2 → qupled-1.3.3}/src/qupled/native/include/free_energy.hpp +0 -0
  70. {qupled-1.3.2 → qupled-1.3.3}/src/qupled/native/include/hf.hpp +0 -0
  71. {qupled-1.3.2 → qupled-1.3.3}/src/qupled/native/include/iet.hpp +0 -0
  72. {qupled-1.3.2 → qupled-1.3.3}/src/qupled/native/include/input.hpp +0 -0
  73. {qupled-1.3.2 → qupled-1.3.3}/src/qupled/native/include/internal_energy.hpp +0 -0
  74. {qupled-1.3.2 → qupled-1.3.3}/src/qupled/native/include/logger.hpp +0 -0
  75. {qupled-1.3.2 → qupled-1.3.3}/src/qupled/native/include/mpi_util.hpp +0 -0
  76. {qupled-1.3.2 → qupled-1.3.3}/src/qupled/native/include/num_util.hpp +0 -0
  77. {qupled-1.3.2 → qupled-1.3.3}/src/qupled/native/include/numerics.hpp +0 -0
  78. {qupled-1.3.2 → qupled-1.3.3}/src/qupled/native/include/python_interface/inputs.hpp +0 -0
  79. {qupled-1.3.2 → qupled-1.3.3}/src/qupled/native/include/python_interface/schemes.hpp +0 -0
  80. {qupled-1.3.2 → qupled-1.3.3}/src/qupled/native/include/python_interface/util.hpp +0 -0
  81. {qupled-1.3.2 → qupled-1.3.3}/src/qupled/native/include/python_interface/utilities.hpp +0 -0
  82. {qupled-1.3.2 → qupled-1.3.3}/src/qupled/native/include/qstls.hpp +0 -0
  83. {qupled-1.3.2 → qupled-1.3.3}/src/qupled/native/include/qstlsiet.hpp +0 -0
  84. {qupled-1.3.2 → qupled-1.3.3}/src/qupled/native/include/qvsstls.hpp +0 -0
  85. {qupled-1.3.2 → qupled-1.3.3}/src/qupled/native/include/rdf.hpp +0 -0
  86. {qupled-1.3.2 → qupled-1.3.3}/src/qupled/native/include/rpa.hpp +0 -0
  87. {qupled-1.3.2 → qupled-1.3.3}/src/qupled/native/include/stls.hpp +0 -0
  88. {qupled-1.3.2 → qupled-1.3.3}/src/qupled/native/include/stlsiet.hpp +0 -0
  89. {qupled-1.3.2 → qupled-1.3.3}/src/qupled/native/include/thermo_util.hpp +0 -0
  90. {qupled-1.3.2 → qupled-1.3.3}/src/qupled/native/include/vector2D.hpp +0 -0
  91. {qupled-1.3.2 → qupled-1.3.3}/src/qupled/native/include/vector3D.hpp +0 -0
  92. {qupled-1.3.2 → qupled-1.3.3}/src/qupled/native/include/vector_util.hpp +0 -0
  93. {qupled-1.3.2 → qupled-1.3.3}/src/qupled/native/include/vsbase.hpp +0 -0
  94. {qupled-1.3.2 → qupled-1.3.3}/src/qupled/native/include/vsstls.hpp +0 -0
  95. {qupled-1.3.2 → qupled-1.3.3}/src/qupled/native/src/chemical_potential.cpp +0 -0
  96. {qupled-1.3.2 → qupled-1.3.3}/src/qupled/native/src/esa.cpp +0 -0
  97. {qupled-1.3.2 → qupled-1.3.3}/src/qupled/native/src/free_energy.cpp +0 -0
  98. {qupled-1.3.2 → qupled-1.3.3}/src/qupled/native/src/hf.cpp +0 -0
  99. {qupled-1.3.2 → qupled-1.3.3}/src/qupled/native/src/internal_energy.cpp +0 -0
  100. {qupled-1.3.2 → qupled-1.3.3}/src/qupled/native/src/logger.cpp +0 -0
  101. {qupled-1.3.2 → qupled-1.3.3}/src/qupled/native/src/mpi_util.cpp +0 -0
  102. {qupled-1.3.2 → qupled-1.3.3}/src/qupled/native/src/num_util.cpp +0 -0
  103. {qupled-1.3.2 → qupled-1.3.3}/src/qupled/native/src/numerics.cpp +0 -0
  104. {qupled-1.3.2 → qupled-1.3.3}/src/qupled/native/src/python_interface/inputs.cpp +0 -0
  105. {qupled-1.3.2 → qupled-1.3.3}/src/qupled/native/src/python_interface/native.cpp +0 -0
  106. {qupled-1.3.2 → qupled-1.3.3}/src/qupled/native/src/python_interface/schemes.cpp +0 -0
  107. {qupled-1.3.2 → qupled-1.3.3}/src/qupled/native/src/python_interface/util.cpp +0 -0
  108. {qupled-1.3.2 → qupled-1.3.3}/src/qupled/native/src/python_interface/utilities.cpp +0 -0
  109. {qupled-1.3.2 → qupled-1.3.3}/src/qupled/native/src/rdf.cpp +0 -0
  110. {qupled-1.3.2 → qupled-1.3.3}/src/qupled/native/src/rpa.cpp +0 -0
  111. {qupled-1.3.2 → qupled-1.3.3}/src/qupled/native/src/thermo_util.cpp +0 -0
  112. {qupled-1.3.2 → qupled-1.3.3}/src/qupled/native/src/vector2D.cpp +0 -0
  113. {qupled-1.3.2 → qupled-1.3.3}/src/qupled/native/src/vector3D.cpp +0 -0
  114. {qupled-1.3.2 → qupled-1.3.3}/src/qupled/native/src/vector_util.cpp +0 -0
  115. {qupled-1.3.2 → qupled-1.3.3}/src/qupled/output.py +0 -0
  116. {qupled-1.3.2 → qupled-1.3.3}/src/qupled/qstls.py +0 -0
  117. {qupled-1.3.2 → qupled-1.3.3}/src/qupled/qstlsiet.py +0 -0
  118. {qupled-1.3.2 → qupled-1.3.3}/src/qupled/qvsstls.py +0 -0
  119. {qupled-1.3.2 → qupled-1.3.3}/src/qupled/rpa.py +0 -0
  120. {qupled-1.3.2 → qupled-1.3.3}/src/qupled/stls.py +0 -0
  121. {qupled-1.3.2 → qupled-1.3.3}/src/qupled/stlsiet.py +0 -0
  122. {qupled-1.3.2 → qupled-1.3.3}/src/qupled/vsstls.py +0 -0
  123. {qupled-1.3.2 → qupled-1.3.3}/src/qupled.egg-info/dependency_links.txt +0 -0
  124. {qupled-1.3.2 → qupled-1.3.3}/src/qupled.egg-info/not-zip-safe +0 -0
  125. {qupled-1.3.2 → qupled-1.3.3}/src/qupled.egg-info/requires.txt +0 -0
  126. {qupled-1.3.2 → qupled-1.3.3}/src/qupled.egg-info/top_level.txt +0 -0
  127. {qupled-1.3.2 → qupled-1.3.3}/tests/native/conftest.py +0 -0
  128. {qupled-1.3.2 → qupled-1.3.3}/tests/native/test_esa_native.py +0 -0
  129. {qupled-1.3.2 → qupled-1.3.3}/tests/native/test_hf_native.py +0 -0
  130. {qupled-1.3.2 → qupled-1.3.3}/tests/native/test_qstls_iet_native.py +0 -0
  131. {qupled-1.3.2 → qupled-1.3.3}/tests/native/test_qstls_native.py +0 -0
  132. {qupled-1.3.2 → qupled-1.3.3}/tests/native/test_qvsstls_native.py +0 -0
  133. {qupled-1.3.2 → qupled-1.3.3}/tests/native/test_rpa_native.py +0 -0
  134. {qupled-1.3.2 → qupled-1.3.3}/tests/native/test_stls_iet_native.py +0 -0
  135. {qupled-1.3.2 → qupled-1.3.3}/tests/native/test_stls_native.py +0 -0
  136. {qupled-1.3.2 → qupled-1.3.3}/tests/native/test_vsstls_native.py +0 -0
  137. {qupled-1.3.2 → qupled-1.3.3}/tests/test_database.py +0 -0
  138. {qupled-1.3.2 → qupled-1.3.3}/tests/test_esa.py +0 -0
  139. {qupled-1.3.2 → qupled-1.3.3}/tests/test_hf.py +0 -0
  140. {qupled-1.3.2 → qupled-1.3.3}/tests/test_mpi.py +0 -0
  141. {qupled-1.3.2 → qupled-1.3.3}/tests/test_output.py +0 -0
  142. {qupled-1.3.2 → qupled-1.3.3}/tests/test_qstls.py +0 -0
  143. {qupled-1.3.2 → qupled-1.3.3}/tests/test_qstlsiet.py +0 -0
  144. {qupled-1.3.2 → qupled-1.3.3}/tests/test_qvsstls.py +0 -0
  145. {qupled-1.3.2 → qupled-1.3.3}/tests/test_rpa.py +0 -0
  146. {qupled-1.3.2 → qupled-1.3.3}/tests/test_stls.py +0 -0
  147. {qupled-1.3.2 → qupled-1.3.3}/tests/test_stlsiet.py +0 -0
  148. {qupled-1.3.2 → qupled-1.3.3}/tests/test_vsstls.py +0 -0
  149. {qupled-1.3.2 → qupled-1.3.3}/tox.ini +0 -0
@@ -4,9 +4,19 @@ on:
4
4
  workflow_call:
5
5
 
6
6
  jobs:
7
- build-macos-wheels-arm64:
8
- name: Build macOS arm64 wheels
9
- runs-on: macos-latest
7
+ build-macos-wheels:
8
+ name: Build macOS wheels (${{ matrix.arch }})
9
+ strategy:
10
+ matrix:
11
+ include:
12
+ - arch: arm64
13
+ runner: macos-latest
14
+ deployment_target: "14.0"
15
+ - arch: x86_64
16
+ runner: macos-13
17
+ deployment_target: "13.0"
18
+
19
+ runs-on: ${{ matrix.runner }}
10
20
 
11
21
  steps:
12
22
  - name: Checkout source code
@@ -35,11 +45,11 @@ jobs:
35
45
  run: cibuildwheel --output-dir wheelhouse
36
46
  env:
37
47
  CIBW_PLATFORM: macos
38
- CIBW_ARCHS_MACOS: arm64
39
- MACOSX_DEPLOYMENT_TARGET: "14.0"
48
+ CIBW_ARCHS_MACOS: ${{ matrix.arch }}
49
+ MACOSX_DEPLOYMENT_TARGET: ${{ matrix.deployment_target }}
40
50
 
41
51
  - name: Upload built wheels
42
52
  uses: actions/upload-artifact@v4
43
53
  with:
44
- name: wheels-macos-arm64
54
+ name: wheels-macos-${{ matrix.arch }}
45
55
  path: wheelhouse/*.whl
@@ -44,6 +44,12 @@ jobs:
44
44
  name: wheels-linux-aarch64
45
45
  path: temp-linux-wheels-aarch64
46
46
 
47
+ - name: Download macos wheels (x86_64)
48
+ uses: actions/download-artifact@v4
49
+ with:
50
+ name: wheels-macos-x86_64
51
+ path: temp-macos-wheels-x86_64
52
+
47
53
  - name: Download macos wheels (arm64)
48
54
  uses: actions/download-artifact@v4
49
55
  with:
@@ -65,5 +71,5 @@ jobs:
65
71
  source .venv/bin/activate
66
72
  pip3 install --upgrade pip
67
73
  pip3 install twine
68
- twine check dist/*
74
+ twine check dist/*
69
75
  twine upload dist/* --non-interactive
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: qupled
3
- Version: 1.3.2
3
+ Version: 1.3.3
4
4
  Summary: qupled: a package to investigate quantum plasmas via the dielectric formalism
5
5
  Author-email: Federico Lucco Castello <federico.luccocastello@gmail.com>
6
6
  License-Expression: GPL-3.0-or-later
@@ -51,25 +51,35 @@ This will also install all the python packages that are necessary for running th
51
51
  Install with MPI support
52
52
  ~~~~~~~~~~~~~~~~~~~~~~~~
53
53
 
54
- If you need to use qupled with MPI support, install the :ref:`external_dependencies` and install the
55
- source distribution with the following command:
54
+ If you need to use qupled with MPI support, first install the :ref:`external_dependencies` and then run
56
55
 
57
56
  .. code-block:: console
58
57
 
59
- pip install --no-binary=:all: qupled
58
+ USE_MPI=ON pip install --no-binary=:all: qupled
60
59
 
61
60
 
62
61
  Install from source
63
62
  ~~~~~~~~~~~~~~~~~~~
64
63
 
65
64
  If you want full control over your qupled installation, you can install it also directly from the source.
66
- Install the :ref:`external_dependencies` first, then clone the repository and run the following commands:
65
+ Start by cloning the respository
67
66
 
68
67
  .. code-block:: console
69
68
 
70
69
  git clone https://github.com/fedluc/qupled.git
71
70
  cd qupled
71
+
72
+
73
+ Then Install the :ref:`external_dependencies` with
74
+
75
+ .. code-block:: console
76
+
72
77
  ./devtool install-deps
78
+
79
+ and finally build, test and install qupled with
80
+
81
+ .. code-block:: console
82
+
73
83
  ./devtool build
74
84
  ./devtool test
75
85
  ./devtool install
@@ -80,13 +90,16 @@ External dependencies
80
90
  ~~~~~~~~~~~~~~~~~~~~~
81
91
 
82
92
  Installing qupled may require compiling some C++ code, depending on the platform and installation method.
83
- The following dependencies must be met before attempting to build the C++ part of qupled:
93
+ The following dependencies must be met before attempting to build the C++ part of qupled
84
94
 
85
95
  - `CMake <https://cmake.org/download/>`_
86
- - `fmt <https://github.com/fmtlib/fmt>`_
87
96
  - `GNU Scientific Library <https://www.gnu.org/software/gsl/>`_
88
97
  - `OpenMP <https://en.wikipedia.org/wiki/OpenMP>`_
89
- - `Open-MPI <https://www.open-mpi.org/software/ompi/v5.0/>`_
98
+ - `SQLiteCpp <https://github.com/SRombauts/SQLiteCpp>`_
99
+ - `Open-MPI <https://www.open-mpi.org/software/ompi/v5.0/>`_ (only if you want MPI support)
100
+
101
+ The installation of these dependencies can be done in different ways depending on the platform you are using.
102
+ For example, on Ubuntu, Debian-based and macOS systems, you can use the following commands:
90
103
 
91
104
  **Ubuntu or Debian-based systems**
92
105
 
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "qupled"
7
- version = "v1.3.2"
7
+ version = "v1.3.3"
8
8
  description = "qupled: a package to investigate quantum plasmas via the dielectric formalism"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.10, <3.14"
@@ -8,7 +8,7 @@ setup(
8
8
  name="qupled.native",
9
9
  source_dir="src/qupled/native/src",
10
10
  cmake_configure_options=[
11
- f"-DUSE_MPI={os.environ.get('USE_MPI', 'ON')}",
11
+ f"-DUSE_MPI={os.environ.get('USE_MPI', 'OFF')}",
12
12
  ],
13
13
  )
14
14
  ],
@@ -0,0 +1,40 @@
1
+ #ifndef FORMAT_HPP
2
+ #define FORMAT_HPP
3
+
4
+ /*
5
+ * Disclaimer:
6
+ * This header conditionally includes either {fmt} or std::format depending on
7
+ * the platform. This is necessary because macOS compilers do not fully support
8
+ * std::format introduced in C++20.
9
+ */
10
+
11
+ #if defined(__APPLE__)
12
+ #include <fmt/core.h>
13
+ #else
14
+ #include <format>
15
+ #endif
16
+
17
+ #include <string>
18
+ #include <utility>
19
+
20
+ namespace formatUtil {
21
+
22
+ #if defined(__APPLE__)
23
+
24
+ template <typename... Args>
25
+ std::string format(fmt::format_string<Args...> fmt_str, Args &&...args) {
26
+ return fmt::format(fmt_str, std::forward<Args>(args)...);
27
+ }
28
+
29
+ #else
30
+
31
+ template <typename... Args>
32
+ std::string format(std::format_string<Args...> fmt_str, Args &&...args) {
33
+ return std::format(fmt_str, std::forward<Args>(args)...);
34
+ }
35
+
36
+ #endif
37
+
38
+ } // namespace formatUtil
39
+
40
+ #endif
@@ -16,6 +16,17 @@ FetchContent_Declare(
16
16
  )
17
17
  FetchContent_MakeAvailable(pybind11)
18
18
 
19
+ # Setup fmt (only for macOS)
20
+ if(APPLE)
21
+ message(STATUS "Configuring fmt for macOS")
22
+ FetchContent_Declare(
23
+ fmt
24
+ GIT_REPOSITORY https://github.com/fmtlib/fmt.git
25
+ GIT_TAG 10.2.1
26
+ )
27
+ FetchContent_MakeAvailable(fmt)
28
+ endif()
29
+
19
30
  # Setup MPI environment
20
31
  option(USE_MPI "Compile with MPI support" ON)
21
32
  if(USE_MPI)
@@ -74,9 +85,6 @@ target_include_directories(native PUBLIC
74
85
  )
75
86
 
76
87
  # Link external libraries
77
- if(USE_MPI)
78
- target_link_libraries(native PUBLIC MPI::MPI_CXX)
79
- endif()
80
88
  target_link_libraries(native PUBLIC
81
89
  OpenMP::OpenMP_CXX
82
90
  GSL::gsl
@@ -84,6 +92,12 @@ target_link_libraries(native PUBLIC
84
92
  SQLiteCpp
85
93
  SQLite::SQLite3
86
94
  )
95
+ if(USE_MPI)
96
+ target_link_libraries(native PUBLIC MPI::MPI_CXX)
97
+ endif()
98
+ if(APPLE)
99
+ target_link_libraries(native PUBLIC fmt::fmt)
100
+ endif()
87
101
 
88
102
  # Install
89
103
  install(TARGETS native
@@ -1,7 +1,7 @@
1
1
  #include "iet.hpp"
2
+ #include "format.hpp"
2
3
  #include "input.hpp"
3
4
  #include "mpi_util.hpp"
4
- #include <format>
5
5
 
6
6
  using namespace std;
7
7
  using namespace MPIUtil;
@@ -105,11 +105,12 @@ double IetUtil::BridgeFunction::ioi() const {
105
105
  const double b0 = 0.258 - 0.0612 * lnG + 0.0123 * lnG2 - 1.0 / Gamma;
106
106
  const double b1 = 0.0269 + 0.0318 * lnG + 0.00814 * lnG2;
107
107
  if (b0 / b1 <= 0.0 || Gamma < 5.25 || Gamma > 171.8) {
108
- const string msg = format("The IET schemes cannot be applied "
109
- "to this state point because Gamma = {:.8f} "
110
- "falls outside the range of validty of the "
111
- "bridge function parameterization\n",
112
- Gamma);
108
+ const string msg =
109
+ formatUtil::format("The IET schemes cannot be applied "
110
+ "to this state point because Gamma = {:.8f} "
111
+ "falls outside the range of validty of the "
112
+ "bridge function parameterization\n",
113
+ Gamma);
113
114
  throwError(msg);
114
115
  }
115
116
  const double c1 = 0.498 - 0.280 * lnG + 0.0294 * lnG2;
@@ -170,11 +171,12 @@ double IetUtil::BridgeFunction::lct() const {
170
171
  double IetUtil::BridgeFunction::lctIntegrand(const double &r,
171
172
  const double &Gamma) const {
172
173
  if (Gamma < 5.0) {
173
- const string msg = format("The IET schemes cannot be applied "
174
- "to this state point because Gamma = {:.3f} "
175
- "falls outside the range of validty of the "
176
- "bridge function parameterization\n",
177
- Gamma);
174
+ const string msg =
175
+ formatUtil::format("The IET schemes cannot be applied "
176
+ "to this state point because Gamma = {:.3f} "
177
+ "falls outside the range of validty of the "
178
+ "bridge function parameterization\n",
179
+ Gamma);
178
180
  throwError(msg);
179
181
  }
180
182
  const double Gamma1_6 = pow(Gamma, 1. / 6.);
@@ -1,7 +1,7 @@
1
1
  #include "input.hpp"
2
2
  #include "mpi_util.hpp"
3
+ #include <algorithm>
3
4
  #include <cmath>
4
- #include <format>
5
5
 
6
6
  using namespace std;
7
7
  using namespace MPIUtil;
@@ -1,10 +1,10 @@
1
1
  #include "qstls.hpp"
2
+ #include "format.hpp"
2
3
  #include "mpi_util.hpp"
3
4
  #include "numerics.hpp"
4
5
  #include "vector_util.hpp"
5
6
  #include <SQLiteCpp/SQLiteCpp.h>
6
7
  #include <cstring>
7
- #include <format>
8
8
 
9
9
  using namespace std;
10
10
  using namespace vecUtil;
@@ -19,7 +19,7 @@ using Itg2DParam = Integrator2D::Param;
19
19
  Qstls::Qstls(const std::shared_ptr<const QstlsInput> &in_, const bool verbose_)
20
20
  : Stls(in_, verbose_) {
21
21
  // Set name for the fixed adr output file
22
- adrFixedDatabaseName = format("{}", in().getTheory());
22
+ adrFixedDatabaseName = formatUtil::format("{}", in().getTheory());
23
23
  // Allocate arrays
24
24
  const size_t nx = wvg.size();
25
25
  const size_t nl = in().getNMatsubara();
@@ -107,16 +107,16 @@ void Qstls::writeAdrFixed(const Vector3D &res, const string &name) const {
107
107
  SQLite::Database db(dbInfo.name,
108
108
  SQLite::OPEN_READWRITE | SQLite::OPEN_CREATE);
109
109
  // Create table if it doesn't exist
110
- const string createTable = format(QstlsUtil::SQL_CREATE_TABLE,
111
- QstlsUtil::SQL_TABLE_NAME,
112
- dbInfo.runTableName);
110
+ const string createTable = formatUtil::format(QstlsUtil::SQL_CREATE_TABLE,
111
+ QstlsUtil::SQL_TABLE_NAME,
112
+ dbInfo.runTableName);
113
113
  db.exec(createTable);
114
114
  // Prepare binary data
115
115
  const void *adrData = static_cast<const void *>(res.data());
116
116
  const int adrSize = static_cast<int>(res.size() * sizeof(double));
117
117
  // Insert data
118
118
  const string insert =
119
- format(QstlsUtil::SQL_INSERT, QstlsUtil::SQL_TABLE_NAME);
119
+ formatUtil::format(QstlsUtil::SQL_INSERT, QstlsUtil::SQL_TABLE_NAME);
120
120
  SQLite::Statement statement(db, insert);
121
121
  statement.bind(1, dbInfo.runId);
122
122
  statement.bind(2, name);
@@ -132,7 +132,7 @@ void Qstls::readAdrFixed(Vector3D &res, const string &name, int runId) const {
132
132
  DatabaseInfo dbInfo = in().getDatabaseInfo();
133
133
  SQLite::Database db(dbInfo.name, SQLite::OPEN_READONLY);
134
134
  const string select =
135
- format(QstlsUtil::SQL_SELECT, QstlsUtil::SQL_TABLE_NAME);
135
+ formatUtil::format(QstlsUtil::SQL_SELECT, QstlsUtil::SQL_TABLE_NAME);
136
136
  SQLite::Statement statement(db, select);
137
137
  statement.bind(1, runId);
138
138
  statement.bind(2, name);
@@ -140,9 +140,10 @@ void Qstls::readAdrFixed(Vector3D &res, const string &name, int runId) const {
140
140
  const void *adrData = statement.getColumn(0).getBlob();
141
141
  int adrBytes = statement.getColumn(0).getBytes();
142
142
  if (static_cast<size_t>(adrBytes) != res.size() * sizeof(double)) {
143
- throwError(format("Size mismatch: expected {} bytes, got {} bytes",
144
- res.size() * sizeof(double),
145
- adrBytes));
143
+ throwError(
144
+ formatUtil::format("Size mismatch: expected {} bytes, got {} bytes",
145
+ res.size() * sizeof(double),
146
+ adrBytes));
146
147
  }
147
148
  memcpy(res.data(), adrData, adrBytes);
148
149
  }
@@ -1,4 +1,5 @@
1
1
  #include "qstlsiet.hpp"
2
+ #include "format.hpp"
2
3
  #include "input.hpp"
3
4
  #include "mpi_util.hpp"
4
5
  #include "numerics.hpp"
@@ -6,7 +7,6 @@
6
7
  #include "vector_util.hpp"
7
8
  #include <SQLiteCpp/SQLiteCpp.h>
8
9
  #include <filesystem>
9
- #include <format>
10
10
  #include <numeric>
11
11
 
12
12
  using namespace std;
@@ -75,7 +75,7 @@ void QstlsIet::computeLfc() {
75
75
  shared_ptr<Integrator2D> itgPrivate =
76
76
  make_shared<Integrator2D>(in().getIntError());
77
77
  Vector3D adrFixedPrivate(nl, nx, nx);
78
- const string name = format("{}_{:d}", in().getTheory(), i);
78
+ const string name = formatUtil::format("{}_{:d}", in().getTheory(), i);
79
79
  const int runId = (in().getFixedRunId() != DEFAULT_INT)
80
80
  ? in().getFixedRunId()
81
81
  : in().getDatabaseInfo().runId;
@@ -124,7 +124,7 @@ void QstlsIet::computeAdrFixed() {
124
124
  gatherLoopData(res.data(), loopData, nx * nx);
125
125
  if (isRoot()) {
126
126
  const size_t idx = distance(wvg.begin(), find(wvg.begin(), wvg.end(), x));
127
- const string name = format("{}_{:d}", in().getTheory(), idx);
127
+ const string name = formatUtil::format("{}_{:d}", in().getTheory(), idx);
128
128
  writeAdrFixed(res, name);
129
129
  }
130
130
  }
@@ -1,11 +1,11 @@
1
1
  #include "qvsstls.hpp"
2
+ #include "format.hpp"
2
3
  #include "input.hpp"
3
4
  #include "mpi_util.hpp"
4
5
  #include "numerics.hpp"
5
6
  #include "thermo_util.hpp"
6
7
  #include "vector_util.hpp"
7
8
  #include <filesystem>
8
- #include <format>
9
9
 
10
10
  using namespace std;
11
11
  using namespace vecUtil;
@@ -173,9 +173,15 @@ QstlsCSR::QstlsCSR(const std::shared_ptr<const QVSStlsInput> &in_)
173
173
  void QstlsCSR::init() {
174
174
  const string &theory = inRpa().getTheory();
175
175
  switch (lfcTheta.type) {
176
- case CENTERED: adrFixedDatabaseName = format("{}_THETA", theory); break;
177
- case FORWARD: adrFixedDatabaseName = format("{}_THETA_DOWN", theory); break;
178
- case BACKWARD: adrFixedDatabaseName = format("{}_THETA_UP", theory); break;
176
+ case CENTERED:
177
+ adrFixedDatabaseName = formatUtil::format("{}_THETA", theory);
178
+ break;
179
+ case FORWARD:
180
+ adrFixedDatabaseName = formatUtil::format("{}_THETA_DOWN", theory);
181
+ break;
182
+ case BACKWARD:
183
+ adrFixedDatabaseName = formatUtil::format("{}_THETA_UP", theory);
184
+ break;
179
185
  }
180
186
  Qstls::init();
181
187
  }
@@ -1,10 +1,10 @@
1
1
  #include "stls.hpp"
2
+ #include "format.hpp"
2
3
  #include "input.hpp"
3
4
  #include "mpi_util.hpp"
4
5
  #include "numerics.hpp"
5
6
  #include "vector_util.hpp"
6
7
  #include <SQLiteCpp/SQLiteCpp.h>
7
- #include <format>
8
8
  #include <sstream>
9
9
 
10
10
  using namespace std;
@@ -52,9 +52,9 @@ void Stls::computeStructuralProperties() {
52
52
  // End timing
53
53
  double toc = timer();
54
54
  // Print diagnostic
55
- println(format("--- iteration {:d} ---", counter));
56
- println(format("Elapsed time: {:.3f} seconds", toc - tic));
57
- println(format("Residual error: {:.5e}", err));
55
+ println(formatUtil::format("--- iteration {:d} ---", counter));
56
+ println(formatUtil::format("Elapsed time: {:.3f} seconds", toc - tic));
57
+ println(formatUtil::format("Residual error: {:.5e}", err));
58
58
  fflush(stdout);
59
59
  }
60
60
  }
@@ -1,6 +1,6 @@
1
1
  #include "stlsiet.hpp"
2
+ #include "format.hpp"
2
3
  #include "mpi_util.hpp"
3
- #include <format>
4
4
 
5
5
  using namespace std;
6
6
  using namespace MPIUtil;
@@ -1,9 +1,9 @@
1
1
  #include "vsbase.hpp"
2
+ #include "format.hpp"
2
3
  #include "input.hpp"
3
4
  #include "numerics.hpp"
4
5
  #include "thermo_util.hpp"
5
6
  #include "vector_util.hpp"
6
- #include <format>
7
7
 
8
8
  using namespace std;
9
9
 
@@ -41,7 +41,7 @@ void VSBase::doIterations() {
41
41
  SecantSolver rsol(in().getErrMinAlpha(), in().getNIterAlpha());
42
42
  rsol.solve(func, in().getAlphaGuess());
43
43
  alpha = rsol.getSolution();
44
- println(format("Free parameter = {:.5f}", alpha));
44
+ println(formatUtil::format("Free parameter = {:.5f}", alpha));
45
45
  updateSolution();
46
46
  }
47
47
 
@@ -398,10 +398,10 @@ void StructPropBase::doIterations() {
398
398
  }
399
399
  counter++;
400
400
  }
401
- println(format("Alpha = {:.5e}, Residual error "
402
- "(structural properties) = {:.5e}",
403
- csr[RS_THETA]->getAlpha(),
404
- err));
401
+ println(formatUtil::format("Alpha = {:.5e}, Residual error "
402
+ "(structural properties) = {:.5e}",
403
+ csr[RS_THETA]->getAlpha(),
404
+ err));
405
405
  }
406
406
 
407
407
  void StructPropBase::setAlpha(const double &alpha) {
@@ -3,7 +3,6 @@
3
3
  #include "numerics.hpp"
4
4
  #include "thermo_util.hpp"
5
5
  #include "vector_util.hpp"
6
- #include <format>
7
6
 
8
7
  using namespace std;
9
8
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: qupled
3
- Version: 1.3.2
3
+ Version: 1.3.3
4
4
  Summary: qupled: a package to investigate quantum plasmas via the dielectric formalism
5
5
  Author-email: Federico Lucco Castello <federico.luccocastello@gmail.com>
6
6
  License-Expression: GPL-3.0-or-later
@@ -66,6 +66,7 @@ src/qupled/native/include/chemical_potential.hpp
66
66
  src/qupled/native/include/database.hpp
67
67
  src/qupled/native/include/dual.hpp
68
68
  src/qupled/native/include/esa.hpp
69
+ src/qupled/native/include/format.hpp
69
70
  src/qupled/native/include/free_energy.hpp
70
71
  src/qupled/native/include/hf.hpp
71
72
  src/qupled/native/include/iet.hpp
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes