// FILE DemoVDP2.cc #include "VNODE.h" #include "VDP.h" int main() { // Initialize VNODE. VnodeInit(); // Create the ODE problem and the data representation object and // load the problem parameters. PtrODENumeric ODE = new VDP; PtrDataRepr DataRepr = new TAYLOR_EXPANSION; ODE->LoadProblemParam(2); int order = 15; double h = 0.1; // Create methods for order control, stepsize control, validating // existence and uniqueness and computing tight bounds on the // solution. PtrOrderCtrl OrderCtrl = new CONST_ORDER(order); PtrStepCtrl StepCtrl = new CONST_STEP(h); PtrInitEncl InitEncl = new HOE; PtrTightEncl TightEncl = new ITS_QR; // Create a solver. PtrVODESolver Solver = new VODE_SOLVER( ODE, DataRepr, OrderCtrl, StepCtrl, InitEncl, TightEncl ); cout << endl << "*** Integrating " << ODE->GetName() << endl; cout << endl << "*** With the " << Solver->GetTightEncl()->GetName() << endl; Solver -> Integrate(); // Replace the ITS_QR method with the IHO method. Solver->SetTightEncl( new IHO( (order-1)/2, (order-1)/2 ) ); cout << endl << "*** With the " << Solver->GetTightEncl()->GetName() << endl; Solver -> Integrate(); }