NSDETimeParallel.jl

This is the documentation of NSDETimeParallel.jl, a Julia package implementing time-parallel methods.

API

All exported types and functions are considered part of the public API, and thus documented in this manual.

NSDETimeParallel.PararealType
Parareal <: AbstractTimeParallelSolver

A composite type for the Parareal algorithm.

Constructors

Parareal(finesolver, coarsesolver, parameters, tolerance)
Parareal(finesolver, coarsesolver; parameters=PararealParameters(), tolerance=Tolerance())

Arguments

  • finesolver :: AbstractInitialValueSolver : fine solver (accurate but expensive).
  • coarsesolver :: AbstractInitialValueSolver : coarse solver (rough but quick).
  • parameters :: AbstractPararealParameters : parameters for the correction step.
  • tolerance :: AbstractTolerance : tolerance and error mechanism.

Methods

(parareal::Parareal)(solution::PararealSolution, problem::AbstractInitialValueProblem)
(parareal::Parareal)(problem::AbstractInitialValueProblem)

returns the solution of a problem using parareal.

source
NSDETimeParallel.PararealIterateType
PararealIterate <: AbstractTimeParallelIterate

A composite type for a single iterate in a PararealSolution.

Constructors

PararealIterate(chunks::AbstractVector{𝕊}) where 𝕊<:AbstractInitialValueSolution
PararealIterate(problem::AbstractInitialValueProblem, parareal::Parareal)

Functions

Methods

(iterate::PararealIterate)(t::Real)

returns the value of iterate at t via interpolation.

source
NSDETimeParallel.PararealParametersType
PararealParameters <: AbstractPararealParameters

A composite type for the basic parameters of Parareal.

Constructors

PararealParameters(N, K)
PararealParameters(; N=10, K=N)

Arguments

  • N :: Integer : number of time chunks/processors.
  • K :: Integer : maximum number of iterations.
source
NSDETimeParallel.PararealSolutionType
PararealSolution <: AbstractTimeParallelSolution

A composite type for an AbstractTimeParallelSolution obtained using Parareal.

Constructors

PararealSolution(lastiterate, errors)
PararealSolution(problem::AbstractInitialValueProblem, parareal::Parareal)

Arguments

  • lastiterate :: PararealIterate
  • errors :: AbstractVector{ℝ} where ℝ<:Real : iteration errors.

Functions

Methods

(solution::PararealSolution)(t::Real)

returns the value of solution at t via interpolation.

source
NSDETimeParallel.ToleranceType
Tolerance <: AbstractTolerance

A composite type for the tolerance mechanism of an time-parallel solver.

Constructors

Tolerance(ϵ, ψ, weights)
Tolerance(; ϵ=1e-12, ψ=ψ₁, weights=Weights())

Arguments

  • ϵ :: Real : tolerance.
  • ψ :: Function : error function.
  • weights :: Weights : weights for ψ.
source
NSDETimeParallel.WeightsType
Weights <: AbstractWeights

A composite type for the weights of Tolerance.

Constructors

Weights(; w=1.0, updatew=false)

Arguments

  • w :: Union{AbstractVector{ℝ}, ℝ} where ℝ<:Real : weighting factor for ψ.
  • updatew :: Bool : flags when to update! w using (an approximation of) the Lipschitz function of the fine solver.

Functions

  • update! : updates w using (an approximation of) the Lipschitz function of the fine solver.
source
Base.firstindexMethod
firstindex(solution::PararealSolution)

returns the first index of solution.

source
Base.getindexMethod
getindex(iterate::PararealIterate, n::Integer)

returns the n-th chunk of iterate.

source
Base.lastindexMethod
lastindex(iterate::PararealIterate)

returns the last index of iterate.

source
Base.lastindexMethod
lastindex(solution::PararealSolution)

returns the last index of solution.

source
Base.lengthMethod
length(iterate::PararealIterate)

returns the number of chunks of iterate.

source
Base.lengthMethod
length(solution::PararealSolution)

returns the number of chunks of solution.

source
Base.setindex!Method
setindex!(iterate::PararealIterate, value::AbstractInitialValueSolution, n::Integer)

stores value into the n-th chunk of iterate.

source
NSDEBase.solve!Method
solve!(solution::AbstractTimeParallelSolution, problem, solver::AbstractTimeParallelSolver; kwargs...) :: AbstractTimeParallelSolution

computes the solution of problem using solver.

source
NSDEBase.solveMethod
solve(problem, solver::AbstractTimeParallelSolver; kwargs...) :: AbstractTimeParallelSolution

computes the solution of problem using solver.

source
NSDETimeParallel.update!Method
update!(weights::Weights, U<:AbstractVector{𝕍}, F<:AbstractVector{𝕍}) where 𝕍<:AbstractVector{ℂ} where ℂ<:Number

updates weights.w based on U and F.

source