Skip to content

Commit 95faddd

Browse files
authored
compilation error on osx with python 3.6 (#154)
1 parent 46ee34a commit 95faddd

File tree

3 files changed

+9
-6
lines changed

3 files changed

+9
-6
lines changed

deeptime/data/include/boundary_conditions.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
namespace deeptime::data {
1313

14-
template<typename State, int D, typename VMIN, typename VMAX, bool... periodic_dim>
14+
template<typename State, int D, typename vmin_type, typename vmax_type, bool... periodic_dim>
1515
struct BoundaryConditions {
1616
static_assert(sizeof...(periodic_dim) == D || sizeof...(periodic_dim) == 0);
1717
static constexpr int DIM = D;
@@ -20,8 +20,8 @@ struct BoundaryConditions {
2020
template<std::size_t d, typename T>
2121
static constexpr T apply_impl_d(T x) noexcept {
2222
if constexpr(apply_pbc[d]) {
23-
auto vmax = std::tuple_element_t<d, VMAX>::num / std::tuple_element_t<d, VMAX>::den;
24-
auto vmin = std::tuple_element_t<d, VMIN>::num / std::tuple_element_t<d, VMIN>::den;
23+
auto vmax = std::tuple_element_t<d, vmax_type>::num / std::tuple_element_t<d, vmax_type>::den;
24+
auto vmin = std::tuple_element_t<d, vmin_type>::num / std::tuple_element_t<d, vmin_type>::den;
2525
auto diam = vmax - vmin;
2626
while (x >= vmax) x -= diam;
2727
while (x < vmin) x += diam;

deeptime/data/include/systems.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,9 @@ struct BickleyJet {
9595
static constexpr std::size_t DIM = 2;
9696
using dtype = T;
9797
using State = Vector<T, DIM>;
98-
using VMIN = std::tuple<std::ratio<0, 1>, std::ratio<-3, 1>>;
99-
using VMAX = std::tuple<std::ratio<20, 1>, std::ratio<3, 1>>;
100-
using Boundary = BoundaryConditions<State, 2, VMIN, VMAX, PERIODIC, false>;
98+
using vmin_type = std::tuple<std::ratio<0, 1>, std::ratio<-3, 1>>;
99+
using vmax_type = std::tuple<std::ratio<20, 1>, std::ratio<3, 1>>;
100+
using Boundary = BoundaryConditions<State, 2, vmin_type, vmax_type, PERIODIC, false>;
101101
using Integrator = RungeKutta<State, DIM, Boundary>;
102102

103103
template<typename D>

devtools/azure-pipelines-osx.yml

+3
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ jobs:
55
vmImage: 'macOS-10.14'
66
strategy:
77
matrix:
8+
Python36:
9+
CONDA_PY: '3.6'
10+
CONDA_NPY: '1.17'
811
Python37:
912
CONDA_PY: '3.7'
1013
CONDA_NPY: '1.19'

0 commit comments

Comments
 (0)