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 |
abstract double gridripper::amr1d::PDE::getMinX | ( | ) | [pure virtual] |
Gets the minimum x (space) coordinate for the simulation.
Implemented in gridripper::phys::scalar::PeriodicKGEq.
abstract double gridripper::amr1d::PDE::getMaxX | ( | ) | [pure virtual] |
Gets the maximum x (space) coordinate for the simulation.
Implemented in gridripper::phys::scalar::PeriodicKGEq.
abstract void gridripper::amr1d::PDE::evalConstrainedComponents | ( | Grid | g, | |
int | i, | |||
FieldWrapper | fw | |||
) | [pure virtual] |
Evaluates constrained field components.
g | the grid | |
i | the grid point index | |
fw | field values in the grid point |
Implemented in gridripper::phys::scalar::PeriodicKGEq.
Sets nonevolving field components.
Called after the initial condition generation and after each time step. The default implementation does not do anything.
g | the grid | |
d | differentiation |
int gridripper::amr1d::PDE::getNumConstraintEqs | ( | ) | [inline] |
Gets the number of constraint equations.
Constrained components are not counted here.
void gridripper::amr1d::PDE::evalConstraintEqs | ( | Grid | g, | |
int | i, | |||
double[] | F, | |||
double[] | lhs, | |||
double[] | rhs | |||
) | [inline] |
Evaluates the constraint equations.
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.
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.
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] |
double gridripper::amr1d::PDE::calcScaleFactor | ( | Grid | g | ) | [inline] |
Calculates the best scale factor.
The default implemention returns 1 without performing any operation.
g | the base grid |
double gridripper::amr1d::PDE::getPhysicalMinX | ( | ) | [inline] |
Gets the minimum "physical" x coordinate.
A nonphysical domain is present if minX is less than physicalMinX.
double gridripper::amr1d::PDE::getPhysicalMaxX | ( | ) | [inline] |
Gets the maximum "physical" x coordinate.
A nonphysical domain is present if maxX is greater than physicalMaxX.
boolean gridripper::amr1d::PDE::isXPeriodic | ( | ) | [inline] |
Tests whether the solution is periodic in x.
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?
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.
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.
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.
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.
g | the grid | |
i | refined grid point index |
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.
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.
t | the time coordinate | |
x | the space coordinate | |
f | the field components (input: physical field values, output: values on the grid) |
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.
k | the component index |
final String gridripper::amr1d::PDE::getTimeLabel | ( | ) | [inline] |
Gets the time coordinate label.
final String gridripper::amr1d::PDE::getTimeFormat | ( | ) | [inline] |
Gets the time format string.
final String gridripper::amr1d::PDE::getTimeLabelFormat | ( | ) | [inline] |
Gets the time coordinate label format string.
final String gridripper::amr1d::PDE::getXcoordLabel | ( | ) | [inline] |
Gets the space coordinate label.
final int gridripper::amr1d::PDE::getNumComponents | ( | ) | [inline] |
Gets the number of field components.
final int gridripper::amr1d::PDE::getNumIndependentComponents | ( | ) | [inline] |
Gets the number of independent, non-constrained field components.
final String gridripper::amr1d::PDE::getComponentName | ( | int | k | ) | [inline] |
Gets the name of a grid field component.
k | the component index |
final int gridripper::amr1d::PDE::getComponentIndex | ( | String | name | ) | [inline] |
Gets the index of a named grid field component.
k | the component name |
final int gridripper::amr1d::PDE::getGridFunctionIndex | ( | String | name | ) | [inline] |
Gets the index of a named grid function.
k | the function name |
final String gridripper::amr1d::PDE::getConstraintName | ( | int | k | ) | [inline] |
Gets the name of a constraint.
k | the constraint index |
final String gridripper::amr1d::PDE::getPhysicalConstraintName | ( | int | k | ) | [inline] |
Gets the "physical" name of a constraint.
k | the constraint index |
int gridripper::amr1d::PDE::getNumGridFunctions | ( | ) | [inline] |
Gets the number of grid functions.
GridFunction gridripper::amr1d::PDE::getGridFunction | ( | int | i | ) | [inline] |
Gets a grid function.
i | the index |
final void gridripper::amr1d::PDE::addGridFunction | ( | GridFunction | f | ) | [inline, protected] |
Adds a grid function.
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.
g | the grid | |
i | grid point index | |
F | field values in that point | |
dt0 | default time step | |
dt0 | previous time step |