This module includes all the available test problems.

class SSP_Tools.TestProblems.TestProblem

This is the parent class for all the example problems in SSP_Tools. It defines a basic interface that allows you to easily obtain approximations using a variety of numerical schemes.

This is just a subset of available routines. Individual problems may extend this interface with additional functions that perform tasks specific to that that problem. However, any script that exclusively calls these functions is garanteed to work with any problem whether it is an ODE or PDE.

approximate(t, varargin)
Parameters:dt (double) – time step increment
Return type:none

Approximate the solution of the example problem at time t.

If no additional arguments are provided, the value of \(\Delta{t}\) used to step the approximation forward will be determined by the problem using sensible defaults.

If a value is specified for dt, that value will be taken as \(\Delta{t}\).

step(dt)

Approximate the solution of the example problem at time \(t+\Delta{t}\)

get_domain(varargin)

Returns the domain of the function.

get_approximation(varargin)

Returns the approximation of the example problem at the current time.

get_exact_solution(varargin)

Returns the exact solution of the example problem at the current time.

get_error()

Returns the pointwise error of the approximation at the current time.

plot(varargin)
Parameters:with_exact (boolean) – If true, overlay the exact solution

Return a plot of the approximation at the current time.

This is a convenience function for quickly plotting solutions without having to worry about the type of problem or the shape of the domain.

copy()

Return a copy of the example problem object regressed to its initial state.

export(varargin)

Return a MATLAB data structure containing a platform independent representation of this object suitable for archiving to disk.

repr()

Return a string representation of this object.

get_repr()

Return a MATLAB data structure representation of this object.

Ordinary Differential Equations

class SSP_Tools.TestProblems.ODE(varargs)

Base class for all test problems that are Ordinary Differential Equations.

y_p

A MATLAB function handle that represents the right hand side of the ODE equation (or system of equations) as \(y'(y,t)=\) y_p(y,t)

initial_condition

The value of \(y(t_0)\) . This can either be a scalar value or a vector-value in the case of systems of ODE equations.

domain

Contains the intial value of \(t_0\) where the initial condition is valid.

integrator

An SSP_Tools.Integrators.Integrator object that will perform the time-stepping necessary for approximating the solution at \(t>t_0\).

t

Current value of the independent variable \(t\)

y

Current value of the dependent variable \(y\)

data_file

File where difficult computations are cached to disk.

exact_data

containers.Map object containing the solutions to difficult computations.

Partial Differential Equations

class SSP_Tools.TestProblems.AdvectionLeftToRight(varargs)
class SSP_Tools.TestProblems.AdvectionRightToLeft(varargs)
class SSP_Tools.TestProblems.AdvectionLeftToRight(varargs)
class SSP_Tools.TestProblems.AdvectionLeftToRight(varargs)
class SSP_Tools.TestProblems.AdvectionLeftToRight(varargs)
class SSP_Tools.TestProblems.AdvectionLeftToRight(varargs)

Download SSP_Tools

Table Of Contents

This Page