Globals Library 1.0
|
Data Types | |
type | timedata |
Data structure containing values of a variable possibly depending on time (e.g., forcing function) More... | |
Functions/Subroutines | |
subroutine | init_td (this, stderr, inputfdescr, dimdata, ndata, default_data) |
Static constructor for timeinputs::timedata | |
subroutine | kill_td (this, lun) |
Static destructor for timeinputs::timedata | |
subroutine | info_td (this, lun, nsample) |
Info procedure for timeinputs::timedata . | |
subroutine | set_td (this, stderr, inputfdescr, time, endfile, info) |
Set (read if necessary) non-steady time data. | |
integer function | eval_ninput (this) |
Compute number of non-zero elements of timedata::tdactual | |
subroutine, public | write_steady (stderr, lun, ndata, data, fname) |
Write data array into file in the form of steady state data. | |
subroutine, public | read_steady (stderr, ndata, data, open_file) |
Read data array from file in the form of steady state data. | |
subroutine, public | write2file (lun_err, head_body_tail_whole, dimdata, ndata, data, time, fileout) |
Write data matrix into file in the form of steady state data. | |
subroutine, public | writearray2file (lun_err, head_body_tail_whole, time, ndata, data, lun, fn) |
Write data array into file in the form of steady state data. | |
integer function | eval_ninput_data (dimdata, ndata, data) |
Compute number of non-zero input data. | |
subroutine | find_nonzeros (dimdata, ndata, data, nnz, indeces_nonzeros) |
Compute number and indices of non-zero input data. | |
subroutine timeinputs::init_td | ( | class(timedata), intent(out) | this, |
integer, intent(in) | stderr, | ||
type(file), intent(in) | inputfdescr, | ||
integer, intent(in), optional | dimdata, | ||
integer, intent(in), optional | ndata, | ||
real(kind=double), dimension(:), intent(in), optional | default_data ) |
Static constructor for timeinputs::timedata
Read data from input file or from input vector.
Input file for steady state data must be written in the form
If input data depend on time, the input file must be in the form:
Steady state input data can also be given using the input vector default_data
. In this case:
[in] | stderr | unit number for error message |
[in] | InputFdescr | file for input data. If file does not exist, default_data must be given. |
[in] | dimdata | valaue to be assigned to timedata::dimdata . Optional if file is provided, otherwise must be given. |
[in] | ndata | value to be assigned to timedata::ndata . Optional if file is provided, otherwise must be given. |
[in] | default_data | steady state input data. This variable is required only if input file does not exist. |
|
private |
|
private |
Info procedure for timeinputs::timedata
.
Print the first nsample
non-zero terms of timedata::tdval(:,:.1)
, timedata::tdactual(:,:)
and timedata::tdval(:,:,2)
.
[in] | lun | unit number for error message output. |
[in] | nsample | number of first non-zero samples to be printed |
|
private |
Set (read if necessary) non-steady time data.
If timedata::steadytd = .true.
, do nothing. Set the value of timedata::tdactual
using a linear interpolation in time of the values in timedata::tdval
.
[in] | stderr | unit number for error message |
[in] | InputFdescr | input file for reading data |
[in] | time | time for the computation of timedata::tdactual |
[in,out] | endfile | .true. if end of file is reached |
[in,out] | info | error code (optional) |
Test if continue reading file
|
private |
Compute number of non-zero elements of timedata::tdactual
timedata::tdactual
subroutine, public timeinputs::write_steady | ( | integer, intent(in) | stderr, |
integer, intent(in) | lun, | ||
integer, intent(in) | ndata, | ||
real(kind=double), dimension(ndata), intent(in) | data, | ||
character(len=*), intent(in), optional | fname ) |
Write data array into file in the form of steady state data.
Output file has the form:
[in] | stderr | unit number for error message |
[in] | lun | unit number for file in which data is written |
[in] | ndata | length of data array |
[in] | data | array of data to be written |
[in] | fname | name of file where data is written (optional) |
subroutine, public timeinputs::read_steady | ( | integer, intent(in) | stderr, |
integer, intent(in) | ndata, | ||
real(kind=double), dimension(ndata), intent(inout) | data, | ||
type(file), intent(in) | open_file ) |
Read data array from file in the form of steady state data.
[in] | stderr | unit number for error message |
[in] | ndata | data length |
[in,out] | data | data to read (length ndata ) |
[in] | open_file | file containing input data |
subroutine, public timeinputs::write2file | ( | integer, intent(in) | lun_err, |
character(len=*), intent(in) | head_body_tail_whole, | ||
integer, intent(in) | dimdata, | ||
integer, intent(in) | ndata, | ||
real(kind=double), dimension(dimdata,ndata), intent(in) | data, | ||
real(kind=double), intent(in) | time, | ||
type(file), intent(in) | fileout ) |
Write data matrix into file in the form of steady state data.
[in] | lun_err | unit number for error message |
[in] | head_body_tail_whole | what has to be written
|
[in] | time | time of data |
[in] | dimdata | first dimension of data |
[in] | ndata | second dimension of data |
[in] | data | data to write |
[in] | fileout | file where to write data |
subroutine, public timeinputs::writearray2file | ( | integer, intent(in) | lun_err, |
character(len=*), intent(in) | head_body_tail_whole, | ||
real(kind=double), intent(in) | time, | ||
integer, intent(in) | ndata, | ||
real(kind=double), dimension(ndata), intent(in) | data, | ||
integer, intent(in) | lun, | ||
character(len=*), intent(in) | fn ) |
Write data array into file in the form of steady state data.
[in] | lun_err | unit number for error message |
[in] | head_body_tail_whole | what has to be written
|
[in] | time | time of data |
[in] | ndata | second dimension of data |
[in] | data | data to write |
[in] | lun | unit number for output file |
[in] | fn | output file name |
|
private |
Compute number of non-zero input data.
Compute the number of columns of input variable data
having non-zero norm.
[in] | dimdata | number of columns of data |
[in] | ndata | number of rows of data |
[in] | data | input data |
|
private |
Compute number and indices of non-zero input data.
Compute the number of columns of input variable data
having zero norm and their indices.
[in] | dimdata | number of columns of data |
[in] | ndata | number of rows of data |
[in] | data | input data |
[out] | nnz | number of columns of data having non-zero norm |
[in,out] | indeces_nonzeros | indices of columns of data having non-zero norm |