Composite Grids
CompositeGrids.CompositeG
— ModuleComposite 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.
CompositeGrids.CompositeG.Composite
— Typestruct 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 gridsize
: number of grid pointsgrid
: grid pointspanel
: panel gridsubgrids
: a vector of subgridsinits
: 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.
Base.floor
— Methodfunction 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].
CompositeGrids.CompositeG.CompositeLogGrid
— Functionfunction 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 gridN
: number of grid points of panel gridminterval
: minimum interval of panel gridd2s
: panel grid is dense to sparse or notorder
: number of grid points of subgrid
CompositeGrids.CompositeG.LogDensedGrid
— Functionfunction 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 griddense_at
: list of points that requires densed gridN
: number of grid points of panel gridminterval
: minimum interval of panel gridorder
: number of grid points of subgrid