Skip to content

Optimise get_krylov_equations #151

Open
@oameye

Description

@oameye

Optimise get_krylov_equations. Not a priority as it is only runs once in a generic workflow.

using HarmonicBalance, BenchmarkTools
@variables α ω ω0 F γ t x(t);
diff_eq = DifferentialEquation(d(x, t, 2) + ω0^2*x + α * x^3 + γ * d(x, t) ~ F*cos*t), x)
add_harmonic!(diff_eq, x, ω) #
@btime harmonic_eq = get_harmonic_equations(diff_eq)
@btime krylov_eq = get_krylov_equations(diff_eq, order=1)
@btime krylov_eq = get_krylov_equations(diff_eq, order=2)
106.079 ms (727806 allocations: 35.85 MiB)
252.987 ms (2011451 allocations: 105.51 MiB)
2.251 s (17602636 allocations: 953.39 MiB)

Metadata

Metadata

Assignees

No one assigned

    Labels

    performanceRegarding performance of the packagewontfixThis will not be worked on

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions