| 46 | \*---------------------------------------------------------------------------*/ |
| 47 | |
| 48 | class adaptiveSolver |
| 49 | { |
| 50 | // Private data |
| 51 | |
| 52 | //- Step-size adjustment controls |
| 53 | scalar safeScale_, alphaInc_, alphaDec_, minScale_, maxScale_; |
| 54 | |
| 55 | //- Cache for dydx at the initial time |
| 56 | mutable scalarField dydx0_; |
| 57 | |
| 58 | //- Temprorary for the test-step solution |
| 59 | mutable scalarField yTemp_; |
| 60 | |
| 61 | |
| 62 | public: |
| 63 | |
| 64 | // Constructors |
| 65 | |
| 66 | //- Construct from ODESystem |
| 67 | adaptiveSolver(const ODESystem& ode, const dictionary& dict); |
| 68 | |
| 69 | |
| 70 | //- Destructor |
| 71 | virtual ~adaptiveSolver() |
| 72 | {} |
| 73 | |
| 74 | |
| 75 | // Member Functions |
| 76 | |
| 77 | //- Resize the ODE solver |
| 78 | bool resize(const label n); |
| 79 | |
| 80 | //- Solve a single step dx and return the error |
| 81 | virtual scalar solve |
| 82 | ( |
| 83 | const scalar x0, |
| 84 | const scalarField& y0, |
| 85 | const scalarField& dydx0, |
| 86 | const scalar dx, |
| 87 | scalarField& y |
| 88 | ) const = 0; |
| 89 | |
| 90 | //- Solve the ODE system and the update the state |
| 91 | void solve |
| 92 | ( |
| 93 | const ODESystem& ode, |
| 94 | scalar& x, |
| 95 | scalarField& y, |
| 96 | scalar& dxTry |
| 97 | ) const; |
| 98 | }; |
| 99 | |
| 100 | |
| 101 | // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // |
no outgoing calls
no test coverage detected