rotex__utils Module

Some small utilities



Interfaces

public interface isint

  • private pure elemental module function isint_r(x) result(res)

    Arguments

    Type IntentOptional Attributes Name
    real(kind=dp), intent(in) :: x

    Return Value logical

  • private pure elemental module function isint_c(z) result(res)

    Arguments

    Type IntentOptional Attributes Name
    complex(kind=dp), intent(in) :: z

    Return Value logical

public interface kbn_sum

  • private pure elemental subroutine kbn_sum_rqp(summation, c, input)

    Improved Kahan-Babuška algorithm accumulation for summations

    Arguments

    Type IntentOptional Attributes Name
    real(kind=qp), intent(inout) :: summation
    real(kind=qp), intent(inout) :: c
    real(kind=qp), intent(in) :: input
  • private pure elemental subroutine kbn_sum_cdp(summation, c, input)

    Improved Kahan-Babuška algorithm accumulation for summations

    Arguments

    Type IntentOptional Attributes Name
    complex(kind=dp), intent(inout) :: summation
    complex(kind=dp), intent(inout) :: c
    complex(kind=dp), intent(in) :: input
  • private pure elemental subroutine kbn_sum_cqp(summation, c, input)

    Improved Kahan-Babuška algorithm accumulation for summations

    Arguments

    Type IntentOptional Attributes Name
    complex(kind=qp), intent(inout) :: summation
    complex(kind=qp), intent(inout) :: c
    complex(kind=qp), intent(in) :: input

public interface downcast

  • private pure elemental module subroutine downcast_r(hi, lo)

    Send the value of hi to lo, respecting the kind of the types

    Arguments

    Type IntentOptional Attributes Name
    real(kind=qp), intent(in) :: hi
    real(kind=dp), intent(out) :: lo
  • private pure elemental module subroutine downcast_c(hi, lo)

    Send the value of hi to lo, respecting the kind of the types

    Arguments

    Type IntentOptional Attributes Name
    complex(kind=qp), intent(in) :: hi
    complex(kind=dp), intent(out) :: lo

public interface upcast

  • private pure elemental module subroutine upcast_r(lo, hi)

    Send the value of lo to hi, respecting the kind of the types

    Arguments

    Type IntentOptional Attributes Name
    real(kind=dp), intent(in) :: lo
    real(kind=qp), intent(out) :: hi
  • private pure elemental module subroutine upcast_c(lo, hi)

    Send the value of lo to hi, respecting the kind of the types

    Arguments

    Type IntentOptional Attributes Name
    complex(kind=dp), intent(in) :: lo
    complex(kind=qp), intent(out) :: hi

public interface printmat

  • private module subroutine printmat_i(M, funit, header)

    Prints a matrix to the supplied funit, otherwise print to stdout

    Arguments

    Type IntentOptional Attributes Name
    integer, intent(in) :: M(:,:)
    integer, intent(in), optional :: funit
    character(len=*), intent(in), optional :: header
  • private module subroutine printmat_r(M, funit, header)

    Prints a matrix to the supplied funit, otherwise print to stdout

    Arguments

    Type IntentOptional Attributes Name
    real(kind=dp), intent(in) :: M(:,:)
    integer, intent(in), optional :: funit
    character(len=*), intent(in), optional :: header
  • private module subroutine printmat_c(M, funit, header)

    Prints a matrix to the supplied funit, otherwise print to stdout

    Arguments

    Type IntentOptional Attributes Name
    complex(kind=dp), intent(in) :: M(:,:)
    integer, intent(in), optional :: funit
    character(len=*), intent(in), optional :: header

Functions

public pure elemental module function isin(x, xl, xr, lclosed, rclosed) result(res)

Test whether x is in the interval spanned by x1,x2 l/rclosed if true include xl and xr, respectively. They are true by default

Arguments

Type IntentOptional Attributes Name
real(kind=dp), intent(in) :: x
real(kind=dp), intent(in) :: xl
real(kind=dp), intent(in) :: xr
logical, intent(in), optional :: lclosed
logical, intent(in), optional :: rclosed

Return Value logical


Subroutines

public pure elemental subroutine assert(test, message)

Arguments

Type IntentOptional Attributes Name
logical, intent(in) :: test
character(len=*), intent(in) :: message

public subroutine read_blank(read_unit, num_read)

Reads num_read lines from unit read_unit, not storing any information. If num_read is not supplied, read one line.

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: read_unit
integer, intent(in), optional :: num_read