gridripper::amr1d::PDE Class Reference

Abstract base class of partial differential equations. More...

Inheritance diagram for gridripper::amr1d::PDE:

gridripper::phys::scalar::PeriodicKGEq

List of all members.

Public Member Functions

abstract double getMinX ()
 Gets the minimum x (space) coordinate for the simulation.
abstract double getMaxX ()
 Gets the maximum x (space) coordinate for the simulation.
abstract void evalConstrainedComponents (Grid g, int i, FieldWrapper fw)
 Evaluates constrained field components.
void setNonevolvingComponents (Grid g, Grad d)
 Sets nonevolving field components.
int getNumConstraintEqs ()
 Gets the number of constraint equations.
void evalConstraintEqs (Grid g, int i, double[] F, double[] lhs, double[] rhs)
 Evaluates the constraint equations.
final int doEval (double[] dF, double t, double[] F, double[] tmp, Grid g, int i, Grad d, double dt)
 PDE evaluation, called by the integrators.
abstract int eval (double[] dF, double t, double x, double[] F, double[] Fx, Grid g, int i, Grad d, double dt)
 Overridable PDE evaluation method.
boolean isScalable ()
 Tests whether this PDE is scalable.
double calcScaleFactor (Grid g)
 Calculates the best scale factor.
abstract FieldWrapper createField (int level)
PhysicalQuantity[] getPhysicalQuantities ()
double getPhysicalMinX ()
 Gets the minimum "physical" x coordinate.
double getPhysicalMaxX ()
 Gets the maximum "physical" x coordinate.
boolean isXPeriodic ()
 Tests whether the solution is periodic in x.
boolean canBeExtended (int where)
 Can the field be extended beyond the specified bound?
void mirrorLeft (double x, FieldWrapper f)
 Called by the default getExtendedField implementation for points beyond left edge.
void mirrorRight (double x, FieldWrapper f)
 Called by the default getExtendedField implementation for points beyond right edge.
void getExtendedField (Grid g, int i, FieldWrapper f)
 Gets the extended field value at the specified grid point.
boolean hasExtendedRefinedFieldData (Grid g, int i)
 Tests whether refined field data exists at a given point.
void getExtendedRefinedField (Grid g, int i, FieldWrapper f)
 Gets the extended field value at the specified refined grid point.
void getFieldWrapper (double t, double x, double[] f)
 Converts the physical field to the field used on the grid.
double[] getComponentSigmaArray ()
 Gets an array containing the relative magnitudes of the numerical dissipation term for each component.
final String getTimeLabel ()
 Gets the time coordinate label.
final String getTimeFormat ()
 Gets the time format string.
final String getTimeLabelFormat ()
 Gets the time coordinate label format string.
final String getXcoordLabel ()
 Gets the space coordinate label.
final int getNumComponents ()
 Gets the number of field components.
final int getNumIndependentComponents ()
 Gets the number of independent, non-constrained field components.
final String getComponentName (int k)
 Gets the name of a grid field component.
final int getComponentIndex (String name)
 Gets the index of a named grid field component.
final int getGridFunctionIndex (String name)
 Gets the index of a named grid function.
final String getConstraintName (int k)
 Gets the name of a constraint.
final String getPhysicalConstraintName (int k)
 Gets the "physical" name of a constraint.
final double constraintError (Grid g, int i)
final DensityQuantity energy ()
int getNumGridFunctions ()
 Gets the number of grid functions.
GridFunction getGridFunction (int i)
 Gets a grid function.
double calcBestDeltaT (Grid g, int i, double[] F, double dt0, double dt)
 Calculates the best time step value for the specified point.

Static Public Member Functions

static PDE create (String name, Parameters parameters) throws IllegalArgumentException

Public Attributes

final double EPSILON = 1e-14

Static Public Attributes

static final int LEFT = 1
static final int RIGHT = 2

Protected Member Functions

 PDE (int nindep, String[] compnames, String[] constrnames, String[] coordlabels)
final void setEnergy (DensityQuantity e)
final void addGridFunction (GridFunction f)
 Adds a grid function.

Classes

class  DensityQuantity
 Abstract base class of local density quantities. More...
class  FiniteIntegral
class  FiniteX0Integral
interface  LightRays
class  PhysicalQuantity
class  TimeIntegral
class  TotalIntegral
class  TotalX0Integral
class  X0Flow


Detailed Description

Abstract base class of partial differential equations.

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

Andras Laszlo


Member Function Documentation

abstract double gridripper::amr1d::PDE::getMinX (  )  [pure virtual]

Gets the minimum x (space) coordinate for the simulation.

Returns:
the minimum x coordinate

Implemented in gridripper::phys::scalar::PeriodicKGEq.

abstract double gridripper::amr1d::PDE::getMaxX (  )  [pure virtual]

Gets the maximum x (space) coordinate for the simulation.

Returns:
the maximum x coordinate

Implemented in gridripper::phys::scalar::PeriodicKGEq.

abstract void gridripper::amr1d::PDE::evalConstrainedComponents ( Grid  g,
int  i,
FieldWrapper  fw 
) [pure virtual]

Evaluates constrained field components.

Parameters:
g the grid
i the grid point index
fw field values in the grid point

Implemented in gridripper::phys::scalar::PeriodicKGEq.

void gridripper::amr1d::PDE::setNonevolvingComponents ( Grid  g,
Grad  d 
) [inline]

Sets nonevolving field components.

Called after the initial condition generation and after each time step. The default implementation does not do anything.

Parameters:
g the grid
d differentiation

int gridripper::amr1d::PDE::getNumConstraintEqs (  )  [inline]

Gets the number of constraint equations.

Constrained components are not counted here.

Returns:
the number of constraint equations or zero

void gridripper::amr1d::PDE::evalConstraintEqs ( Grid  g,
int  i,
double[]  F,
double[]  lhs,
double[]  rhs 
) [inline]

Evaluates the constraint equations.

Parameters:
g the grid
i the grid point index
F input field values in the grid point
lhs output left hand sides
rhs output right hand sides

final int gridripper::amr1d::PDE::doEval ( double[]  dF,
double  t,
double[]  F,
double[]  tmp,
Grid  g,
int  i,
Grad  d,
double  dt 
) [inline]

PDE evaluation, called by the integrators.

Parameters:
dF the result array, it will contain the dF/dt values
t the time
F the field
tmp an array of the same size as the field array
g the grid
i index of grid location
d the finite difference operator
dt time difference

abstract int gridripper::amr1d::PDE::eval ( double[]  dF,
double  t,
double  x,
double[]  F,
double[]  Fx,
Grid  g,
int  i,
Grad  d,
double  dt 
) [pure virtual]

Overridable PDE evaluation method.

Parameters:
dF the result array, it will contain the dF/dt values
t the time
x the space coordinate
F the field
Fx the space derivative of the field
g the grid
i index of grid location
d the finite difference operator
dt time difference

Implemented in gridripper::phys::scalar::PeriodicKGEq.

boolean gridripper::amr1d::PDE::isScalable (  )  [inline]

Tests whether this PDE is scalable.

Returns:
true if the PDE is scalable, false otherwise

double gridripper::amr1d::PDE::calcScaleFactor ( Grid  g  )  [inline]

Calculates the best scale factor.

The default implemention returns 1 without performing any operation.

Parameters:
g the base grid
Returns:
the scale factor

double gridripper::amr1d::PDE::getPhysicalMinX (  )  [inline]

Gets the minimum "physical" x coordinate.

A nonphysical domain is present if minX is less than physicalMinX.

Returns:
the minimum physical coordinate

double gridripper::amr1d::PDE::getPhysicalMaxX (  )  [inline]

Gets the maximum "physical" x coordinate.

A nonphysical domain is present if maxX is greater than physicalMaxX.

Returns:
the maximum physical coordinate

boolean gridripper::amr1d::PDE::isXPeriodic (  )  [inline]

Tests whether the solution is periodic in x.

Returns:
true if the minimum and maximum x coordinates are equivalent, false otherwise

Reimplemented in gridripper::phys::scalar::PeriodicKGEq.

boolean gridripper::amr1d::PDE::canBeExtended ( int  where  )  [inline]

Can the field be extended beyond the specified bound?

Parameters:
where the bound

void gridripper::amr1d::PDE::mirrorLeft ( double  x,
FieldWrapper  f 
) [inline]

Called by the default getExtendedField implementation for points beyond left edge.

Right mirroring is not available by default, this method should not be called without overriding it.

Parameters:
x the x coordinate
f put the field values here

void gridripper::amr1d::PDE::mirrorRight ( double  x,
FieldWrapper  f 
) [inline]

Called by the default getExtendedField implementation for points beyond right edge.

Parameters:
x the x coordinate
f put the field values here

void gridripper::amr1d::PDE::getExtendedField ( Grid  g,
int  i,
FieldWrapper  f 
) [inline]

Gets the extended field value at the specified grid point.

Parameters:
g the grid
i grid point index
v put the field values into this array

boolean gridripper::amr1d::PDE::hasExtendedRefinedFieldData ( Grid  g,
int  i 
) [inline]

Tests whether refined field data exists at a given point.

Parameters:
g the grid
i refined grid point index
Returns:
true if the specified point contains refined field data, false otherwise

void gridripper::amr1d::PDE::getExtendedRefinedField ( Grid  g,
int  i,
FieldWrapper  f 
) [inline]

Gets the extended field value at the specified refined grid point.

Parameters:
g the grid
i refined grid point index
v put the field values here

void gridripper::amr1d::PDE::getFieldWrapper ( double  t,
double  x,
double[]  f 
) [inline]

Converts the physical field to the field used on the grid.

Parameters:
t the time coordinate
x the space coordinate
f the field components (input: physical field values, output: values on the grid)
Returns:
the magnitude

double [] gridripper::amr1d::PDE::getComponentSigmaArray (  )  [inline]

Gets an array containing the relative magnitudes of the numerical dissipation term for each component.

The sigma factor is multiplied by the array elements.

In the default implementation, all elements of the return array are equal to 1. For performance reasons, overriding implementations should return an array allocated and filled in the constructor.

Parameters:
k the component index
Returns:
array containing the relative magnitudes of the numerical dissipation

final String gridripper::amr1d::PDE::getTimeLabel (  )  [inline]

Gets the time coordinate label.

Returns:
the time coordinate label

final String gridripper::amr1d::PDE::getTimeFormat (  )  [inline]

Gets the time format string.

Returns:
the format string

final String gridripper::amr1d::PDE::getTimeLabelFormat (  )  [inline]

Gets the time coordinate label format string.

Returns:
the format string

final String gridripper::amr1d::PDE::getXcoordLabel (  )  [inline]

Gets the space coordinate label.

Returns:
the space coordinate label

final int gridripper::amr1d::PDE::getNumComponents (  )  [inline]

Gets the number of field components.

Returns:
the number of components.

final int gridripper::amr1d::PDE::getNumIndependentComponents (  )  [inline]

Gets the number of independent, non-constrained field components.

Returns:
the number of independent components.

final String gridripper::amr1d::PDE::getComponentName ( int  k  )  [inline]

Gets the name of a grid field component.

Parameters:
k the component index
Returns:
the name

final int gridripper::amr1d::PDE::getComponentIndex ( String  name  )  [inline]

Gets the index of a named grid field component.

Parameters:
k the component name
Returns:
the index or -1

final int gridripper::amr1d::PDE::getGridFunctionIndex ( String  name  )  [inline]

Gets the index of a named grid function.

Parameters:
k the function name
Returns:
the index or -1

final String gridripper::amr1d::PDE::getConstraintName ( int  k  )  [inline]

Gets the name of a constraint.

Parameters:
k the constraint index
Returns:
the name

final String gridripper::amr1d::PDE::getPhysicalConstraintName ( int  k  )  [inline]

Gets the "physical" name of a constraint.

Parameters:
k the constraint index
Returns:
the name

int gridripper::amr1d::PDE::getNumGridFunctions (  )  [inline]

Gets the number of grid functions.

Returns:
the number of grid functions

GridFunction gridripper::amr1d::PDE::getGridFunction ( int  i  )  [inline]

Gets a grid function.

Parameters:
i the index
Returns:
the grid functions

final void gridripper::amr1d::PDE::addGridFunction ( GridFunction  f  )  [inline, protected]

Adds a grid function.

Parameters:
f the grid function

double gridripper::amr1d::PDE::calcBestDeltaT ( Grid  g,
int  i,
double[]  F,
double  dt0,
double  dt 
) [inline]

Calculates the best time step value for the specified point.

Parameters:
g the grid
i grid point index
F field values in that point
dt0 default time step
dt0 previous time step
Returns:
the best time step (default implementation returns dt)


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