API Reference
Solve interface
StructuralDynamicsODESolvers.Solution
— TypeSolution{T<:AbstractSolver, UT, VT, AT} <: AbstractSolution
Fields
alg
– algorithm used in the integrationU
– displacementsU′
– velocitiesU′′
– accelerationst
– vector of time values
StructuralDynamicsODESolvers.step_size
— Functionstep_size(alg::AbstractSolver)
Return the step size of the given algorithm.
Input
alg
– algorithm
Output
The step size of the algorithm, or nothing
if the step-size is not fixed.
CommonSolve.solve
— FunctionCommonSolve.solve(args...; kwargs...)
Solves an equation or other mathematical problem using the algorithm specified in the arguments. Generally, the interface is:
CommonSolve.solve(prob::ProblemType,alg::SolverType; kwargs...)::SolutionType
where the keyword arguments are uniform across all choices of algorithms.
By default, solve
defaults to using solve!
on the iterator form, i.e.:
solve(args...; kwargs...) = solve!(init(args...; kwargs...))
solve(ivp::InitialValueProblem, alg::AbstractSolver, args..; kwargs...)
Solve an initial-value problem.
Input
ivp
– initial-value problemalg
– algorithm
Output
A solution structure (Solution
) that holds the result and the algorithm used to obtain it.
StructuralDynamicsODESolvers.displacements
— Functiondisplacements(sol::Solution)
Return the vector of displacements of the given solution.
displacements(sol::Solution, i::Int)
Return the vector of displacements of the given solution along coordinate i
.
StructuralDynamicsODESolvers.velocities
— Functionvelocities(sol::Solution)
Return the vector of velocities of the given solution.
velocities(sol::Solution, i::Int)
Return the vector of velocities of the given solution along coordinate i
.
StructuralDynamicsODESolvers.accelerations
— Functionaccelerations(sol::Solution)
Return the vector of accelerations of the given solution.
accelerations(sol::Solution, i::Int)
Return the vector of accelerations of the given solution along coordinate i
.
Type hierarchy & dispatch
Each integration algorithm, called solver, is implemented by a Julia struct which holds the algorithm's options (such as the step-size), and such struct is a subtype of AbstractSolver
. New solvers should implement a method with signature
_solve(::SolverType, ::InitialValueProblem{...}, args...; kwargs...)`
The return type of a solver must be any concrete subtype that implements the AbstractSolution
interface, e.g. the Solution
type.
StructuralDynamicsODESolvers.AbstractSolution
— TypeAbstractSolution
Abstract supertype that holds the solution of a numerical integration.
StructuralDynamicsODESolvers.AbstractSolver
— TypeAbstractSolver
Abstract supertype for all direct integration methods.