3
0
mirror of https://github.com/triqs/dft_tools synced 2024-12-25 05:43:40 +01:00
- The kind() method of mesh should return a char,
like the parameter of the constructor of mesh,
not the C++ corresponding int.
- otherwise, the reduction - construction is broken
and by extension all pickling and then all mpi constructions.
This commit is contained in:
Olivier Parcollet 2014-01-17 21:12:24 +01:00
parent 0f85b08693
commit 602201527d
5 changed files with 5 additions and 5 deletions

View File

@ -12,7 +12,7 @@ cdef class MeshImTime:
property kind :
"""Inverse temperature"""
def __get__(self): return self._c.kind()
def __get__(self): return {half_bins: 'H', full_bins: 'F', without_last: 'W'}[self._c.kind()]
property statistic :
def __get__(self): return 'F' if self._c.domain().statistic==Fermion else 'B'

View File

@ -11,7 +11,7 @@ cdef class MeshReFreq:
def __get__(self): return self._c.x_max()
property kind:
def __get__(self): return self._c.kind()
def __get__(self): return {half_bins: 'H', full_bins: 'F', without_last: 'W'}[self._c.kind()]
def __len__ (self) : return self._c.size()

View File

@ -11,7 +11,7 @@ cdef class MeshReTime:
def __get__(self): return self._c.x_max()
property kind:
def __get__(self): return self._c.kind()
def __get__(self): return {half_bins: 'H', full_bins: 'F', without_last: 'W'}[self._c.kind()]
def __len__ (self) : return self._c.size()

View File

@ -10,7 +10,7 @@ cdef extern from "triqs/gfs/refreq.hpp" namespace "triqs::gfs" :
double x_min()
double x_max()
long size()
double kind()
long kind()
bint operator ==( mesh_refreq &)
cdef mesh_refreq make_mesh_refreq "triqs::gfs::gf_mesh<triqs::gfs::refreq>" (double omega_min, double omega_max, size_t n_freq, mesh_enum mk)

View File

@ -10,7 +10,7 @@ cdef extern from "triqs/gfs/retime.hpp" namespace "triqs::gfs" :
double x_min()
double x_max()
long size()
double kind()
long kind()
bint operator ==( mesh_retime &)
cdef mesh_retime make_mesh_retime "triqs::gfs::gf_mesh<triqs::gfs::retime>" (double t_min, double t_max, size_t n_freq, mesh_enum mk)