GeometricBase

Documentation for GeometricBase.

Library

GeometricBase.AbstractSolverState — Type
AbstractSolverState

The state is used in solvers and optimizers to translate information about previous solver/optimization steps to successive iterations.

source
GeometricBase.AbstractStateVariable — Type

AbstractStateVariable{T,N,AT} is a wrapper around a AT <: AbstractArray{T,N} that provides context for the nature of the variable, e.g., a state or a vector field.

source
GeometricBase.State — Type

Holds the solution of a geometric equation at a single time step.

It stores all the information that is required to uniquely determine the state of a systen, in particular all state variables and their corresponding vector fields.

source
GeometricBase.StateVariable — Type

StateVariable{T,N,AT,RT,PT} is a wrapper around a AT <: AbstractArray{T,N} that holds one of the variables consituting the state of a dynamical system.

The value field holds the actual data, the range field holds the range of valid values, and the periodic field holds a bitmask indicating which dimensions are periodic.

source
Base.copy! — Method
copy!(st::State, sol::NamedTuple)

Copy the values from a NamedTuple sol to the State st.

The keys of sol must be a subset of the keys of the state.

Arguments

  • st: the state to copy into
  • sol: the named tuple containing the values to copy
source
Base.copy! — Method
copy!(dst::State, src::State)

Copy the values from one State src to another State dst.

The keys of src and dst must identical.

Arguments

  • src: the state to copy into
  • dst: the state containing the solution values to copy
source
Base.getindex — Method
getindex(st::State, args...)

Passes getindex on to the state in State.

source
Base.keys — Method
keys(st::State)

Return the keys of all the state variables in the State.

source
GeometricBase.HistoryState — Method
HistoryState(st::State)

Constructs a state whose symbols are decorated by a bar to indicate a previous value of the state.

source
GeometricBase.SolverState — Method
SolverState(::Union{<:AbstractSolver,<:SolverMethod}, args...; kwargs...)

This method returns a subtype of AbstractSolverState according to the AbstractSolver or SolverMethod that is passed to it. By default, i.e., if no such method is defined for a given solver, it returns NullSolverState.

source
GeometricBase.h5load — Function
h5load(T, h5, args...; path)
h5load(T, fpath::AbstractString, args...; kwargs...)

Read an object of type T from the group path of the HDF5 file or group h5, as written by h5save. The trailing arguments supply what the file cannot hold, for example the problem that a solution belongs to.

A method types h5 as HDF5.H5DataStore, and it chooses its own default for path. The second form opens the file fpath read-only, and calls the first form on it. See h5save.

source
GeometricBase.h5save — Function
h5save(h5, x; path)
h5save(fpath::AbstractString, x, args...; mode = "w", kwargs...)

Write x into the HDF5 file or group h5, under the group path.

A package that stores one of its types in HDF5 adds a method for that type, usually in a package extension on HDF5, so that one function serves every type. The method types h5 as HDF5.H5DataStore, and it chooses its own default for path.

The second form opens the file fpath with mode, and calls the first form on it with the other arguments. It is defined when HDF5 is loaded, and it works for every type with a method of the first form. An untyped h5 makes a method of the first form ambiguous with it.

source
GeometricBase.noise — Function
noise(equation)
noise(problem)

The stochastic process driving a stochastic differential equation, an AbstractStochasticProcess.

The process says which noise drives the equation, not which realisation of it: drawing increments is the integrator's business, since only the integrator knows whether the scheme it implements needs increments that are accurate in the strong or the weak sense.

source
GeometricBase.noisedims — Function
noisedims(process)
noisedims(equation)
noisedims(problem)

The number of independent Wiener processes driving a stochastic differential equation.

This fixes the number of columns of the diffusion matrix, and it is what a stochastic integrator uses to size the increment vectors it draws each step — so it has to be answerable from the problem alone, before any integrator exists.

source
GeometricBase.vectorfield — Method

The vectorfield function returns a datastructure that stores the vectorfield for an AbstractStateVariable s that holds the state of a system. By default it returns a VectorfieldVariable that wraps zero(parent(s)), i.e., the same kind of array as the state variable, but custom methods can be implemented in order to account for more specific use cases, e.g., when s also contains constant fields that should not be present in the vector field.

source