Globals Library 1.0
Loading...
Searching...
No Matches
scratch::scrt Type Reference

Public Member Functions

procedure, pass, public init (this, lun_err, niaux, nraux)
 Static constructor for scratch::scrt
 
procedure, pass, public kill (this, lun)
 Static destructor for scratch::scrt
 
procedure, pass, public info (this, lun)
 Info procedure for scratch::scrt
 
procedure, pass, public check (this, niaux, nraux)
 Check is scratch arrays are big enoguh.
 
procedure, pass, public is_enough (this, niaux, nraux)
 Check is scratch arrays are big enoguh.
 

Static Public Member Functions

procedure, nopass, public range (size, ibegin, iend)
 Define ibegin, iend for assign portion of arrays.
 

Public Attributes

logical is_initialized = .false.
 Flag for initialization Used to check if arrays are allocated.
 
integer niaux = 0
 Size of integer array iaux
 
integer nraux = 0
 Size of real array raux
 
integer, dimension(:), allocatable iaux
 Dimension (niaux) Integer scratch array.
 
real(kind=double), dimension(:), allocatable raux
 Dimension (niaux) Real scratch array.
 

Member Function/Subroutine Documentation

◆ init()

procedure, pass, public scratch::scrt::init ( class(scrt), intent(inout) this,
integer, intent(in) lun_err,
integer, intent(in) niaux,
integer, intent(in) nraux )

Static constructor for scratch::scrt


Set scrt::niaux and scrt::nraux and allocate arrays scrt::iaux and scrt::raux.

Parameters
[in]lun_errinteger, unit for error message output
[in]niauxinteger, length integer array
[in]nrauxinteger, length real array

◆ kill()

procedure, pass, public scratch::scrt::kill ( class(scrt), intent(inout) this,
integer, intent(in) lun )

Static destructor for scratch::scrt


Deallocate variables scrt::iaux and scrt::raux.

Parameters
[in]luninteger, unit number for error message

◆ info()

procedure, pass, public scratch::scrt::info ( class(scrt), intent(in) this,
integer, intent(in) lun )

Info procedure for scratch::scrt


Prints content of a variable of type scratch::scrt

Parameters
[in]luninteger, unit number for output message

◆ check()

procedure, pass, public scratch::scrt::check ( class(scrt), intent(in) this,
integer, intent(in) niaux,
integer, intent(in) nraux )

Check is scratch arrays are big enoguh.


Return false if a variable of type scratch::scrt is not initialized, or it contains integer or real array that are too small.

Parameters
[in]niauxinteger. Number of integer required
[in]nrauxinteger. Number of real required
Returns
(logical) True: type initialized and big enough, False type not initialized or not big enough.

◆ is_enough()

procedure, pass, public scratch::scrt::is_enough ( class(scrt), intent(in) this,
integer, intent(in) niaux,
integer, intent(in) nraux )

Check is scratch arrays are big enoguh.


Return false if a variable of type scratch::scrt is not initialized, or it contains integer or real array that are too small.

Parameters
[in]niauxinteger. Number of integer required
[in]nrauxinteger. Number of real required
Returns
(logical) True: type initialized and big enough, False type not initialized or not big enough.

◆ range()

procedure, nopass, public scratch::scrt::range ( integer, intent(in) size,
integer, intent(out) ibegin,
integer, intent(inout) iend )
static

Define ibegin, iend for assign portion of arrays.


Example: partioning raux in two portion of length n1 and n2, assign it to two two real pointer v1 and v2.

iend = 0
call aux%range(n1, ibegin, iend)
v1 => aux%raux(ibegin:iend)
call aux%range(n2, ibegin, iend)
v2 => aux%raux(ibegin:iend)
Parameters
[in]sizeinteger. Size of array required
[out]ibegininteger. Start position of array portion
[in,out]iendinteger. End position of array portion. It cointains the end position of previous array or it must begin initialize to zero.

Member Data Documentation

◆ is_initialized

logical scratch::scrt::is_initialized = .false.

Flag for initialization Used to check if arrays are allocated.

◆ niaux

integer scratch::scrt::niaux = 0

Size of integer array iaux

◆ nraux

integer scratch::scrt::nraux = 0

Size of real array raux

◆ iaux

integer, dimension(:), allocatable scratch::scrt::iaux

Dimension (niaux) Integer scratch array.

◆ raux

real(kind=double), dimension(:), allocatable scratch::scrt::raux

Dimension (niaux) Real scratch array.


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