GeometricBase
Documentation for GeometricBase.
GeometricBase.AbstractScalarVariableGeometricBase.AbstractSolverStateGeometricBase.AbstractStateVariableGeometricBase.AbstractVariableGeometricBase.GeometricDataGeometricBase.NullInvariantsGeometricBase.NullParametersGeometricBase.NullPeriodicityGeometricBase.NullSolverStateGeometricBase.StateGeometricBase.StateVariableGeometricBase.StateVectorBase.copy!Base.copy!Base.getindexBase.keysGeometricBase.HistoryStateGeometricBase.SolverStateGeometricBase.h5loadGeometricBase.h5saveGeometricBase.integrateGeometricBase.integrate!GeometricBase.noiseGeometricBase.noisedimsGeometricBase.vectorfieldGeometricBase.zerovector
Library
GeometricBase.AbstractScalarVariable — Type
AbstractScalarVariable{T} is a wrapper around a zero-dimensional AbstractArray{T,0} that provides context for the nature of the variable, e.g., time.
GeometricBase.AbstractSolverState — Type
AbstractSolverStateThe state is used in solvers and optimizers to translate information about previous solver/optimization steps to successive iterations.
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.
GeometricBase.AbstractVariable — Type
AbstractVariable{T,N} is a wrapper around a AbstractArray{T,N} that provides context for the nature of the variable.
GeometricBase.GeometricData — Type
GeometricData is a wrapper for different types of data sets such as the solution of a Lagrangian or Hamiltonian system.
GeometricBase.NullInvariants — Type
NullInvariants is an empty struct that is used to indicate than an equation does not have invariants.
GeometricBase.NullParameters — Type
NullParameters is an empty struct that is used to indicate than an equation does not have parameters.
GeometricBase.NullPeriodicity — Type
NullPeriodicity is an empty struct that is used to indicate than an equation does not have periodic solution components.
GeometricBase.NullSolverState — Type
NullSolverState is an empty struct that is used to indicate than a solver does not store a state.
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.
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.
GeometricBase.StateVector — Type
StateVector{DT,VT} is a vector of StateVariables, where DT is the datatype of the state and VT is the type of the vector.
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 intosol: the named tuple containing the values to copy
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 intodst: the state containing the solution values to copy
Base.getindex — Method
getindex(st::State, args...)Passes getindex on to the state in State.
GeometricBase.HistoryState — Method
HistoryState(st::State)Constructs a state whose symbols are decorated by a bar to indicate a previous value of the state.
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.
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.
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.
GeometricBase.integrate — Function
integrate(problem, method; kwargs...)Integrate a problem with method and return the solution.
GeometricBase.integrate! — Function
Solve one time step:
integrate!(integrator)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.
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.
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.
GeometricBase.zerovector — Method
zerovector(X::StateVector) returns a new StateVector with zero applied all elements of X.