|
MULTIBODY SIMULATION SOFTWARE - API documentation |
#include <CHhistory.h>

Public Member Functions | |
| ChHistory (int nvars, int nsteps) | |
| void | Copy (ChHistory *source) |
| void | Setup (int newvars, int newsteps) |
| void | Restart () |
| int | Get_arr_offset (int i) |
| ChMatrix * | Get_Y (int i) |
| double | Get_Ytime (int i) |
| void | Set_Ytime (int i, double newtime) |
| void | ForwardStep () |
| void | BackwardStep () |
| void | ProceedStep (double m_dt) |
| double | Get_now_time () |
| void | Set_now_time (double m_time) |
| ChMatrix * | Get_Y () |
| ChMatrix * | Get_Ynew () |
| int | GetNsequenced (double maxstep) |
| void | PredictYnew (int order, double m_dt) |
| void | PredictY (int order, double m_dt, ChMatrix<> *Ypredicted) |
| double | PredictionError (int order) |
Example, for nsteps= 3
| int chrono::ChHistory::Get_arr_offset | ( | int | i | ) |
Returns the offset in the arrays given the cyclic position "i", ranging from and to: (-steps+2)....0....(+1)
| ChMatrix * chrono::ChHistory::Get_Y | ( | int | i | ) |
Gets the address of the Y vector, for instant "i", with 0= current, -1= previous, etc.
| double chrono::ChHistory::Get_Ytime | ( | int | i | ) |
Gets/sets the time of the instant "i".
| void chrono::ChHistory::ForwardStep | ( | ) |
Rotates one step further the pointer to the actual Y vector, after the user has properly set a good acceptable Y(+1), which will become Y(0) this way.
| double chrono::ChHistory::Get_now_time | ( | ) |
shortcuts: Gets the current Y address, and the address of the future "Ynew".(the "work in progress" Y, at time t(+1);
| int chrono::ChHistory::GetNsequenced | ( | double | maxstep | ) |
equal to the nsteps for a well started procedure.
Returns the number of correctly sequenced recordings of history, where the step difference is not null (neither it is higher than "stepmax"). it is 1 for a hjistory just started, and it is
| void chrono::ChHistory::PredictYnew | ( | int | order, | |
| double | m_dt | |||
| ) |
Fills the Ynew -that is, Y(+1)- with an extrapolation of the time-history, using polynomial interpolation of given order. The time step between current Y and Ynew must be provided, and must be different from 0. Note: if "steps" is 2, there are only two Y vectors, that is Y and Ynew, so the extrapolation have no sense, at least Y(0) and Y(-1) must exist for simple linear extrapolation.
| void chrono::ChHistory::PredictY | ( | int | order, | |
| double | m_dt, | |||
| ChMatrix<> * | Ypredicted | |||
| ) |
As before, but does not fill the Ynew with the prediction: here an external Y must be provided.
| double chrono::ChHistory::PredictionError | ( | int | order | ) |
As before, but the resulting predicted vector is not needed, because it returns directly the norm of the error between predicted and actual Ynew (which is supposed to be just computed and with correct time). This is because it's very memory-efficient.
CHRONO::ENGINE