GeometricBase
Documentation for GeometricBase.
GeometricBase.AbstractScalarVariableGeometricBase.AbstractSolverStateGeometricBase.AbstractStateVariableGeometricBase.AbstractVariableGeometricBase.GeometricDataGeometricBase.NullInvariantsGeometricBase.NullParametersGeometricBase.NullPeriodicityGeometricBase.NullSolverStateGeometricBase.StateGeometricBase.StateVectorBase.copy!Base.getindexBase.haskeyBase.keysGeometricBase.HistoryStateGeometricBase.SolverStateGeometricBase.integrateGeometricBase.integrate!GeometricBase.vectorfieldGeometricBase.zerovector
Library
GeometricBase.AbstractScalarVariable — TypeAbstractScalarVariable{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 — TypeAbstractSolverStateThe state is used in solvers and optimizers to translate information about previous solver/optimization steps to successive iterations.
GeometricBase.AbstractStateVariable — TypeAbstractStateVariable{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 — TypeAbstractVariable{T,N} is a wrapper around a AbstractArray{T,N} that provides context for the nature of the variable.
GeometricBase.GeometricData — TypeGeometricData is a wrapper for different types of data sets such as the solution of a Lagrangian or Hamiltonian system.
GeometricBase.NullInvariants — TypeNullInvariants is an empty struct that is used to indicate than an equation does not have invariants.
GeometricBase.NullParameters — TypeNullParameters is an empty struct that is used to indicate than an equation does not have parameters.
GeometricBase.NullPeriodicity — TypeNullPeriodicity is an empty struct that is used to indicate than an equation does not have periodic solution components.
GeometricBase.NullSolverState — TypeNullSolverState is an empty struct that is used to indicate than a solver does not store a state.
GeometricBase.State — TypeHolds 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.StateVector — TypeStateVector{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! — Methodcopy!(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 solution values to copy
Base.getindex — Methodgetindex(st::State, args...)Passes getindex on to the state in State.
Base.haskey — Methodhaskey(st::State, s::Symbol)Checks if s is a valid state variable in the State.
Base.keys — Methodkeys(st::State)Return the keys of all the state variables in the State.
GeometricBase.HistoryState — MethodHistoryState(st::State)Constructs a state whose symbols are decorated by a bar to indicate a previous value of the state.
GeometricBase.SolverState — MethodSolverState(::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.integrate — Functionintegrate(problem, method; kwargs...)Integrate a problem with method and return the solution.
GeometricBase.integrate! — FunctionSolve one time step:
integrate!(integrator)GeometricBase.vectorfield — MethodThe 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 — Methodzerovector(X::StateVector) returns a new StateVector with zero applied all elements of X.