QInchworm.utility

Interpolations.jl addon: Neumann boundary conditions for the cubic spline

QInchworm.utility.NeumannBCType
struct NeumannBC{GT<:Union{Nothing, Interpolations.GridType}, T<:Number} <: Interpolations.BoundaryCondition

Interpolations.jl addon: Implementation of the Neumann boundary conditions for the cubic spline.

Fields

  • gt::Union{Nothing, Interpolations.GridType}: Grid type

  • left_derivative::Number: Function derivative at the left boundary

  • right_derivative::Number: Function derivative at the right boundary

source
Interpolations.prefiltering_systemMethod
prefiltering_system(
    _::Type{T},
    _::Type{TC},
    n::Int64,
    degree::Interpolations.Cubic{BC<:(QInchworm.utility.NeumannBC{Interpolations.OnGrid})}
) -> Tuple{WoodburyMatrices.Woodbury{_A, LinearAlgebra.LU{T, S, P}, SparseArrays.SparseMatrixCSC{Tv, Int64}, SparseArrays.SparseMatrixCSC{Tv1, Int64}, Matrix{_A1}} where {_A, T, S<:(LinearAlgebra.Tridiagonal{T, _B} where _B), P<:(AbstractVector{<:Integer}), Tv, Tv1, _A1}, Vector}

Compute the system used to prefilter cubic spline coefficients when using the Neumann boundary conditions.

Parameters

  • T, TC: Element types.
  • n: The number of rows in the data input.
  • degree: Interpolation degree information.

Returns

Woodbury matrix and the RHS of the computed system.

source

Quadratic spline that allows for incremental construction

QInchworm.utility.IncrementalSplineType
struct IncrementalSpline{KnotT<:Number, T<:Number}

Quadratic spline on an equidistant grid that allows for incremental construction.

Fields

  • knots::AbstractRange{KnotT} where KnotT<:Number: Locations of interpolation knots

  • data::Vector{T} where T<:Number: Values of the interpolated function at the knots

  • der_data::Vector{T} where T<:Number: Values of the interpolated function derivative at the knots

source
QInchworm.utility.extend!Function
extend!(
    G_int::QInchworm.spline_gf.IncSplineImaginaryTimeGF,
    val
) -> Any

Extend the underlying IncrementalSpline objects stored in G_int with a value val.

source
extend!(
    spline::QInchworm.utility.IncrementalSpline,
    val
) -> Vector{T} where T<:Number

Add a segment to an incremental spline by fixing value val of the interpolated function at the next knot.

source

Lazy matrix product

QInchworm.utility.LazyMatrixProductType
mutable struct LazyMatrixProduct{T<:Number}

A matrix product of the form $A_N A_{N-1} \ldots A_1$.

Functions pushfirst!() and popfirst!() can be used to add and remove multipliers to/from the left of the product. The product is lazy in the sense that the actual multiplication takes place only when the eval!() function is called. The structure keeps track of previously evaluated partial products and reuses them upon successive calls to eval!().

source
Base.pushfirst!Method
pushfirst!(
    lmp::QInchworm.utility.LazyMatrixProduct{T<:Number},
    A::Array{T<:Number, 2}
) -> Matrix{T} where T<:Number

Add a new matrix A to the left of the product lmp.

source
Base.popfirst!Method
popfirst!(
    lmp::QInchworm.utility.LazyMatrixProduct{T<:Number}
) -> Int64
popfirst!(
    lmp::QInchworm.utility.LazyMatrixProduct{T<:Number},
    n::Int64
) -> Int64

Remove n matrices from the left of the product lmp. By default, n = 1.

source

Random sequence

QInchworm.utility.seed!Function
seed!(s::QInchworm.utility.RandomSeq, seed)

Seed the underlying random number generator of the sequence s with a given integer.

source

Serialization using IOBuffer

Range partitioning utilities