Classes | Public Member Functions

gridripper::odesolver::relax::ODERelax Class Reference

Solution of ODEs with relaxation method. More...

#include <ODERelax.h>

List of all members.

Classes

class  Method
 Abstract class of relaxation method matrix initializers. More...
class  RelaxationException
 Relaxation error. More...

Public Member Functions

 ODERelax (const GrrProperties &props) throw (RelaxationException&)
 Constructs the ODE solver.
 ODERelax (const GrrProperties &props, int maxi) throw (RelaxationException&)
 Constructs the ODE solver.
 ODERelax (ODE *ode, tvalarray< GReal_t > &data, int order) throw (RelaxationException&)
 Constructs the ODE solver.
ODEgetODE () const
 Gets the ODE.
int getMaxI ()
 Gets the grid size.
string getDataFormat ()
 Gets the output data format.
double getRelativeError ()
 Gets the relative error of the solution after the final iteration.
int getNumIterations ()
 Gets the number of iterations.
void setNumIterations (int n)
 Sets the number of iterations.
void solve (tvalarray< GReal_t > &sol) throw (RelaxationException&)
 Solves the system of equation.
double nextIteration () throw (RelaxationException&)
 Performs the next iteration.

Detailed Description

Solution of ODEs with relaxation method.

Version:
0.5, 06/22/2008
Since:
GridRipper 0.4, 09/17/2006
Author:
Peter Csizmadia

Constructor & Destructor Documentation

gridripper::odesolver::relax::ODERelax::ODERelax ( const GrrProperties props  )  throw (RelaxationException&)

Constructs the ODE solver.

Parameters:
props properties
gridripper::odesolver::relax::ODERelax::ODERelax ( const GrrProperties props,
int  maxi 
) throw (RelaxationException&)

Constructs the ODE solver.

Parameters:
props properties
maxi grid size (maximum grid point index)
gridripper::odesolver::relax::ODERelax::ODERelax ( ODE ode,
tvalarray< GReal_t > &  data,
int  order 
) throw (RelaxationException&)

Constructs the ODE solver.

Parameters:
ode the ODE
data the field values
order discretization order (2 or 4)

Member Function Documentation

string gridripper::odesolver::relax::ODERelax::getDataFormat (  )  [inline]

Gets the output data format.

Returns:
the format string
int gridripper::odesolver::relax::ODERelax::getMaxI (  )  [inline]

Gets the grid size.

Returns:
the number of points minus 1.
int gridripper::odesolver::relax::ODERelax::getNumIterations (  )  [inline]

Gets the number of iterations.

Returns:
the number of iterations
ODE& gridripper::odesolver::relax::ODERelax::getODE (  )  const [inline]

Gets the ODE.

Returns:
the ODE
double gridripper::odesolver::relax::ODERelax::getRelativeError (  )  [inline]

Gets the relative error of the solution after the final iteration.

Returns:
the relative error
double gridripper::odesolver::relax::ODERelax::nextIteration (  )  throw (RelaxationException&)

Performs the next iteration.

Called by solve.

Returns:
the relative error
void gridripper::odesolver::relax::ODERelax::setNumIterations ( int  n  )  [inline]

Sets the number of iterations.

Parameters:
n number of iterations or -1 to stop only when the relative error cannot be decreased further
void gridripper::odesolver::relax::ODERelax::solve ( tvalarray< GReal_t > &  sol  )  throw (RelaxationException&)

Solves the system of equation.

Parameters:
sol output vector for the solution

The documentation for this class was generated from the following file: