grid_dimensions_object Derived Type

type, public :: grid_dimensions_object

type~~grid_dimensions_object~~InheritsGraph type~grid_dimensions_object grid_dimensions_object type~block_signature_object block_signature_object type~block_signature_object->type~grid_dimensions_object block_signature vector vector vector->type~block_signature_object emax, emin
Help


Grid dimensions object class.

Inherited By

type~~grid_dimensions_object~~InheritedByGraph type~grid_dimensions_object grid_dimensions_object type~simulation_object simulation_object type~grid_dimensions_object->type~simulation_object grid_dimensions
Help

Components

TypeVisibility AttributesNameInitial
type(block_signature_object), public, allocatable:: block_signature(:)

Signature of each block.

integer(kind=I4P), public :: blocks_number =0

Number of blocks, blobal (whole) number on all process/image.


Type-Bound Procedures

generic, public :: assignment(=) => grid_d_assign_grid_d

Overload =.

procedure, public, pass(self) :: description

Return a pretty-formatted description of grid dimensions.

  • private pure function description(self, prefix) result(desc)

    Return a pretty-formatted description of the grid dimensions.

    Arguments

    Type IntentOptional AttributesName
    class(grid_dimensions_object), intent(in) :: self

    Grid dimensions object.

    character(len=*), intent(in), optional :: prefix

    Prefixing string.

    Return Value character(len=:), allocatable

    Description.

procedure, public, pass(self) :: destroy

Destroy grid dimensions.

  • private elemental subroutine destroy(self)

    Destroy grid dimensions.

    Arguments

    Type IntentOptional AttributesName
    class(grid_dimensions_object), intent(inout) :: self

    Grid dimensions object.

procedure, public, pass(lhs) :: grid_d_assign_grid_d

Operator =.

procedure, public, pass(self) :: initialize

Initialize grid dimensions.

  • private pure subroutine initialize(self, block_signature)

    Initialize grid dimensions.

    Arguments

    Type IntentOptional AttributesName
    class(grid_dimensions_object), intent(inout) :: self

    Grid dimensions object.

    type(block_signature_object), intent(in), optional :: block_signature(1:)

    Dimensions of each block.

procedure, public, pass(self) :: iolength

Return the IO length storage.

  • private function iolength(self)

    Return the IO length storage.

    Arguments

    Type IntentOptional AttributesName
    class(grid_dimensions_object), intent(in) :: self

    Grid dimensions object.

    Return Value integer(kind=I4P)

    IO length storage.

procedure, public, pass(self) :: iopos_block_nodes

Return the IO position where nodes of block b-th are stored.

  • private function iopos_block_nodes(self, b)

    Return the IO position where nodes of block b-th are stored.

    Arguments

    Type IntentOptional AttributesName
    class(grid_dimensions_object), intent(in) :: self

    Grid dimensions object.

    integer(kind=I4P), intent(in) :: b

    Block index.

    Return Value integer(kind=I4P)

    IO position where nodes of block b-th are stored.

procedure, public, pass(self) :: load_from_file

Load grid dimensions from file.

  • private subroutine load_from_file(self, file_unit)

    Load grid dimensions from file.

    Arguments

    Type IntentOptional AttributesName
    class(grid_dimensions_object), intent(inout) :: self

    Grid dimensions object.

    integer(kind=I4P), intent(in) :: file_unit

    File unit.

procedure, public, pass(self) :: save_into_file

Save grid dimensions into file.

  • private subroutine save_into_file(self, file_unit)

    Load the grid dimensions of all blocks from file.

    Arguments

    Type IntentOptional AttributesName
    class(grid_dimensions_object), intent(in) :: self

    Grid dimensions object.

    integer(kind=I4P), intent(in) :: file_unit

    File unit.

Source Code

type :: grid_dimensions_object
   !< Grid dimensions object class.
   integer(I4P)                              :: blocks_number=0    !< Number of blocks, blobal (whole) number on all process/image.
   type(block_signature_object), allocatable :: block_signature(:) !< Signature of each block.
   contains
      ! public methods
      procedure, pass(self) :: description       !< Return a pretty-formatted description of grid dimensions.
      procedure, pass(self) :: destroy           !< Destroy grid dimensions.
      procedure, pass(self) :: initialize        !< Initialize grid dimensions.
      procedure, pass(self) :: iolength          !< Return the IO length storage.
      procedure, pass(self) :: iopos_block_nodes !< Return the IO position where nodes of block b-th are stored.
      procedure, pass(self) :: load_from_file    !< Load grid dimensions from file.
      procedure, pass(self) :: save_into_file    !< Save grid dimensions into file.
      ! operators
      generic :: assignment(=) => grid_d_assign_grid_d !< Overload `=`.
      ! private methods
      procedure, pass(lhs) :: grid_d_assign_grid_d !< Operator `=`.
endtype grid_dimensions_object