gridripper::amr1d::AMRCore Class Reference

AMR integrator. More...

Inheritance diagram for gridripper::amr1d::AMRCore:

gridripper::amr1d::AutoAMRCore

List of all members.

Public Member Functions

 AMRCore (PDE pde, InitCond ini, boolean constrforced, Integrator gi, Regridder rgdproto, String dtdx_str, int maxi, int npabovemax, int maxl, int r, AMError amerr, double maxerr, int errchkf, int regridf, int bufzoner) throws InitCond.Exception, IllegalArgumentException
 Creates a grid hierarchy.
abstract AMRCore cloneAMRCore ()
 Clones this object.
boolean isRunning ()
void setRunning (boolean r)
 Sets the running flag.
abstract boolean areSubstepsMonitorable ()
abstract void monitor (int level, int sublevel, String msg)
 Wakes up another thread, suspends the integrator thread temporarily.
int getRefinementRatio ()
int getMaxAllowedLevel ()
boolean getDebug ()
void setDebug (boolean v)
PDE getPDE ()
 Gets the PDE.
double getErrorTolerance ()
double getErrorToleranceDt (int l)
int getErrorCheckFreq ()
int getRegridFreq ()
int getBufferZoneSize ()
boolean getSubstepMonitoring ()
 Gets substep monitoring mode.
void setSubstepMonitoring (boolean fm)
 Sets substep monitoring mode.
int getCurrentLevel ()
 Gets the current level.
String getNextMessage ()
 Gets the current state description.
Grid getBaseGrid ()
 Gets the base grid.
double getDeltaT0 ()
 Gets the default time step on the base grid.
double getDeltaT ()
 Gets the current time step on the base grid.
boolean isCurrentDeltaT0Computed ()
 Is the current time step computed?
double getDeltaT (double dt, int l)
 Gets the time step on the specified level.
final boolean isConstraintForced ()
final void setConstraintForced (boolean v)
final boolean isEnergyWritten ()
final void setEnergyWritten (boolean v)
GridBDataWriter createBDataWriter ()
void writeData (Writer w, String format, String energyfmt, PrecalculatedSolution xsol) throws IOException
void integrate ()
 Performs integration on the base grid and its subgrids.

Protected Member Functions

 AMRCore (AMRCore ai)
 Copy constructor.
abstract boolean isLastTime (Grid g)
 Tests whether the last time step is reached.
abstract boolean isStepMonitored (int level, int sublevel)
 Checks if a step should be monitored or not.
void setCurrentLevel (int l)
 Gets the current level.
void setNextMessage (String msg)
 Gets the current state description.
void coarseStepped (double t)
 This method is called immediately after each coarse time step on the base grid, before refined grid updates.

Static Package Functions

 [static initializer]


Detailed Description

AMR integrator.

Version:
0.5, 05/13/2009
Author:
Peter Csizmadia

Constructor & Destructor Documentation

gridripper::amr1d::AMRCore::AMRCore ( AMRCore  ai  )  [inline, protected]

Copy constructor.

Parameters:
ai the object to copy

gridripper::amr1d::AMRCore::AMRCore ( PDE  pde,
InitCond  ini,
boolean  constrforced,
Integrator  gi,
Regridder  rgdproto,
String  dtdx_str,
int  maxi,
int  npabovemax,
int  maxl,
int  r,
AMError  amerr,
double  maxerr,
int  errchkf,
int  regridf,
int  bufzoner 
) throws InitCond.Exception, IllegalArgumentException [inline]

Creates a grid hierarchy.

Parameters:
pde the partial differential equation to integrate
ini the initial conditions
constrforced whether to force constraints
gi the numerical integration method
rgdproto regridder prototype
dtdx_str dt/dx
maxi base grid size
npabovemax number of grid points above infinity (Xmax)
maxl maximum allowed refinement level
r refinement ratio
amerr the error calculation method
maxerr the critical error value or 0
errchkf error checking frequency
regridf regridding frequency
bufzoner radius of buffer zone


Member Function Documentation

abstract AMRCore gridripper::amr1d::AMRCore::cloneAMRCore (  )  [pure virtual]

Clones this object.

Returns:
the clone

Implemented in gridripper::amr1d::AutoAMRCore.

void gridripper::amr1d::AMRCore::setRunning ( boolean  r  )  [inline]

Sets the running flag.

abstract boolean gridripper::amr1d::AMRCore::isLastTime ( Grid  g  )  [protected, pure virtual]

Tests whether the last time step is reached.

Returns:
true if no more integration steps are needed, false if simulation should continue

Implemented in gridripper::amr1d::AutoAMRCore.

abstract boolean gridripper::amr1d::AMRCore::isStepMonitored ( int  level,
int  sublevel 
) [protected, pure virtual]

Checks if a step should be monitored or not.

Parameters:
level the current level
sublevel the current sublevel
Returns:
true if the step should be monitored

Implemented in gridripper::amr1d::AutoAMRCore.

abstract void gridripper::amr1d::AMRCore::monitor ( int  level,
int  sublevel,
String  msg 
) [pure virtual]

Wakes up another thread, suspends the integrator thread temporarily.

Also sets the current level and status message.

Parameters:
level the current level
sublevel the current sublevel
msg a message or null

Implemented in gridripper::amr1d::AutoAMRCore.

PDE gridripper::amr1d::AMRCore::getPDE (  )  [inline]

Gets the PDE.

Returns:
the PDE

boolean gridripper::amr1d::AMRCore::getSubstepMonitoring (  )  [inline]

Gets substep monitoring mode.

Returns:
true if the state is monitored frequently, false it is monitored only before base grid integration steps

void gridripper::amr1d::AMRCore::setSubstepMonitoring ( boolean  fm  )  [inline]

Sets substep monitoring mode.

Parameters:
fm true to monitor the state frequently, false to monitor only before base grid integration steps

int gridripper::amr1d::AMRCore::getCurrentLevel (  )  [inline]

Gets the current level.

Returns:
the current level.

void gridripper::amr1d::AMRCore::setCurrentLevel ( int  l  )  [inline, protected]

Gets the current level.

Parameters:
l the current level.

String gridripper::amr1d::AMRCore::getNextMessage (  )  [inline]

Gets the current state description.

Returns:
the current state's description

void gridripper::amr1d::AMRCore::setNextMessage ( String  msg  )  [inline, protected]

Gets the current state description.

Parameters:
msg the current state's description

Grid gridripper::amr1d::AMRCore::getBaseGrid (  )  [inline]

Gets the base grid.

Returns:
the base grid

double gridripper::amr1d::AMRCore::getDeltaT0 (  )  [inline]

Gets the default time step on the base grid.

Returns:
the time step

double gridripper::amr1d::AMRCore::getDeltaT (  )  [inline]

Gets the current time step on the base grid.

Returns:
the time step

boolean gridripper::amr1d::AMRCore::isCurrentDeltaT0Computed (  )  [inline]

Is the current time step computed?

Returns:
true if it is computed automatically, false if determined in the input file

double gridripper::amr1d::AMRCore::getDeltaT ( double  dt,
int  l 
) [inline]

Gets the time step on the specified level.

Parameters:
dt the base time step
l the level
Returns:
the smallest time step

void gridripper::amr1d::AMRCore::coarseStepped ( double  t  )  [inline, protected]

This method is called immediately after each coarse time step on the base grid, before refined grid updates.

Parameters:
t the mean time of the last time step

Reimplemented in gridripper::amr1d::AutoAMRCore.


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

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