Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes
seulex Class Reference

An extrapolation-algorithm, based on the linearly implicit Euler method with step size control and order selection. More...

Inheritance diagram for seulex:
Inheritance graph
[legend]
Collaboration diagram for seulex:
Collaboration graph
[legend]

Public Member Functions

 TypeName ("seulex")
 Runtime type information. More...
 
 seulex (const ODESystem &ode, const dictionary &dict)
 Construct from ODE. More...
 
void solve (scalar &x, scalarField &y, stepState &step) const
 Solve the ODE system and the update the state. More...
 
- Public Member Functions inherited from ODESolver
 TypeName ("ODESolver")
 Runtime type information. More...
 
 declareRunTimeSelectionTable (autoPtr, ODESolver, dictionary,(const ODESystem &ode, const dictionary &dict),(ode, dict))
 
 ODESolver (const ODESystem &ode, const dictionary &dict)
 Construct for given ODESystem. More...
 
 ODESolver (const ODESystem &ode, const scalarField &absTol, const scalarField &relTol)
 Construct for given ODESystem specifying tolerances. More...
 
virtual ~ODESolver ()
 Destructor. More...
 
scalarFieldabsTol ()
 
scalarFieldrelTol ()
 
virtual void solve (scalar &x, scalarField &y, scalar &dxTry) const
 Solve the ODE system as far as possible upto dxTry. More...
 
virtual void solve (const scalar xStart, const scalar xEnd, scalarField &y, scalar &dxEst) const
 Solve the ODE system from xStart to xEnd, update the state. More...
 

Private Member Functions

bool seul (const scalar x0, const scalarField &y0, const scalar dxTot, const label k, scalarField &y, const scalarField &scale) const
 Computes the j-th line of the extrapolation table. More...
 
void extrapolate (const label k, scalarRectangularMatrix &table, scalarField &y) const
 Polynomial extrpolation. More...
 

Private Attributes

scalar jacRedo_
 
labelField nSeq_
 
scalarField cpu_
 
scalarSquareMatrix coeff_
 
scalar theta_
 
label kTarg_
 
scalarRectangularMatrix table_
 
scalarField dfdx_
 
scalarSquareMatrix dfdy_
 
scalarSquareMatrix a_
 
labelList pivotIndices_
 
scalarField dxOpt_
 
scalarField temp_
 
scalarField y0_
 
scalarField ySequence_
 
scalarField scale_
 
scalarField dy_
 
scalarField yTemp_
 
scalarField dydx_
 

Static Private Attributes

static const label kMaxx_ = 12
 
static const label iMaxx_ = kMaxx_ + 1
 
static const scalar stepFactor1_ = 0.6
 
static const scalar stepFactor2_ = 0.93
 
static const scalar stepFactor3_ = 0.1
 
static const scalar stepFactor4_ = 4.0
 
static const scalar stepFactor5_ = 0.5
 
static const scalar kFactor1_ = 0.7
 
static const scalar kFactor2_ = 0.9
 

Additional Inherited Members

- Static Public Member Functions inherited from ODESolver
static autoPtr< ODESolverNew (const ODESystem &ode, const dictionary &dict)
 Select null constructed. More...
 
- Protected Member Functions inherited from ODESolver
scalar normalizeError (const scalarField &y0, const scalarField &y, const scalarField &err) const
 Return the nomalized scalar error. More...
 
 ODESolver (const ODESolver &)
 Disallow default bitwise copy construct. More...
 
void operator= (const ODESolver &)
 Disallow default bitwise assignment. More...
 
- Protected Attributes inherited from ODESolver
const ODESystemodes_
 Reference to ODESystem. More...
 
label n_
 Size of the ODESystem. More...
 
scalarField absTol_
 Absolute convergence tolerance per step. More...
 
scalarField relTol_
 Relative convergence tolerance per step. More...
 
label maxSteps_
 The maximum number of sub-steps allowed for the integration step. More...
 

Detailed Description

An extrapolation-algorithm, based on the linearly implicit Euler method with step size control and order selection.

The implementation is based on the SEULEX algorithm in

    "Solving Ordinary Differential Equations II: Stiff
     and Differential-Algebraic Problems, second edition",
    Hairer, E.,
    Nørsett, S.,
    Wanner, G.,
    Springer-Verlag, Berlin. 1996.
Source files

Definition at line 61 of file seulex.H.

Constructor & Destructor Documentation

◆ seulex()

seulex ( const ODESystem ode,
const dictionary dict 
)

Construct from ODE.

Definition at line 50 of file seulex.C.

References seulex::coeff_, seulex::cpu_, seulex::iMaxx_, k, seulex::kMaxx_, and seulex::nSeq_.

Member Function Documentation

◆ seul()

bool seul ( const scalar  x0,
const scalarField y0,
const scalar  dxTot,
const label  k,
scalarField y,
const scalarField scale 
) const
private

Computes the j-th line of the extrapolation table.

Definition at line 104 of file seulex.C.

References k, Foam::LUBacksubstitute(), Foam::LUDecompose(), Foam::min(), Foam::sqr(), Foam::sqrt(), y, and Foam::y0().

Here is the call graph for this function:

◆ extrapolate()

void extrapolate ( const label  k,
scalarRectangularMatrix table,
scalarField y 
) const
private

Polynomial extrpolation.

Definition at line 184 of file seulex.C.

References k, and y.

◆ TypeName()

TypeName ( "seulex"  )

Runtime type information.

◆ solve()

void solve ( scalar &  x,
scalarField y,
stepState step 
) const
virtual

Field Documentation

◆ kMaxx_

const label kMaxx_ = 12
staticprivate

Definition at line 69 of file seulex.H.

Referenced by seulex::seulex().

◆ iMaxx_

const label iMaxx_ = kMaxx_ + 1
staticprivate

Definition at line 70 of file seulex.H.

Referenced by seulex::seulex().

◆ stepFactor1_

const scalar stepFactor1_ = 0.6
staticprivate

Definition at line 73 of file seulex.H.

◆ stepFactor2_

const scalar stepFactor2_ = 0.93
staticprivate

Definition at line 73 of file seulex.H.

◆ stepFactor3_

const scalar stepFactor3_ = 0.1
staticprivate

Definition at line 73 of file seulex.H.

◆ stepFactor4_

const scalar stepFactor4_ = 4.0
staticprivate

Definition at line 74 of file seulex.H.

◆ stepFactor5_

const scalar stepFactor5_ = 0.5
staticprivate

Definition at line 74 of file seulex.H.

◆ kFactor1_

const scalar kFactor1_ = 0.7
staticprivate

Definition at line 75 of file seulex.H.

◆ kFactor2_

const scalar kFactor2_ = 0.9
staticprivate

Definition at line 75 of file seulex.H.

◆ jacRedo_

scalar jacRedo_
private

Definition at line 79 of file seulex.H.

◆ nSeq_

labelField nSeq_
private

Definition at line 80 of file seulex.H.

Referenced by seulex::seulex().

◆ cpu_

scalarField cpu_
private

Definition at line 81 of file seulex.H.

Referenced by seulex::seulex().

◆ coeff_

scalarSquareMatrix coeff_
private

Definition at line 82 of file seulex.H.

Referenced by seulex::seulex().

◆ theta_

scalar theta_
mutableprivate

Definition at line 88 of file seulex.H.

◆ kTarg_

label kTarg_
mutableprivate

Definition at line 89 of file seulex.H.

◆ table_

scalarRectangularMatrix table_
mutableprivate

Definition at line 90 of file seulex.H.

◆ dfdx_

scalarField dfdx_
mutableprivate

Definition at line 92 of file seulex.H.

◆ dfdy_

scalarSquareMatrix dfdy_
mutableprivate

Definition at line 93 of file seulex.H.

◆ a_

scalarSquareMatrix a_
mutableprivate

Definition at line 94 of file seulex.H.

◆ pivotIndices_

labelList pivotIndices_
mutableprivate

Definition at line 95 of file seulex.H.

◆ dxOpt_

scalarField dxOpt_
mutableprivate

Definition at line 98 of file seulex.H.

◆ temp_

scalarField temp_
private

Definition at line 98 of file seulex.H.

◆ y0_

scalarField y0_
mutableprivate

Definition at line 99 of file seulex.H.

◆ ySequence_

scalarField ySequence_
private

Definition at line 99 of file seulex.H.

◆ scale_

scalarField scale_
private

Definition at line 99 of file seulex.H.

◆ dy_

scalarField dy_
mutableprivate

Definition at line 102 of file seulex.H.

◆ yTemp_

scalarField yTemp_
private

Definition at line 102 of file seulex.H.

◆ dydx_

scalarField dydx_
private

Definition at line 102 of file seulex.H.


The documentation for this class was generated from the following files: