#include <FuncInitCond.h>
Public Member Functions | |
int | init (tvalarray< tvector< Grid * > > &grids, PDE *pde, GReal_t dt, int r, int maxlevel, int bufzone, AMError *amerr, double maxerr) throw (InitCond::Exception&) |
Creates and initializes base grid and initial subgrids. | |
virtual GReal_t | getTime () const |
Gets the time parameter at the initialization. | |
int | getInterpolatedLevel () const |
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, const Parameters *p) throw (InitCond::Exception&) | |
Creates initial condition. | |
virtual void | init (PDE *pde, GReal_t x, FieldWrapper &phi)=0 throw (InitCond::Exception&) |
Initializes the grid at the specified point. | |
int | getMostRefinedGridMaxI () const |
Gets the most refined equivalent of the base grid size. | |
GReal_t | getMostRefinedGridDeltaX () const |
Gets the grid spacing of the most refined subgrids. | |
virtual bool | isNumericalConstraintSettingNeeded () const |
Tests whether the constraint condition is set numerically by the PDE. | |
void | setNumericalConstraintSettingNeeded (bool v) |
Enables or disables numerical constraint setting by the PDE. | |
virtual void | endInit () |
Called at the end of init. |
gridripper::amr1d::FuncInitCond::FuncInitCond | ( | string & | args, | |
const Parameters * | p | |||
) | throw (InitCond::Exception&) [protected] |
Creates initial condition.
args | the arguments | |
p | the parameters |
int gridripper::amr1d::FuncInitCond::init | ( | tvalarray< tvector< Grid * > > & | grids, | |
PDE * | pde, | |||
GReal_t | dt, | |||
int | r, | |||
int | maxlevel, | |||
int | bufzone, | |||
AMError * | amerr, | |||
double | maxerr | |||
) | throw (InitCond::Exception&) [virtual] |
Creates and initializes base grid and initial subgrids.
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 |
Implements gridripper::amr1d::InitCond.
virtual GReal_t gridripper::amr1d::FuncInitCond::getTime | ( | ) | const [inline, virtual] |
Gets the time parameter at the initialization.
The default implementation returns 0.
Implements gridripper::amr1d::InitCond.
Reimplemented in gridripper::amr1d::initcond::UserDef, gridripper::phys::gr::fixmp::kerrhiggs::Disk, gridripper::phys::gr::fixmp::kerrhiggs::Hunch, and gridripper::phys::gr::fixmp::higgsmp::Hunch.
int gridripper::amr1d::FuncInitCond::getInterpolatedLevel | ( | ) | const [inline] |
Gets the minimum refinement level where interpolation is used instead of the precise calculation of the initial state.
void gridripper::amr1d::FuncInitCond::setInterpolatedLevel | ( | int | l | ) |
Initial values are interpolated on the specified refinement level and finer levels.
l | the minimum refinement level where interpolation is used or zero to avoid interpolation |
virtual void gridripper::amr1d::FuncInitCond::init | ( | PDE * | pde, | |
GReal_t | x, | |||
FieldWrapper & | phi | |||
) | throw (InitCond::Exception&) [protected, pure virtual] |
Initializes the grid at the specified point.
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, gridripper::amr1d::initcond::Zero, gridripper::phys::gr::fixmp::kerrhiggs::Disk, gridripper::phys::gr::fixmp::kerrhiggs::Hunch, and gridripper::phys::gr::fixmp::higgsmp::Hunch.
int gridripper::amr1d::FuncInitCond::getMostRefinedGridMaxI | ( | ) | const [inline, protected] |
Gets the most refined equivalent of the base grid size.
GReal_t gridripper::amr1d::FuncInitCond::getMostRefinedGridDeltaX | ( | ) | const [inline, protected] |
Gets the grid spacing of the most refined subgrids.
virtual bool gridripper::amr1d::FuncInitCond::isNumericalConstraintSettingNeeded | ( | ) | const [inline, protected, virtual] |
Tests whether the constraint condition is set numerically by the PDE.
void gridripper::amr1d::FuncInitCond::setNumericalConstraintSettingNeeded | ( | bool | v | ) | [inline, protected] |
virtual void gridripper::amr1d::FuncInitCond::endInit | ( | ) | [inline, protected, virtual] |
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.