gridripper::amr1d::AMRCore Class Reference

AMR integrator. More...

#include <AMRCore.h>

Inheritance diagram for gridripper::amr1d::AMRCore:

gridripper::amr1d::AutoAMRCore

List of all members.

Public Member Functions

 AMRCore (PDE *pde, InitCond &ini, bool constrforced, Integrator *gi, Regridder *rgdproto, const string &dtdx, int maxi, int npabovemax, int maxl, int r, AMError *amerr, double maxerr, int errchkf, int regridf, int bufzoner) throw (InitCond::Exception&, IllegalArgumentException&)
 Creates a grid hierarchy.
virtual AMRCorecloneAMRCore () const =0
 Clones this object.
bool isRunning () const
void setRunning (bool r)
 Sets the running flag.
virtual void output ()=0
 Writes output.
int getRefinementRatio () const
int getMaxAllowedLevel () const
bool getDebug () const
void setDebug (bool v)
bool isPhysicalFieldUsed () const
void setPhysicalFieldUsed (bool v)
PDEgetPDE () const
 Gets the PDE.
double getErrorTolerance () const
double getErrorToleranceDt (int l) const
int getErrorCheckFreq () const
int getRegridFreq () const
int getBufferZoneSize () const
int getCurrentLevel () const
 Gets the current level.
GridgetBaseGrid () const
 Gets the base grid.
GReal_t getDeltaT0 () const
 Gets the default time step on the base grid.
GReal_t getDeltaT () const
 Gets the current time step on the base grid.
bool isCurrentDeltaT0Computed () const
 Is the current time step explicitly set?
GReal_t getDeltaT (GReal_t dt, int l) const
 Gets the time step on the most refined grids.
bool isConstraintForced () const
void setConstraintForced (bool v)
bool isEnergyWritten () const
void setEnergyWritten (bool v)
GridBDataWritercreateBDataWriter () const
void integrate ()
 void writeData(Writer w, String format, String energyfmt, PrecalculatedSolution xsol) throws IOException not implemented in C++

Protected Member Functions

 AMRCore (const AMRCore &ai)
 Copy constructor.
void setCurrentLevel (int l)
 Gets the current level.
virtual bool isLastTime (const Grid &g) const =0
 Tests whether the last time step is reached.
virtual void coarseStepped (GReal_t t)
 This method is called immediately after each coarse time step on the base grid, before refined grid updates.


Detailed Description

AMR integrator.

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

Constructor & Destructor Documentation

gridripper::amr1d::AMRCore::AMRCore ( const AMRCore ai  )  [protected]

Copy constructor.

Parameters:
ai the object to copy

gridripper::amr1d::AMRCore::AMRCore ( PDE pde,
InitCond ini,
bool  constrforced,
Integrator gi,
Regridder rgdproto,
const string &  dtdx,
int  maxi,
int  npabovemax,
int  maxl,
int  r,
AMError amerr,
double  maxerr,
int  errchkf,
int  regridf,
int  bufzoner 
) throw (InitCond::Exception&, IllegalArgumentException&)

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 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

virtual AMRCore* gridripper::amr1d::AMRCore::cloneAMRCore (  )  const [pure virtual]

Clones this object.

Returns:
the clone

Implemented in gridripper::amr1d::AutoAMRCore.

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

Sets the running flag.

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

Gets the PDE.

Returns:
the PDE

int gridripper::amr1d::AMRCore::getCurrentLevel (  )  const [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.

virtual bool gridripper::amr1d::AMRCore::isLastTime ( const Grid g  )  const [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.

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

Gets the base grid.

Returns:
the base grid

GReal_t gridripper::amr1d::AMRCore::getDeltaT0 (  )  const [inline]

Gets the default time step on the base grid.

Returns:
the time step

GReal_t gridripper::amr1d::AMRCore::getDeltaT (  )  const [inline]

Gets the current time step on the base grid.

Returns:
the time step

bool gridripper::amr1d::AMRCore::isCurrentDeltaT0Computed (  )  const [inline]

Is the current time step explicitly set?

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

GReal_t gridripper::amr1d::AMRCore::getDeltaT ( GReal_t  dt,
int  l 
) const

Gets the time step on the most refined grids.

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::integrate (  ) 

void writeData(Writer w, String format, String energyfmt, PrecalculatedSolution xsol) throws IOException not implemented in C++

Performs integration on the base grid and its subgrids.

virtual void gridripper::amr1d::AMRCore::coarseStepped ( GReal_t  t  )  [protected, virtual]

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:46:48 2009 for GridRipper by  doxygen 1.5.6