file_grid_object Derived Type

type, public, extends(file_object) :: file_grid_object

type~~file_grid_object~~InheritsGraph type~file_grid_object file_grid_object type~error_object error_object type~error_object->type~file_grid_object error type~file_object file_object type~error_object->type~file_object error type~file_object->type~file_grid_object
Help


File grid object class.

Inherited By

type~~file_grid_object~~InheritedByGraph type~file_grid_object file_grid_object type~simulation_object simulation_object type~file_grid_object->type~simulation_object file_grid
Help

Source Code


Components

TypeVisibility AttributesNameInitial
type(error_object), public :: error

Errors handler.

character(len=:), public, allocatable:: file_name

File name.

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

File unit.

logical, public :: is_connected =.false.

Sentinel to check if file is connected.

logical, public :: is_initialized =.false.

Sentinel to check if file is initialized.


Type-Bound Procedures

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

Overload =.

  • private pure subroutine file_assign_file(lhs, rhs)

    Operator =.

    Arguments

    Type IntentOptional AttributesName
    class(file_object), intent(inout) :: lhs

    Left hand side.

    type(file_object), intent(in) :: rhs

    Right hand side.

procedure, public, pass(self) :: close

Close file.

  • private subroutine close(self)

    Close file.

    Arguments

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

    File object.

procedure, public, pass(self) :: description

Return a pretty-formatted description of the file.

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

    Return a pretty-formatted description of the file.

    Arguments

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

    Files collection.

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

    Prefixing string.

    Return Value character(len=:), allocatable

    Description.

procedure, public, pass(self) :: destroy

Destroy file.

  • private elemental subroutine destroy(self)

    Destroy file.

    Arguments

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

    File object.

procedure, public, pass(lhs) :: file_assign_file

Operator =.

  • private pure subroutine file_assign_file(lhs, rhs)

    Operator =.

    Arguments

    Type IntentOptional AttributesName
    class(file_object), intent(inout) :: lhs

    Left hand side.

    type(file_object), intent(in) :: rhs

    Right hand side.

procedure, public, pass(self) :: initialize

Initialize file.

  • private elemental subroutine initialize(self, file_name)

    Initialize File.

    Arguments

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

    File object.

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

    File name.

procedure, public, pass(self) :: load_file_name_from_file

Load file name from file.

  • private subroutine load_file_name_from_file(self, fini, section_name, option_name, go_on_fail)

    Load file name from file.

    Arguments

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

    File object.

    type(file_ini), intent(in) :: fini

    Simulation parameters ini file handler.

    character(len=*), intent(in) :: section_name

    Option name into the ini file.

    character(len=*), intent(in) :: option_name

    Option name into the ini file.

    logical, intent(in), optional :: go_on_fail

    Go on if load fails.

procedure, public, pass(self) :: load_grid_dimensions_from_file

Load the grid dimensions of all blocks from file.

  • private subroutine load_grid_dimensions_from_file(self, grid_dimensions, file_name)

    Load the grid dimensions of all blocks from file.

    Arguments

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

    File object.

    type(grid_dimensions_object), intent(inout) :: grid_dimensions

    Grid dimensions off all blocks into file.

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

    File name.

procedure, public, pass(self) :: load_nodes_from_file

Load nodes coordinates from file.

  • private subroutine load_nodes_from_file(self, grid_dimensions, blocks, file_name)

    Load nodes coordinates from file.

    Arguments

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

    File object.

    type(grid_dimensions_object), intent(in) :: grid_dimensions

    Grid dimensions off all blocks into file.

    type(block_object), intent(inout) :: blocks(1:)

    Blocks storage.

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

    File name.

procedure, public, pass(self) :: open

Open file.

  • private subroutine open(self, file_name, format, action, access)

    Open file.

    Arguments

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

    File object.

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

    File name.

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

    File format.

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

    File action.

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

    File access.

procedure, public, pass(self) :: save_file_name_into_file

Save file name into file.

  • private subroutine save_file_name_into_file(self, fini, section_name, option_name)

    Save file name into file.

    Arguments

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

    File object.

    type(file_ini), intent(inout) :: fini

    Simulation parameters ini file handler.

    character(len=*), intent(in) :: section_name

    Option name into the ini file.

    character(len=*), intent(in) :: option_name

    Option name into the ini file.

procedure, public, pass(self) :: save_grid_dimensions_into_file

Save the grid dimensions of all blocks into file.

procedure, public, pass(self) :: save_nodes_into_file

Save nodes coordinates into file.

  • private subroutine save_nodes_into_file(self, grid_dimensions, blocks)

    Save nodes coordinates into file.

    Arguments

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

    File object.

    type(grid_dimensions_object), intent(in) :: grid_dimensions

    Grid dimensions off all blocks into file.

    type(block_object), intent(inout) :: blocks(1:)

    Blocks storage.

Source Code

type, extends(file_object) :: file_grid_object
   !< File grid object class.
   contains
      ! public methods
      procedure, pass(self) :: load_grid_dimensions_from_file !< Load the grid dimensions of all blocks from file.
      procedure, pass(self) :: load_nodes_from_file           !< Load nodes coordinates from file.
      procedure, pass(self) :: save_grid_dimensions_into_file !< Save the grid dimensions of all blocks into file.
      procedure, pass(self) :: save_nodes_into_file           !< Save nodes coordinates into file.
endtype file_grid_object