Skip to content

Commit

Permalink
compilation error on osx with python 3.6 (#154)
Browse files Browse the repository at this point in the history
  • Loading branch information
clonker authored Jul 13, 2021
1 parent 46ee34a commit 95faddd
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
6 changes: 3 additions & 3 deletions deeptime/data/include/boundary_conditions.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

namespace deeptime::data {

template<typename State, int D, typename VMIN, typename VMAX, bool... periodic_dim>
template<typename State, int D, typename vmin_type, typename vmax_type, bool... periodic_dim>
struct BoundaryConditions {
static_assert(sizeof...(periodic_dim) == D || sizeof...(periodic_dim) == 0);
static constexpr int DIM = D;
Expand All @@ -20,8 +20,8 @@ struct BoundaryConditions {
template<std::size_t d, typename T>
static constexpr T apply_impl_d(T x) noexcept {
if constexpr(apply_pbc[d]) {
auto vmax = std::tuple_element_t<d, VMAX>::num / std::tuple_element_t<d, VMAX>::den;
auto vmin = std::tuple_element_t<d, VMIN>::num / std::tuple_element_t<d, VMIN>::den;
auto vmax = std::tuple_element_t<d, vmax_type>::num / std::tuple_element_t<d, vmax_type>::den;
auto vmin = std::tuple_element_t<d, vmin_type>::num / std::tuple_element_t<d, vmin_type>::den;
auto diam = vmax - vmin;
while (x >= vmax) x -= diam;
while (x < vmin) x += diam;
Expand Down
6 changes: 3 additions & 3 deletions deeptime/data/include/systems.h
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,9 @@ struct BickleyJet {
static constexpr std::size_t DIM = 2;
using dtype = T;
using State = Vector<T, DIM>;
using VMIN = std::tuple<std::ratio<0, 1>, std::ratio<-3, 1>>;
using VMAX = std::tuple<std::ratio<20, 1>, std::ratio<3, 1>>;
using Boundary = BoundaryConditions<State, 2, VMIN, VMAX, PERIODIC, false>;
using vmin_type = std::tuple<std::ratio<0, 1>, std::ratio<-3, 1>>;
using vmax_type = std::tuple<std::ratio<20, 1>, std::ratio<3, 1>>;
using Boundary = BoundaryConditions<State, 2, vmin_type, vmax_type, PERIODIC, false>;
using Integrator = RungeKutta<State, DIM, Boundary>;

template<typename D>
Expand Down
3 changes: 3 additions & 0 deletions devtools/azure-pipelines-osx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ jobs:
vmImage: 'macOS-10.14'
strategy:
matrix:
Python36:
CONDA_PY: '3.6'
CONDA_NPY: '1.17'
Python37:
CONDA_PY: '3.7'
CONDA_NPY: '1.19'
Expand Down

0 comments on commit 95faddd

Please sign in to comment.