All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class CH.epfl.lcvm.mccc.FDDiscretization

java.lang.Object
   |
   +----CH.epfl.lcvm.mccc.OneDDiscretization
           |
           +----CH.epfl.lcvm.mccc.FDDiscretization

public class FDDiscretization
extends OneDDiscretization
A finite difference 1D discretization. An object that implements a central difference approximation to a ODE with boundary conditions.


Variable Index

 o domain_
Domain of this class as a Function.
 o range_
Range of this class as a Function.

Constructor Index

 o FDDiscretization(ODEFunctionWithBC, OneDMesh)
A discretization creation function which takes a mesh and a function and returns the finite difference discretization.

Method Index

 o call(Matrix)
Returns the value of the discretized function over the given mesh
 o generateGuess(Matrix, Matrix)
A convience function for generating a solution to the problem given intial conditions.
 o getDomain()
Returns the dimension of the domain of the discretized function
 o getRange()
Returns the dimension of the range of the discretized function
 o main(String[])
Exercise the class by trying the various functions

Variables

 o domain_
 protected int domain_
Domain of this class as a Function. Equals mesh_points.length*ndim+npar where ndim is the dimension of the input system and npar is the number of parameters in the input system.

See Also:
Function
 o range_
 protected int range_
Range of this class as a Function. Equals (mesh_points.length-1)*ndim+nbc where ndim is the dimension of the input system and npar is the number of boundary conditions.

See Also:
Function

Constructors

 o FDDiscretization
 public FDDiscretization(ODEFunctionWithBC func,
                         OneDMesh mesh)
A discretization creation function which takes a mesh and a function and returns the finite difference discretization. The assumes that the problem is of the form x' = func(x).

Parameters:
func - The function to discretize
mesh - The 1D mesh over which to discretize it

Methods

 o call
 public Matrix call(Matrix input)
Returns the value of the discretized function over the given mesh

Parameters:
value - the point at which to call the function. It assumes that the input has rows in the following order par1,...,parM, x0(mesh[0]), x1(mesh[0]), ...xn(mesh[0]),x0(mesh[1])...
Returns:
the return value of the function.
Overrides:
call in class OneDDiscretization
 o getRange
 public int getRange()
Returns the dimension of the range of the discretized function

Returns:
the dimension of the range of the function.
Overrides:
getRange in class OneDDiscretization
 o getDomain
 public int getDomain()
Returns the dimension of the domain of the discretized function

Returns:
the dimension of the domain of the function.
Overrides:
getDomain in class OneDDiscretization
 o generateGuess
 public Matrix generateGuess(Matrix initialValues,
                             Matrix parameterValues) throws MCCCException
A convience function for generating a solution to the problem given intial conditions.

Parameters:
initialValues - Initial values for the IVP solver
parameterValues - Parameter values for the IVP solver
Returns:
A solution to the problem
Throws: MCCCException
In case the method doesn't converge it throws this exception
 o main
 public static void main(String argv[]) throws MCCCException
Exercise the class by trying the various functions

Throws: MCCCException
In case something fails in the test harness it throws this exception.

All Packages  Class Hierarchy  This Package  Previous  Next  Index