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.

Types

ACTest.AbstractMesh — Type
AbstractMesh

An abstract type representing the real axis. It is used to build the internal type system.

ACTest.LinearMesh — Type
LinearMesh

Mutable 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 — Type
TangentMesh

Mutable 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 — Type
LorentzMesh

Mutable 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 — Type
HalfLorentzMesh

Mutable 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 — Type
DynamicMesh

Mutable 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 — Method
LinearMesh(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 — Type
TangentMesh(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 — Type
LorentzMesh(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 — Type
HalfLorentzMesh(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 — Method
DynamicMesh(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.data or Aout.data.

Returns

  • dm -> A DynamicMesh struct.

See also: DynamicMesh.

Base.* Functions

Base.length — Method
Base.length(am::AbstractMesh)

Return number of mesh points in a Mesh-like struct.

Base.iterate — Method
Base.iterate(am::AbstractMesh)

Advance the iterator of a Mesh-like struct to obtain the next mesh point.

Base.iterate — Method
Base.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 — Method
Base.eachindex(am::AbstractMesh)

Create an iterable object for visiting each index of a Mesh-like struct.

Base.firstindex — Method
Base.firstindex(am::AbstractMesh)

Return the first index of a Mesh-like struct.

Base.lastindex — Method
Base.lastindex(am::AbstractMesh)

Return the last index of a Mesh-like struct.

Base.getindex — Method
Base.getindex(am::AbstractMesh, ind::I64)

Retrieve the value(s) stored at the given key or index within a Mesh-like struct.

Base.getindex — Method
Base.getindex(am::AbstractMesh, I::UnitRange{I64})

Return a subset of a Mesh-like struct as specified by I.

Utilities

ACTest.nearest — Function
nearest(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.0

See also: AbstractMesh.