|
Globals Library 1.0
|
Data structure to store time-sequence of real data. More...
Public Member Functions | |
| procedure, pass, public | init (this, lun_err, ndata, nsequence) |
Static constructor for datasequence::dataseq | |
| procedure, pass, public | kill (this, lun_err) |
Static destructor for datasequence::dataseq | |
| procedure, pass, public | fill (this, data, time) |
| Add new data to the database. | |
| procedure, pass, public | lagrange_interpolation (this, time, interpolation, info) |
| Lagrange interpolation in time of stored data. | |
Public Attributes | |
| integer | ndata |
| Data size. | |
| integer | nsequence |
| Number of time instants. | |
| real(kind=double), dimension(:,:), allocatable | datas |
Dimension (ndata,nsequence) Data stored. | |
| real(kind=double), dimension(:), allocatable | times |
Dimension (nsequence) Times for which data is stored. | |
| integer | istored |
| Column index where last data has been stored. | |
| integer | nstored |
| Number of non-empty columns of real data. | |
Data structure to store time-sequence of real data.
Used to generate linear Lagrangian interpolations. Data are stored cyclicaly.
Example: Assume nsequence = 3. After init istored = 0. Using fill procedure we pass the data to be stored.
The integer istored says which is the last slot were data has been stored.
| procedure, pass, public datasequence::dataseq::init | ( | class(dataseq), intent(inout) | this, |
| integer, intent(in) | lun_err, | ||
| integer, intent(in) | ndata, | ||
| integer, intent(in) | nsequence ) |
Static constructor for datasequence::dataseq
Set variables dataseq::ndata and dataseq::nsequence and allocate variables dataseq::datas and dataseq::times.
| [in] | lun_err | integer, unit number for error message |
| [in] | ndata | integer, dimension data to store |
| [in] | nsequence | integer, number of time instants |
| procedure, pass, public datasequence::dataseq::kill | ( | class(dataseq), intent(inout) | this, |
| integer, intent(in) | lun_err ) |
Static destructor for datasequence::dataseq
Deallocate variables dataseq::datas and dataseq::times
| [in] | lun_err | integer, unit number for error message |
| procedure, pass, public datasequence::dataseq::fill | ( | class(dataseq), intent(inout) | this, |
| real(kind=double), dimension(this%ndata), intent(in) | data, | ||
| real(kind=double), intent(in) | time ) |
Add new data to the database.
| [in] | data | data to add to database dataseq::datas |
| [in] | time | time associated to new data |
| procedure, pass, public datasequence::dataseq::lagrange_interpolation | ( | class(dataseq), intent(in) | this, |
| real(kind=double), intent(in) | time, | ||
| real(kind=double), dimension(this%ndata), intent(inout) | interpolation, | ||
| integer, intent(inout) | info ) |
Lagrange interpolation in time of stored data.
| [in] | time | time at which we want to compute new data |
| [in,out] | interpolation | vector of data at time timecomputed using Lagrange interpolation in time of data stored in dataseq::datas |
| [in,out] | info | -1: database is not full and interpolation not computed, 0 otherwise |
| integer datasequence::dataseq::ndata |
Data size.
| integer datasequence::dataseq::nsequence |
Number of time instants.
| real(kind=double), dimension(:,:), allocatable datasequence::dataseq::datas |
| real(kind=double), dimension(:), allocatable datasequence::dataseq::times |
Dimension (nsequence) Times for which data is stored.
| integer datasequence::dataseq::istored |
Column index where last data has been stored.
| integer datasequence::dataseq::nstored |
Number of non-empty columns of real data.