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.

Detailed Description

Definition at line 13 of file modScratch.f90.

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

Definition at line 29 of file modScratch.f90.

◆ 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

Definition at line 31 of file modScratch.f90.

◆ 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

Definition at line 33 of file modScratch.f90.

◆ 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.

Definition at line 35 of file modScratch.f90.

◆ 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.

Definition at line 37 of file modScratch.f90.

◆ 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.

Definition at line 39 of file modScratch.f90.

Member Data Documentation

◆ is_initialized

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

Flag for initialization Used to check if arrays are allocated.

Definition at line 16 of file modScratch.f90.

◆ niaux

integer scratch::scrt::niaux = 0

Size of integer array ::iaux.

Definition at line 18 of file modScratch.f90.

◆ nraux

integer scratch::scrt::nraux = 0

Size of real array ::raux.

Definition at line 20 of file modScratch.f90.

◆ iaux

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

Dimension (::niaux) Integer scratch array.

Definition at line 23 of file modScratch.f90.

◆ raux

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

Dimension (::niaux) Real scratch array.

Definition at line 26 of file modScratch.f90.


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