The Conley-Morse Graphs Software
Public Member Functions | Private Member Functions | Private Attributes | List of all members
OdeIntegrParam Class Reference

A class whose objects are responsible for adjusting the integration parameters such as step size and the number of steps for an ODE. More...

#include <odeintegr.h>

Public Member Functions

 OdeIntegrParam (int order, double step, int n)
 The constructor which takes the suggested values for the order of the method, the step size, and the number of steps. More...
 
 ~OdeIntegrParam ()
 The destructor. More...
 
void setParam (const double *left, const double *right, int n)
 Sets the parameters to the given intervals defined by their left and right coordinates. More...
 
void get (int &order, double &step, int &n, int subdiv)
 Provides recommended values for integration: the order of the Taylor method, the size of the integration step, and the number of steps. More...
 
bool adjust (bool successful, int subdiv)
 Adjusts parameters if necessary after a successful computation or after an unsuccessful computation of the graph of the map at a specific subdivision depth. More...
 
std::string getInfo () const
 Returns a line (or lines) with a summary of information about the knowledge gathered through the "adjust" function, for later use. More...
 
void useInfo (const std::string &info)
 Analyzes a previously saved line with a summary of information and adjusts the data accordingly. More...
 
void saveData (chomp::multiwork::mwData &data) const
 Saves the data for serialization. More...
 
void loadData (chomp::multiwork::mwData &data)
 Retrieves a serialized object. More...
 

Private Member Functions

 OdeIntegrParam (const OdeIntegrParam &)
 The copy constructor should not be used. More...
 
OdeIntegrParamoperator= (const OdeIntegrParam &)
 The assignment operator should not be used. More...
 
void extendVectors (int subdiv)
 Extends the internal arrays to make sure that the entries for the given subdivision depth are valid. More...
 

Private Attributes

MapParam param
 The parameters of the map. More...
 
std::vector< double > stepSizes
 Step sizes at subsequent subdivision depths. More...
 
std::vector< int > strategy
 Strategy for trying another step size at each subdivision depth. More...
 
int defaultOrder
 The order of the Taylor method suggested to use. More...
 
double defaultStepSize
 The size of the step suggested for itegrating the flow. More...
 
int defaultNumberOfSteps
 The number of steps suggested to use. More...
 
bool usingPrevious
 Was this information set up based on previous results? More...
 
bool changed
 Were the parameters changed, so that it is worth to share them? More...
 

Detailed Description

A class whose objects are responsible for adjusting the integration parameters such as step size and the number of steps for an ODE.

Definition at line 61 of file odeintegr.h.

Constructor & Destructor Documentation

◆ OdeIntegrParam() [1/2]

OdeIntegrParam::OdeIntegrParam ( int  order,
double  step,
int  n 
)
inline

The constructor which takes the suggested values for the order of the method, the step size, and the number of steps.

Definition at line 146 of file odeintegr.h.

◆ ~OdeIntegrParam()

OdeIntegrParam::~OdeIntegrParam ( )
inline

The destructor.

Definition at line 154 of file odeintegr.h.

◆ OdeIntegrParam() [2/2]

OdeIntegrParam::OdeIntegrParam ( const OdeIntegrParam )
inlineprivate

The copy constructor should not be used.

Definition at line 159 of file odeintegr.h.

Member Function Documentation

◆ adjust()

bool OdeIntegrParam::adjust ( bool  successful,
int  subdiv 
)
inline

Adjusts parameters if necessary after a successful computation or after an unsuccessful computation of the graph of the map at a specific subdivision depth.

Returns true iff it is necessary to repeat the computation.

Definition at line 206 of file odeintegr.h.

References changed, extendVectors(), stepSizes, and strategy.

◆ extendVectors()

void OdeIntegrParam::extendVectors ( int  subdiv)
inlineprivate

Extends the internal arrays to make sure that the entries for the given subdivision depth are valid.

Definition at line 250 of file odeintegr.h.

References changed, defaultStepSize, custom::difference::finalDepth, custom::difference::initialDepth, stepSizes, and strategy.

Referenced by adjust(), and get().

◆ get()

void OdeIntegrParam::get ( int &  order,
double &  step,
int &  n,
int  subdiv 
)
inline

Provides recommended values for integration: the order of the Taylor method, the size of the integration step, and the number of steps.

Definition at line 178 of file odeintegr.h.

References defaultNumberOfSteps, defaultOrder, extendVectors(), and stepSizes.

Referenced by useInfo().

◆ getInfo()

std::string OdeIntegrParam::getInfo ( ) const
inline

Returns a line (or lines) with a summary of information about the knowledge gathered through the "adjust" function, for later use.

Definition at line 281 of file odeintegr.h.

References changed, data2text(), param, stepSizes, and usingPrevious.

◆ loadData()

void OdeIntegrParam::loadData ( chomp::multiwork::mwData &  data)
inline

Retrieves a serialized object.

Definition at line 391 of file odeintegr.h.

References stepSizes, and strategy.

◆ operator=()

OdeIntegrParam & OdeIntegrParam::operator= ( const OdeIntegrParam )
inlineprivate

The assignment operator should not be used.

Definition at line 165 of file odeintegr.h.

◆ saveData()

void OdeIntegrParam::saveData ( chomp::multiwork::mwData &  data) const
inline

Saves the data for serialization.

Definition at line 383 of file odeintegr.h.

References stepSizes, and strategy.

◆ setParam()

void OdeIntegrParam::setParam ( const double *  left,
const double *  right,
int  n 
)
inline

Sets the parameters to the given intervals defined by their left and right coordinates.

Definition at line 171 of file odeintegr.h.

References param.

◆ useInfo()

void OdeIntegrParam::useInfo ( const std::string &  info)
inline

Analyzes a previously saved line with a summary of information and adjusts the data accordingly.

Definition at line 324 of file odeintegr.h.

References get(), intersect(), param, shareInteriors(), stepSizes, strategy, text2data(), and usingPrevious.

Member Data Documentation

◆ changed

bool OdeIntegrParam::changed
private

Were the parameters changed, so that it is worth to share them?

Definition at line 140 of file odeintegr.h.

Referenced by adjust(), extendVectors(), and getInfo().

◆ defaultNumberOfSteps

int OdeIntegrParam::defaultNumberOfSteps
private

The number of steps suggested to use.

Definition at line 134 of file odeintegr.h.

Referenced by get().

◆ defaultOrder

int OdeIntegrParam::defaultOrder
private

The order of the Taylor method suggested to use.

Definition at line 128 of file odeintegr.h.

Referenced by get().

◆ defaultStepSize

double OdeIntegrParam::defaultStepSize
private

The size of the step suggested for itegrating the flow.

Definition at line 131 of file odeintegr.h.

Referenced by extendVectors().

◆ param

MapParam OdeIntegrParam::param
private

The parameters of the map.

Definition at line 109 of file odeintegr.h.

Referenced by getInfo(), setParam(), and useInfo().

◆ stepSizes

std::vector<double> OdeIntegrParam::stepSizes
private

Step sizes at subsequent subdivision depths.

Definition at line 112 of file odeintegr.h.

Referenced by adjust(), extendVectors(), get(), getInfo(), loadData(), saveData(), and useInfo().

◆ strategy

std::vector<int> OdeIntegrParam::strategy
private

Strategy for trying another step size at each subdivision depth.

0 = increase if successful (no attempt has yet been made); 1 = increase if successful (previous attempt was successful); 2 = an unsuccessful attempt encountered, don't try anything else if successful, decrease if unsuccessful; 3 = don't increase even if successful, it is known that this is a good guess already.

Definition at line 121 of file odeintegr.h.

Referenced by adjust(), extendVectors(), loadData(), saveData(), and useInfo().

◆ usingPrevious

bool OdeIntegrParam::usingPrevious
private

Was this information set up based on previous results?

Definition at line 137 of file odeintegr.h.

Referenced by getInfo(), and useInfo().


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