numericalEFT / GreenFunc.jl

Toolbox to study quantum many-body problem at the treelevel
https://numericaleft.github.io/GreenFunc.jl/
MIT License
11 stars 1 forks source link

support reversed ImFreq and ImTime grids #98

Closed kunyuan closed 1 year ago

kunyuan commented 1 year ago

Since the package CompositeGrids doesn't support reversed order, it makes sense for GreenFunc.jl to support it.

We suggest to do the following,

1) Add a new parameter to ImTime{..., reverse} and ImFreq{..., reverse} to indicate if the mesh is reversed or not 2) When construct the mesh, check if user supplies a reversed grid or not. If reversed, then create ImTime(..., true), otherwise, ImTIme(..., false) 3) ImTime.grid and ImFreq.grid will always be non-reversed, because they are CompositeGrids object 4) If reverse is true, then iterator and indexing of the mesh should be reversed, so that time[2] = time[length(time)-2+1]