pic_matrix_printer_v2 Module

Generic module for printing arrays


Uses

  • module~~pic_matrix_printer_v2~~UsesGraph module~pic_matrix_printer_v2 pic_matrix_printer_v2 module~pic_string_utils pic_string_utils module~pic_matrix_printer_v2->module~pic_string_utils module~pic_types pic_types module~pic_matrix_printer_v2->module~pic_types module~pic_string_utils->module~pic_types iso_fortran_env iso_fortran_env module~pic_types->iso_fortran_env

Variables

Type Visibility Attributes Name Initial
character(len=5), private, parameter :: default_format = "NUMPY"

supported formats: NUMPY, MATHEMATICA, and PLAIN which resembles numpy

character(len=*), private, parameter :: fmt_edge = "(A)"
character(len=*), private, parameter :: fmt_in = '(A, ", ")'

Interfaces

public interface print_array_v2

Generic interface for printing arrays of different types

Usage: call print_array_v2(array, [optional] format) Where format can be: NUMPY, PLAIN, MATHEMATICA (can use lower caps)

Implemented types are:

array(:) -> int32, int64, sp, dp

array(:,:) -> int32, int64, sp, dp

array(:) (packed matrix) -> sp, dp

array(:,:,:) -> sp, dp

  • private subroutine print_vector_int32(vector, format_type)

    print a vector of int32 values

    Arguments

    Type IntentOptional Attributes Name
    integer(kind=int32), intent(in) :: vector(:)
    character(len=*), intent(in), optional :: format_type
  • private subroutine print_vector_int64(vector, format_type)

    print a vector of int64 values

    Arguments

    Type IntentOptional Attributes Name
    integer(kind=int64), intent(in) :: vector(:)
    character(len=*), intent(in), optional :: format_type
  • private subroutine print_vector_sp(vector, format_type)

    print a vector of sp values

    Arguments

    Type IntentOptional Attributes Name
    real(kind=sp), intent(in) :: vector(:)
    character(len=*), intent(in), optional :: format_type
  • private subroutine print_vector_dp(vector, format_type)

    print a vector of dp values

    Arguments

    Type IntentOptional Attributes Name
    real(kind=dp), intent(in) :: vector(:)
    character(len=*), intent(in), optional :: format_type
  • private subroutine print_matrix_int32(matrix, format_type)

    print a matrix of int32 values

    Arguments

    Type IntentOptional Attributes Name
    integer(kind=int32), intent(in) :: matrix(:,:)
    character(len=*), intent(in), optional :: format_type
  • private subroutine print_matrix_int64(matrix, format_type)

    print a matrix of int64 values

    Arguments

    Type IntentOptional Attributes Name
    integer(kind=int64), intent(in) :: matrix(:,:)
    character(len=*), intent(in), optional :: format_type
  • private subroutine print_matrix_sp(matrix, format_type)

    print a matrix of sp values

    Arguments

    Type IntentOptional Attributes Name
    real(kind=sp), intent(in) :: matrix(:,:)
    character(len=*), intent(in), optional :: format_type
  • private subroutine print_matrix_dp(matrix, format_type)

    print a matrix of dp values

    Arguments

    Type IntentOptional Attributes Name
    real(kind=dp), intent(in) :: matrix(:,:)
    character(len=*), intent(in), optional :: format_type
  • private subroutine print_packed_matrix_int32(packed, n_elements, format_type)

    Print a packed lower triangular matrix of int32 values

    Arguments

    Type IntentOptional Attributes Name
    integer(kind=int32), intent(in) :: packed(:)
    integer(kind=default_int), intent(in) :: n_elements
    character(len=*), intent(in), optional :: format_type
  • private subroutine print_packed_matrix_int64(packed, n_elements, format_type)

    Print a packed lower triangular matrix of int64 values

    Arguments

    Type IntentOptional Attributes Name
    integer(kind=int64), intent(in) :: packed(:)
    integer(kind=default_int), intent(in) :: n_elements
    character(len=*), intent(in), optional :: format_type
  • private subroutine print_packed_matrix_sp(packed, n_elements, format_type)

    Print a packed lower triangular matrix of sp values

    Arguments

    Type IntentOptional Attributes Name
    real(kind=sp), intent(in) :: packed(:)
    integer(kind=default_int), intent(in) :: n_elements
    character(len=*), intent(in), optional :: format_type
  • private subroutine print_packed_matrix_dp(packed, n_elements, format_type)

    Print a packed lower triangular matrix of dp values

    Arguments

    Type IntentOptional Attributes Name
    real(kind=dp), intent(in) :: packed(:)
    integer(kind=default_int), intent(in) :: n_elements
    character(len=*), intent(in), optional :: format_type
  • private subroutine print_3d_tensor_sp(matrix, format_type)

    Print a 3D tensor of sp values

    Arguments

    Type IntentOptional Attributes Name
    real(kind=sp), intent(in) :: matrix(:,:,:)
    character(len=*), intent(in), optional :: format_type
  • private subroutine print_3d_tensor_dp(matrix, format_type)

    Print a 3D tensor of dp values

    Arguments

    Type IntentOptional Attributes Name
    real(kind=dp), intent(in) :: matrix(:,:,:)
    character(len=*), intent(in), optional :: format_type

Subroutines

private subroutine print_3d_tensor_dp(matrix, format_type)

Print a 3D tensor of dp values

Arguments

Type IntentOptional Attributes Name
real(kind=dp), intent(in) :: matrix(:,:,:)
character(len=*), intent(in), optional :: format_type

private subroutine print_3d_tensor_sp(matrix, format_type)

Print a 3D tensor of sp values

Arguments

Type IntentOptional Attributes Name
real(kind=sp), intent(in) :: matrix(:,:,:)
character(len=*), intent(in), optional :: format_type

private subroutine print_matrix_dp(matrix, format_type)

print a matrix of dp values

Arguments

Type IntentOptional Attributes Name
real(kind=dp), intent(in) :: matrix(:,:)
character(len=*), intent(in), optional :: format_type

private subroutine print_matrix_int32(matrix, format_type)

print a matrix of int32 values

Arguments

Type IntentOptional Attributes Name
integer(kind=int32), intent(in) :: matrix(:,:)
character(len=*), intent(in), optional :: format_type

private subroutine print_matrix_int64(matrix, format_type)

print a matrix of int64 values

Arguments

Type IntentOptional Attributes Name
integer(kind=int64), intent(in) :: matrix(:,:)
character(len=*), intent(in), optional :: format_type

private subroutine print_matrix_sp(matrix, format_type)

print a matrix of sp values

Arguments

Type IntentOptional Attributes Name
real(kind=sp), intent(in) :: matrix(:,:)
character(len=*), intent(in), optional :: format_type

private subroutine print_packed_matrix_dp(packed, n_elements, format_type)

Print a packed lower triangular matrix of dp values

Arguments

Type IntentOptional Attributes Name
real(kind=dp), intent(in) :: packed(:)
integer(kind=default_int), intent(in) :: n_elements
character(len=*), intent(in), optional :: format_type

private subroutine print_packed_matrix_int32(packed, n_elements, format_type)

Print a packed lower triangular matrix of int32 values

Arguments

Type IntentOptional Attributes Name
integer(kind=int32), intent(in) :: packed(:)
integer(kind=default_int), intent(in) :: n_elements
character(len=*), intent(in), optional :: format_type

private subroutine print_packed_matrix_int64(packed, n_elements, format_type)

Print a packed lower triangular matrix of int64 values

Arguments

Type IntentOptional Attributes Name
integer(kind=int64), intent(in) :: packed(:)
integer(kind=default_int), intent(in) :: n_elements
character(len=*), intent(in), optional :: format_type

private subroutine print_packed_matrix_sp(packed, n_elements, format_type)

Print a packed lower triangular matrix of sp values

Arguments

Type IntentOptional Attributes Name
real(kind=sp), intent(in) :: packed(:)
integer(kind=default_int), intent(in) :: n_elements
character(len=*), intent(in), optional :: format_type

private subroutine print_vector_dp(vector, format_type)

print a vector of dp values

Arguments

Type IntentOptional Attributes Name
real(kind=dp), intent(in) :: vector(:)
character(len=*), intent(in), optional :: format_type

private subroutine print_vector_int32(vector, format_type)

print a vector of int32 values

Arguments

Type IntentOptional Attributes Name
integer(kind=int32), intent(in) :: vector(:)
character(len=*), intent(in), optional :: format_type

private subroutine print_vector_int64(vector, format_type)

print a vector of int64 values

Arguments

Type IntentOptional Attributes Name
integer(kind=int64), intent(in) :: vector(:)
character(len=*), intent(in), optional :: format_type

private subroutine print_vector_sp(vector, format_type)

print a vector of sp values

Arguments

Type IntentOptional Attributes Name
real(kind=sp), intent(in) :: vector(:)
character(len=*), intent(in), optional :: format_type

private subroutine set_brackets(format_type, open_bracket, close_bracket)

Set brackets based on output format type

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: format_type
character(len=1), intent(out) :: open_bracket
character(len=1), intent(out) :: close_bracket