Meshes on real axis.
The spectral functions are always defined on real axis. The ACTest toolkit supports various uniform and non-uniform meshes. In order to build these meshes, we need some additional control parameters, including $f_1$ and cut. They should be setup by using the parameter pmesh.
- ACTest.AbstractMesh
- ACTest.DynamicMesh
- ACTest.DynamicMesh
- ACTest.HalfLorentzMesh
- ACTest.HalfLorentzMesh
- ACTest.LinearMesh
- ACTest.LinearMesh
- ACTest.LorentzMesh
- ACTest.LorentzMesh
- ACTest.TangentMesh
- ACTest.TangentMesh
- ACTest.nearest
- Base.eachindex
- Base.firstindex
- Base.getindex
- Base.getindex
- Base.iterate
- Base.iterate
- Base.lastindex
- Base.length
Types
ACTest.AbstractMesh — TypeAbstractMeshAn abstract type representing the real axis. It is used to build the internal type system.
ACTest.LinearMesh — TypeLinearMeshMutable struct. A linear and uniform mesh.
Members
- nmesh -> Number of mesh points.
- wmax -> Right boundary (maximum value).
- wmin -> Left boundary (minimum value).
- mesh -> Mesh itself.
- weight -> Precomputed integration weights (composite trapezoidal rule).
See also: TangentMesh.
ACTest.TangentMesh — TypeTangentMeshMutable struct. A non-linear and non-uniform mesh. Note that it should be defined on both negative and positive half-axis.
Members
- nmesh -> Number of mesh points.
- wmax -> Right boundary (maximum value).
- wmin -> Left boundary (minimum value).
- mesh -> Mesh itself.
- weight -> Precomputed integration weights (composite trapezoidal rule).
See also: LinearMesh.
ACTest.LorentzMesh — TypeLorentzMeshMutable struct. A non-linear and non-uniform mesh. Note that it should be defined on both negative and positive half-axis.
Members
- nmesh -> Number of mesh points.
- wmax -> Right boundary (maximum value).
- wmin -> Left boundary (minimum value).
- mesh -> Mesh itself.
- weight -> Precomputed integration weights (composite trapezoidal rule).
See also: HalfLorentzMesh.
ACTest.HalfLorentzMesh — TypeHalfLorentzMeshMutable struct. A non-linear and non-uniform mesh. Note that it should be defined on positive half-axis only.
Members
- nmesh -> Number of mesh points.
- wmax -> Right boundary (maximum value).
- wmin -> Left boundary (minimum value). It must be 0.0.
- mesh -> Mesh itself.
- weight -> Precomputed integration weights (composite trapezoidal rule).
See also: LorentzMesh.
ACTest.DynamicMesh — TypeDynamicMeshMutable struct. A mesh used internally in the util/acplot.jl script. It supports both uniform and non-uniform meshes.
Members
- nmesh -> Number of mesh points.
- wmax -> Right boundary (maximum value).
- wmin -> Left boundary (minimum value).
- mesh -> Mesh itself.
- weight -> Precomputed integration weights (composite trapezoidal rule).
See also: LinearMesh.
Constructors
ACTest.LinearMesh — MethodLinearMesh(nmesh::I64, wmin::F64, wmax::F64)A constructor for the LinearMesh struct, which is announced in src/types.jl.
Arguments
- nmesh -> Number of mesh points.
- wmin -> Left boundary of the mesh.
- wmax -> Right boundary of the mesh.
Returns
- lm -> A LinearMesh struct.
See also: LinearMesh.
ACTest.TangentMesh — TypeTangentMesh(nmesh::I64, wmin::F64, wmax::F64, 𝑝::F64 = 2.1)A constructor for the TangentMesh struct, which is announced in src/types.jl.
Arguments
- nmesh -> Number of mesh points.
- wmin -> Left boundary of the mesh.
- wmax -> Right boundary of the mesh.
- 𝑝 -> A customized parameter.
Returns
- tm -> A TangentMesh struct.
See also: TangentMesh.
ACTest.LorentzMesh — TypeLorentzMesh(nmesh::I64, wmin::F64, wmax::F64, 𝑝::F64 = 0.01)A constructor for the LorentzMesh struct, which is announced in src/types.jl. The algorithm for generating a lorentzian mesh is taken from:
- https://github.com/CQMP/Maxent.
Arguments
- nmesh -> Number of mesh points.
- wmin -> Left boundary of the mesh.
- wmax -> Right boundary of the mesh.
- 𝑝 -> A customized parameter.
Returns
- lm -> A LorentzMesh struct.
See also: LorentzMesh.
ACTest.HalfLorentzMesh — TypeHalfLorentzMesh(nmesh::I64, wmax::F64, 𝑝::F64 = 0.01)A constructor for the HalfLorentzMesh struct, which is announced in src/types.jl. The algorithm for generating a half-lorentzian mesh is taken from:
- https://github.com/CQMP/Maxent.
Arguments
- nmesh -> Number of mesh points.
- wmax -> Right boundary of the mesh (wmin ≡ 0.0).
- 𝑝 -> A customized parameter.
Returns
- hm -> A HalfLorentzMesh struct.
See also: HalfLorentzMesh.
ACTest.DynamicMesh — MethodDynamicMesh(mesh::Vector{F64})A constructor for the DynamicMesh struct, which is announced in src/types.jl. This mesh is usually used to describe the real frequency mesh that read from files.
Arguments
- mesh -> Usually a mesh from file image.dataorAout.data.
Returns
- dm -> A DynamicMesh struct.
See also: DynamicMesh.
Base.* Functions
Base.length — MethodBase.length(am::AbstractMesh)Return number of mesh points in a Mesh-like struct.
Base.iterate — MethodBase.iterate(am::AbstractMesh)Advance the iterator of a Mesh-like struct to obtain the next mesh point.
Base.iterate — MethodBase.iterate(am::AbstractMesh, i::I64)This is the key method that allows a Mesh-like struct to be iterated, yielding a sequences of mesh points.
Base.eachindex — MethodBase.eachindex(am::AbstractMesh)Create an iterable object for visiting each index of a Mesh-like struct.
Base.firstindex — MethodBase.firstindex(am::AbstractMesh)Return the first index of a Mesh-like struct.
Base.lastindex — MethodBase.lastindex(am::AbstractMesh)Return the last index of a Mesh-like struct.
Base.getindex — MethodBase.getindex(am::AbstractMesh, ind::I64)Retrieve the value(s) stored at the given key or index within a Mesh-like struct.
Base.getindex — MethodBase.getindex(am::AbstractMesh, I::UnitRange{I64})Return a subset of a Mesh-like struct as specified by I.
Utilities
ACTest.nearest — Functionnearest(am::AbstractMesh, r::F64)Given a position r (0.0 ≤ r ≤ 1.0), and return the index of the nearest point in the mesh am.
Arguments
See above explanations.
Returns
See above explanations.
Examples
am = LinearMesh(1001, -10.0, 10.0)
pos = nearest(am, 0.2) # pos = 201
println(am[pos]) # -6.0See also: AbstractMesh.