gridripper::amr1d::FuncInitCond Class Reference

Initial condition for a PDE. More...

Inheritance diagram for gridripper::amr1d::FuncInitCond:

gridripper::amr1d::InitCond gridripper::amr1d::initcond::ODERelaxInit gridripper::amr1d::initcond::UserDef gridripper::amr1d::initcond::Zero gridripper::amr1d::initcond::ODEShootInit

List of all members.

Public Member Functions

int init (Grid[][] grids, PDE pde, double dt, int r, int maxlevel, int bufzone, AMError amerr, double maxerr) throws InitCond.Exception
 Creates and initializes base grid and initial subgrids.
double getTime ()
 Gets the time parameter at the initialization.
int getInterpolatedLevel ()
 Gets the minimum refinement level where interpolation is used instead of the precise calculation of the initial state.
void setInterpolatedLevel (int l)
 Initial values are interpolated on the specified refinement level and finer levels.

Protected Member Functions

 FuncInitCond (String[] args, Parameters p)
int getMostRefinedGridMaxI ()
 Gets the most refined equivalent of the base grid size.
double getMostRefinedGridDeltaX ()
 Gets the grid spacing of the most refined subgrids.
abstract void init (PDE pde, double x, FieldWrapper fw) throws InitCond.Exception
 Initializes the grid at the specified point.
boolean isNumericalConstraintSettingNeeded ()
 Tests whether the constrained components should be set numerically by PDE.initConstraints.
void setNumericalConstraintSettingNeeded (boolean v)
 Enables or disables numerical constraint setting by the PDE.
void endInit ()
 Called at the end of init.


Detailed Description

Initial condition for a PDE.

Version:
0.5, 05/08/2009
Since:
GridRipper 0.3, 04/23/2005
Author:
Peter Csizmadia

Member Function Documentation

int gridripper::amr1d::FuncInitCond::init ( Grid  grids[][],
PDE  pde,
double  dt,
int  r,
int  maxlevel,
int  bufzone,
AMError  amerr,
double  maxerr 
) throws InitCond.Exception [inline, virtual]

Creates and initializes base grid and initial subgrids.

Parameters:
grids array of all grids
pde the PDE
dt the time step
r refinement ratio
maxlevel maximum refinement level
bufzone buffer zone size
amerr error function
maxerr error tolerance
Returns:
the finest refinement level

Implements gridripper::amr1d::InitCond.

int gridripper::amr1d::FuncInitCond::getMostRefinedGridMaxI (  )  [inline, protected]

Gets the most refined equivalent of the base grid size.

Returns:
the size

double gridripper::amr1d::FuncInitCond::getMostRefinedGridDeltaX (  )  [inline, protected]

Gets the grid spacing of the most refined subgrids.

Returns:
the minimum possible grid spacing

double gridripper::amr1d::FuncInitCond::getTime (  )  [inline, virtual]

Gets the time parameter at the initialization.

The default implementation returns 0.

Returns:
the time

Implements gridripper::amr1d::InitCond.

Reimplemented in gridripper::amr1d::initcond::UserDef.

int gridripper::amr1d::FuncInitCond::getInterpolatedLevel (  )  [inline]

Gets the minimum refinement level where interpolation is used instead of the precise calculation of the initial state.

Returns:
the minimum interpolated refinement level or zero if interpolation is not used

void gridripper::amr1d::FuncInitCond::setInterpolatedLevel ( int  l  )  [inline]

Initial values are interpolated on the specified refinement level and finer levels.

Parameters:
l the minimum refinement level where interpolation is used or zero to avoid interpolation

abstract void gridripper::amr1d::FuncInitCond::init ( PDE  pde,
double  x,
FieldWrapper  fw 
) throws InitCond.Exception [protected, pure virtual]

Initializes the grid at the specified point.

Parameters:
pde the PDE
x the x coordinate
phi output array for the field values

Implemented in gridripper::amr1d::initcond::ODERelaxInit, gridripper::amr1d::initcond::ODEShootInit, gridripper::amr1d::initcond::UserDef, and gridripper::amr1d::initcond::Zero.

boolean gridripper::amr1d::FuncInitCond::isNumericalConstraintSettingNeeded (  )  [inline, protected]

Tests whether the constrained components should be set numerically by PDE.initConstraints.

Returns:
true in the default implementation

void gridripper::amr1d::FuncInitCond::setNumericalConstraintSettingNeeded ( boolean  v  )  [inline, protected]

Enables or disables numerical constraint setting by the PDE.

Parameters:
v true to set constraints numerically, false if they are initialized by this InitCond

void gridripper::amr1d::FuncInitCond::endInit (  )  [inline, protected]

Called at the end of init.

This method can free temporarily allocated memory or perform other clean-up tasks. The default implementations is empty.

Reimplemented in gridripper::amr1d::initcond::ODERelaxInit, and gridripper::amr1d::initcond::ODEShootInit.


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

Generated on Wed Jun 17 18:47:25 2009 for GridRipper by  doxygen 1.5.6