Public Member Functions | |
| boolean | isNumericalConstraintSettingPassedToPDE () |
| Tests whether the constrained components should be set numerically later by PDE.initConstraints. | |
| boolean | isConstrainedInInit () |
| Tests whether the initial state is already constrained. | |
| void | constrain (double[] mesh) |
| Constrain the field to the hypersurface of constraint conditions. | |
| abstract void | eval (double[] f, int offset, double x, double[] df) |
| Evaluates the ODE. | |
| int | getMatrixFieldOrder (int i) |
| boolean | hasExactSolution () |
| void | getExactSolution (double[] F, double x) |
| abstract double | getMinX () |
| Gets the minimum x coordinate. | |
| abstract double | getMaxX () |
| Gets the maximum x coordinate. | |
| boolean | isValid (double[] F, double x) |
| Tests whether the differential equation is still valid for describing the system. | |
| boolean | dRHS (double[] f, int offset, double x, double[] drhs) |
| Calculates the derivative matrix of the RHS of the field equation vector. | |
| double[] | getInitialValuesForRelaxation (int nx) |
| Gets the initial field values for the relaxation method. | |
| double[] | getInitialX () |
| Gets the initial x coordinate(s) for a shooting method. | |
| FieldWrapper[] | getInitialValuesForShooting () |
| Gets the initial field values for a shooting method. | |
| double | averageShootingResults (int np, int ip, double x, int ic, double f0, double f1) |
| Averages solutions from two shooting method results. | |
| void | getPhysicalField (double x, double[] f) |
| Gets the physical field components. | |
| final PDE | getPDE () |
| Gets the PDE. | |
| final InitCond | getPDEInitCond () |
| Gets the initial condition for the PDE. | |
| final void | setPDE (PDE pde, InitCond init) |
| Sets the PDE and its initial condition. | |
| void | initPDE (double x, double[] fode, FieldWrapper fw) |
| Sets boundary conditions for a PDE to be the solution of this ODE. | |
| void | initPDE (double x, double[] fode, FieldWrapper fpde, double[] data) |
| Sets boundary conditions for a PDE to be the solution of this ODE. | |
| final int | getNumComponents () |
| Gets the number of field components. | |
| final String | getComponentName (int k) |
| Gets the name of a component. | |
Static Public Member Functions | |
| static ODE | create (String str, Parameters p) throws IllegalArgumentException |
| Creates an ODE. | |
Protected Member Functions | |
| ODE (String[] compnames) | |
| Constructs the ODE. | |
| void | log (String s) |
| Print logging info on stderr. | |
| gridripper::odesolver::ODE::ODE | ( | String[] | compnames | ) | [inline, protected] |
| boolean gridripper::odesolver::ODE::isNumericalConstraintSettingPassedToPDE | ( | ) | [inline] |
Tests whether the constrained components should be set numerically later by PDE.initConstraints.
| boolean gridripper::odesolver::ODE::isConstrainedInInit | ( | ) | [inline] |
Tests whether the initial state is already constrained.
true if the initial state is constrained, false if constrain must be called | void gridripper::odesolver::ODE::constrain | ( | double[] | mesh | ) | [inline] |
Constrain the field to the hypersurface of constraint conditions.
The default implementation does not perform any operation.
| mesh | the mesh containing the field values |
| abstract void gridripper::odesolver::ODE::eval | ( | double[] | f, | |
| int | offset, | |||
| double | x, | |||
| double[] | df | |||
| ) | [pure virtual] |
Evaluates the ODE.
| f | vector of field values | |
| offset | offset in field vector | |
| x | the x coordinate | |
| df | output vector for the derivatives |
| abstract double gridripper::odesolver::ODE::getMinX | ( | ) | [pure virtual] |
Gets the minimum x coordinate.
| abstract double gridripper::odesolver::ODE::getMaxX | ( | ) | [pure virtual] |
Gets the maximum x coordinate.
| boolean gridripper::odesolver::ODE::isValid | ( | double[] | F, | |
| double | x | |||
| ) | [inline] |
Tests whether the differential equation is still valid for describing the system.
Shooting method stops immediately when the ODE becomes invalid.
| F | the field values | |
| x | the space coordinate |
| boolean gridripper::odesolver::ODE::dRHS | ( | double[] | f, | |
| int | offset, | |||
| double | x, | |||
| double[] | drhs | |||
| ) | [inline] |
Calculates the derivative matrix of the RHS of the field equation vector.
This method is used by the relaxation method. However, its implementation is not obligatory: if exact derivates are not available, then finite differences are calculated numerically by the relaxation algorithm.
| f | n*nc element vector containing the field components | |
| offset | index of the first field component in the vector | |
| x | the space coordinate | |
| drhs | nc*nc output array, it will contain the derivative matrix |
true if the derivatives were calculated, false if they are not available (default) | double [] gridripper::odesolver::ODE::getInitialValuesForRelaxation | ( | int | nx | ) | [inline] |
Gets the initial field values for the relaxation method.
| nx | the grid size (number of subdivisions) |
| double [] gridripper::odesolver::ODE::getInitialX | ( | ) | [inline] |
Gets the initial x coordinate(s) for a shooting method.
| FieldWrapper [] gridripper::odesolver::ODE::getInitialValuesForShooting | ( | ) | [inline] |
Gets the initial field values for a shooting method.
| double gridripper::odesolver::ODE::averageShootingResults | ( | int | np, | |
| int | ip, | |||
| double | x, | |||
| int | ic, | |||
| double | f0, | |||
| double | f1 | |||
| ) | [inline] |
Averages solutions from two shooting method results.
The default implementation returns the arithmetic mean (f0+f1)/2.
| np | the grid size (number of subdivisions) | |
| ip | grid point index | |
| x | grid point x coordinate | |
| ic | field component index | |
| f0 | field value from the first shooting result | |
| f1 | field value from the second shooting result |
| void gridripper::odesolver::ODE::getPhysicalField | ( | double | x, | |
| double[] | f | |||
| ) | [inline] |
Gets the physical field components.
| x | the coordinate | |
| f | the field components (input: values on the grid, output: physical values) |
| final PDE gridripper::odesolver::ODE::getPDE | ( | ) | [inline] |
Gets the PDE.
null if there is no PDE | final InitCond gridripper::odesolver::ODE::getPDEInitCond | ( | ) | [inline] |
Gets the initial condition for the PDE.
null if there is no PDE Sets the PDE and its initial condition.
Useful to avoid code duplication; common methods should be implemented in the PDE.
| pde | the PDE | |
| init | the initial condition object |
| void gridripper::odesolver::ODE::initPDE | ( | double | x, | |
| double[] | fode, | |||
| FieldWrapper | fw | |||
| ) | [inline] |
| void gridripper::odesolver::ODE::initPDE | ( | double | x, | |
| double[] | fode, | |||
| FieldWrapper | fpde, | |||
| double[] | data | |||
| ) | [inline] |
| final int gridripper::odesolver::ODE::getNumComponents | ( | ) | [inline] |
Gets the number of field components.
| final String gridripper::odesolver::ODE::getComponentName | ( | int | k | ) | [inline] |
Gets the name of a component.
| k | the component index |
| static ODE gridripper::odesolver::ODE::create | ( | String | str, | |
| Parameters | p | |||
| ) | throws IllegalArgumentException [inline, static] |
1.5.6