block_signature_object Derived Type

type, public :: block_signature_object

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


Block signature object class.

Define the block dimensions, id and level.

Inherited By

type~~block_signature_object~~InheritedByGraph type~block_signature_object block_signature_object type~block_object block_object type~block_signature_object->type~block_object signature type~grid_dimensions_object grid_dimensions_object type~block_signature_object->type~grid_dimensions_object block_signature type~simulation_object simulation_object type~block_object->type~simulation_object blocks type~grid_dimensions_object->type~simulation_object grid_dimensions
Help

Components

TypeVisibility AttributesNameInitial
type(vector), public :: emax

Coordinates of maximum abscissa (extent) of the block.

type(vector), public :: emin

Coordinates of minimum abscissa (extent) of the block.

integer(kind=I4P), public :: gc(1:6) =[0, 0, 0, 0, 0, 0]

Number of ghost cells along each frame.

integer(kind=I8P), public :: id =0

Unique (Morton) identification code.

logical, public :: is_cartesian =.false.

Flag for checking if the block is Cartesian.

logical, public :: is_null_x =.false.

Nullify X direction (2D yz, 1D y or z domain).

logical, public :: is_null_y =.false.

Nullify Y direction (2D xy, 1D x or y domain).

logical, public :: is_null_z =.false.

Nullify Z direction (2D xy, 1D x or y domain).

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

block refinement level.

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

Number of cells in I direction.

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

Number of cells in J direction.

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

Number of cells in K direction.


Type-Bound Procedures

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

Overload =.

procedure, public, pass(lhs) :: block_d_assign_block_d

Operator =.

procedure, public, pass(self) :: cells_number

Return the number of cells.

  • private elemental function cells_number(self, with_ghosts) result(cells_number_)

    Return the number of cells.

    Arguments

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

    Block.

    logical, intent(in), optional :: with_ghosts

    Take into account ghost cells.

    Return Value integer(kind=I4P)

    Number of cells.

procedure, public, pass(self) :: description

Return a pretty-formatted description of block signature.

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

    Return a pretty-formatted description of the block signature.

    Arguments

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

    Block signature object.

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

    Prefixing string.

    Return Value character(len=:), allocatable

    Description.

procedure, public, pass(self) :: destroy

Destroy block signature.

  • private elemental subroutine destroy(self)

    Destroy block signature.

    Arguments

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

    Block signature object.

procedure, public, pass(self) :: initialize

Initialize block signature.

  • private pure subroutine initialize(self, signature, id, level, gc, ni, nj, nk, emin, emax, is_cartesian, is_null_x, is_null_y, is_null_z)

    Initialize block signature.

    Arguments

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

    Block signature object.

    type(block_signature_object), intent(in), optional :: signature

    Block signature input.

    integer(kind=I8P), intent(in), optional :: id

    Unique (Morton) identification code.

    integer(kind=I4P), intent(in), optional :: level

    Grid refinement level.

    integer(kind=I4P), intent(in), optional :: gc(1:)

    Number of ghost cells along each frame.

    integer(kind=I4P), intent(in), optional :: ni

    Number of cells in I direction.

    integer(kind=I4P), intent(in), optional :: nj

    Number of cells in J direction.

    integer(kind=I4P), intent(in), optional :: nk

    Number of cells in K direction.

    type(vector), intent(in), optional :: emin

    Coordinates of minimum abscissa of the block.

    type(vector), intent(in), optional :: emax

    Coordinates of maximum abscissa of the block.

    logical, intent(in), optional :: is_cartesian

    Flag for checking if the block is Cartesian.

    logical, intent(in), optional :: is_null_x

    Nullify X direction (2D yz, 1D y or z domain).

    logical, intent(in), optional :: is_null_y

    Nullify Y direction (2D xy, 1D x or y domain).

    logical, intent(in), optional :: is_null_z

    Nullify Z direction (2D xy, 1D x or y domain).

procedure, public, pass(self) :: iolength

Return the IO length storage.

  • private function iolength(self)

    Return the IO length storage.

    Arguments

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

    Block signature object.

    Return Value integer(kind=I4P)

    IO length storage.

procedure, public, pass(self) :: load_from_file

Load block signature from file.

  • private subroutine load_from_file(self, file_unit)

    Load block signature from file.

    Arguments

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

    Block signature object.

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

    File unit.

procedure, public, pass(self) :: nodes_number

Return the number of nodes.

  • private elemental function nodes_number(self, with_ghosts) result(nodes_number_)

    Return the number of nodes.

    Arguments

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

    Block.

    logical, intent(in), optional :: with_ghosts

    Take into account ghost cells.

    Return Value integer(kind=I4P)

    Number of nodes.

procedure, public, pass(self) :: save_into_file

Save block signature into file.

  • private subroutine save_into_file(self, file_unit)

    Load the block signature of all blocks from file.

    Arguments

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

    Block signature object.

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

    File unit.

Source Code

type :: block_signature_object
   !< Block signature object class.
   !<
   !< Define the block dimensions, id and level.
   integer(I8P) :: id=0                  !< Unique (Morton) identification code.
   integer(I4P) :: level=0               !< block refinement level.
   integer(I4P) :: gc(1:6)=[0,0,0,0,0,0] !< Number of ghost cells along each frame.
   integer(I4P) :: ni=0                  !< Number of cells in I direction.
   integer(I4P) :: nj=0                  !< Number of cells in J direction.
   integer(I4P) :: nk=0                  !< Number of cells in K direction.
   type(vector) :: emin                  !< Coordinates of minimum abscissa (extent) of the block.
   type(vector) :: emax                  !< Coordinates of maximum abscissa (extent) of the block.
   logical      :: is_cartesian=.false.  !< Flag for checking if the block is Cartesian.
   logical      :: is_null_x=.false.     !< Nullify X direction (2D yz, 1D y or z domain).
   logical      :: is_null_y=.false.     !< Nullify Y direction (2D xy, 1D x or y domain).
   logical      :: is_null_z=.false.     !< Nullify Z direction (2D xy, 1D x or y domain).
   contains
      ! public methods
      procedure, pass(self) :: cells_number   !< Return the number of cells.
      procedure, pass(self) :: description    !< Return a pretty-formatted description of block signature.
      procedure, pass(self) :: destroy        !< Destroy block signature.
      procedure, pass(self) :: initialize     !< Initialize block signature.
      procedure, pass(self) :: iolength       !< Return the IO length storage.
      procedure, pass(self) :: load_from_file !< Load block signature from file.
      procedure, pass(self) :: nodes_number   !< Return the number of nodes.
      procedure, pass(self) :: save_into_file !< Save block signature into file.
      ! operators
      generic :: assignment(=) => block_d_assign_block_d !< Overload `=`.
      ! private methods
      procedure, pass(lhs) :: block_d_assign_block_d !< Operator `=`.
endtype block_signature_object