Composite Grids

CompositeGrids.CompositeGModule

Composite grid that has tree structure. The whole interval is first divided by a panel grid, then each interval of a panel grid is divided by a smaller grid in subgrids. Subgrid could also be composite grid.

source
CompositeGrids.CompositeG.CompositeType
struct Composite{T<:AbstractFloat,PG,SG} <: SimpleG.ClosedGrid

Composite grid generated with panel grid of type PG and subgrids of type SG. PG should always be ClosedGrid, while SG could be any grid.

#Members:

  • bound : boundary of the grid
  • size : number of grid points
  • grid : grid points
  • panel : panel grid
  • subgrids : a vector of subgrids
  • inits : index of the first grid point of a subgrid on the whole grid

#Constructor:

  • function Composite{T,PG,SG}(panel, subgrids) where {T<:AbstractFloat,PG,SG}

create Composite grid from panel and subgrids. if the boundary grid point of two neighbor subgrids are too close, they will be combined in the whole grid.

source
Base.floorMethod
function Base.floor(grid::Composite{T,PG,SG}, x) where {T,PG,SG}

first find the corresponding subgrid by flooring on panel grid, then floor on subgrid and collect result. give the floor result on the whole grid. if floor on panel grid is needed, simply call floor(grid.panel, x).

return 1 for x<grid[1] and grid.size-1 for x>grid[end].

source
CompositeGrids.CompositeG.CompositeLogGridFunction
function CompositeLogGrid(type, bound, N, minterval, d2s, order, T=Float64)

create a composite grid with a Log grid as panel and subgrids of selected type.

#Members:

  • type : type of the subgrids, currently in [:cheb, :gauss, :uniform]
  • bound : boundary of the grid
  • N : number of grid points of panel grid
  • minterval : minimum interval of panel grid
  • d2s : panel grid is dense to sparse or not
  • order : number of grid points of subgrid
source
CompositeGrids.CompositeG.LogDensedGridFunction
function LogDensedGrid(type, bound, dense_at, N, minterval, order, T=Float64)

create a composite grid of CompositeLogGrid as subgrids. the grid is densed at selected points in dense_at, which in the real situation could be [kF,] for fermi k grid and [0, 2kF] for bose k grid, etc. if two densed point is too close to each other, they will be combined.

#Members:

  • type : type of the subgrid of subgrid, currently in [:cheb, :gauss, :uniform]
  • bound : boundary of the grid
  • dense_at : list of points that requires densed grid
  • N : number of grid points of panel grid
  • minterval : minimum interval of panel grid
  • order : number of grid points of subgrid
source