Skip to main content
Ctrl+K

02689 Advanced Numerical Algorithms - Assignment 2

  • Exercise scripts
  • API Reference
  • GitHub
  • Exercise scripts
  • API Reference
  • GitHub

Section Navigation

  • spectral.LegendreLobattoBasis
  • spectral.FourierEquispacedBasis
  • spectral.legendre_diff_matrix
  • spectral.legendre_mass_matrix
  • spectral.fourier_diff_matrix_cotangent
  • spectral.fourier_diff_matrix_on_interval
  • spectral.BvpProblem
  • spectral.solve_bvp
  • spectral.solve_legendre_collocation
  • spectral.solve_legendre_tau
  • spectral.solve_polar_bvp
  • spectral.TimeIntegrator
  • spectral.get_time_integrator
  • spectral.RK3
  • spectral.RK4
  • spectral.KdVSolver
  • spectral.soliton
  • spectral.two_soliton_initial
  • spectral.utils.io.ensure_output_dir
  • spectral.utils.io.load_simulation_data
  • spectral.utils.io.save_simulation_data
  • spectral.utils.formatting.extract_metadata
  • spectral.utils.formatting.format_dt_latex
  • spectral.utils.formatting.format_parameter_range
  • spectral.utils.formatting.build_parameter_string
  • spectral.utils.plotting.get_repo_root
  • spectral.utils.norms.discrete_l2_norm
  • spectral.utils.norms.discrete_l2_error
  • spectral.utils.norms.discrete_linf_error
  • API Reference
  • spectral.TimeIntegrator

spectral.TimeIntegrator#

class spectral.TimeIntegrator(name: str, order: int, stages: int = 1)[source]#

Bases: object

Base class for time integration methods.

Methods

__init__

Initialize time integrator.

step

Take one time step.

step(rhs: Callable, u: ndarray, t: float, dt: float) → ndarray[source]#

Take one time step.

Parameters:
rhsCallable

Right-hand side function f(u, t)

unp.ndarray

Current solution

tfloat

Current time

dtfloat

Time step

Returns:
np.ndarray

Solution at next time step

previous

spectral.solve_polar_bvp

next

spectral.get_time_integrator

On this page
  • TimeIntegrator
    • TimeIntegrator.step()

© Copyright 2025, Louis Kamp Eskildsen, Aske Funch Schrøder Nielsen, Philip Korsager Nickel.

Created using Sphinx 8.2.3.

Built with the PyData Sphinx Theme 0.16.1.