simulation_object Derived Type

type, public :: simulation_object

type~~simulation_object~~InheritsGraph type~simulation_object simulation_object command_line_interface command_line_interface command_line_interface->type~simulation_object cli type~file_grid_object file_grid_object type~file_grid_object->type~simulation_object file_grid type~solver_object solver_object type~solver_object->type~simulation_object solver type~error_object error_object type~error_object->type~simulation_object error type~error_object->type~file_grid_object error type~error_object->type~solver_object error type~non_dimensional_numbers_object non_dimensional_numbers_object type~error_object->type~non_dimensional_numbers_object error type~block_object block_object type~error_object->type~block_object error type~os_object os_object type~error_object->type~os_object error type~time_object time_object type~error_object->type~time_object error type~free_conditions_object free_conditions_object type~error_object->type~free_conditions_object error type~file_object file_object type~error_object->type~file_object error type~non_dimensional_numbers_object->type~simulation_object adimensionals type~block_object->type~simulation_object blocks type~os_object->type~simulation_object os type~grid_dimensions_object grid_dimensions_object type~grid_dimensions_object->type~simulation_object grid_dimensions type~time_object->type~simulation_object time type~free_conditions_object->type~simulation_object free_conditions type~file_object->type~file_grid_object type~block_signature_object block_signature_object type~block_signature_object->type~block_object signature type~block_signature_object->type~grid_dimensions_object block_signature type~cell_object cell_object type~cell_object->type~block_object cell type~face_object face_object type~face_object->type~block_object face_i, face_j, face_k type~node_object node_object type~node_object->type~block_object node vector vector vector->type~free_conditions_object velocity vector->type~block_signature_object emax, emin vector->type~cell_object center vector->type~face_object normal vector->type~node_object vertex
Help


Simulation object class.

simulation_object is a container for all simulation data for each processor/image.


Source Code


Components

TypeVisibility AttributesNameInitial
type(non_dimensional_numbers_object), public :: adimensionals

Non dimensional numbers.

type(block_object), public, allocatable:: blocks(:)

Blocks list.

type(command_line_interface), public :: cli

Command line interface.

type(error_object), public :: error

Errors handler.

type(file_grid_object), public :: file_grid

Grid file handler.

character(len=999), public :: file_parameters =''

Name of simulation parameters file.

type(free_conditions_object), public :: free_conditions

Free stream conditions.

logical, public :: go_on_fail =.false.

Allow/disallow parameters loading failure.

type(grid_dimensions_object), public :: grid_dimensions

Grid dimensions.

logical, public :: is_cli_parsed =.false.

Sentinel of CLI parsing.

logical, public :: is_output_verbose =.false.

Verbose output.

type(os_object), public :: os

Running Operating System.

type(solver_object), public :: solver

solver models parameters.

type(time_object), public :: time

Timing conditions.


Type-Bound Procedures

procedure, public, pass(self) :: allocate_blocks

Allocate blocks accordingly to grid dimensions.

  • private subroutine allocate_blocks(self)

    Allocate blocks accordingly to grid dimensions.

    Arguments

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

    Simulation data.

procedure, public, pass(self) :: description

Return a pretty-formatted description of the simulation.

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

    Return a pretty-formatted description of the simulation.

    Arguments

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

    Simulation parameters.

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

    Prefixing string.

    Return Value character(len=:), allocatable

    Description.

procedure, public, pass(self) :: destroy

Destroy simulation data.

  • private elemental subroutine destroy(self)

    Destroy simulation data.

    Arguments

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

    Simulation data.

procedure, public, pass(self) :: initialize

Initialize simulation.

  • private subroutine initialize(self, blocks, parse_cli, load_files)

    Initialize simulation.

    Arguments

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

    simulation data.

    type(block_object), intent(in), optional :: blocks(1:)

    Blocks structure.

    logical, intent(in), optional :: parse_cli

    Enable CLI parsing.

    logical, intent(in), optional :: load_files

    Enable files loading.

procedure, public, pass(self) :: integrate

Integrate the equations.

  • private subroutine integrate(self)

    Integrate the equations.

    Arguments

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

    simulation data.

procedure, public, pass(self) :: load_file_grid

Load grid file.

  • private subroutine load_file_grid(self, file_basename)

    Load grid file.

    Arguments

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

    simulation data.

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

    File basename.

procedure, public, pass(self) :: load_file_parameters

Load file parameters.

  • private subroutine load_file_parameters(self, file_name, go_on_fail)

    Load file parameters.

    Arguments

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

    Simulation object.

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

    File name.

    logical, intent(in), optional :: go_on_fail

    Go on if load fails.

procedure, public, pass(self) :: load_input_files

Load input files.

  • private subroutine load_input_files(self)

    Load from file.

    Arguments

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

    simulation data.

procedure, public, pass(self) :: parse_command_line_interface

Parse command line interface.

procedure, public, pass(self) :: save_file_grid

Save grid file.

  • private subroutine save_file_grid(self, file_basename, ascii, metrics, off, tecplot, vtk)

    Save grid file.

    Arguments

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

    simulation data.

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

    File basename.

    logical, intent(in), optional :: ascii

    Ascii/binary output.

    logical, intent(in), optional :: metrics

    Save also metrics data.

    logical, intent(in), optional :: off

    Save in OFF format sentinel.

    logical, intent(in), optional :: tecplot

    Tecplot output format sentinel.

    logical, intent(in), optional :: vtk

    VTK output format sentinel.

procedure, public, pass(self) :: save_file_parameters

Save file parameters.

  • private subroutine save_file_parameters(self, file_name)

    Save file parameters.

    Arguments

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

    Simulation object.

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

    File name.

procedure, private, pass(self) :: set_command_line_interface

Set command line interface.

Source Code

type :: simulation_object
   !< Simulation object class.
   !<
   !< [[simulation_object]] is a container for all simulation data for each processor/image.
   type(error_object)                   :: error                     !< Errors handler.
   type(command_line_interface)         :: cli                       !< Command line interface.
   type(file_grid_object)               :: file_grid                 !< Grid file handler.
   type(non_dimensional_numbers_object) :: adimensionals             !< Non dimensional numbers.
   type(free_conditions_object)         :: free_conditions           !< Free stream conditions.
   type(os_object)                      :: os                        !< Running Operating System.
   type(solver_object)                  :: solver                    !< solver models parameters.
   type(time_object)                    :: time                      !< Timing conditions.
   type(grid_dimensions_object)         :: grid_dimensions           !< Grid dimensions.
   type(block_object), allocatable      :: blocks(:)                 !< Blocks list.
   logical                              :: is_cli_parsed=.false.     !< Sentinel of CLI parsing.
   character(999)                       :: file_parameters=''        !< Name of simulation parameters file.
   logical                              :: is_output_verbose=.false. !< Verbose output.
   logical                              :: go_on_fail=.false.        !< Allow/disallow parameters loading failure.
   contains
      ! public methods
      procedure, pass(self) :: allocate_blocks              !< Allocate blocks accordingly to grid dimensions.
      procedure, pass(self) :: description                  !< Return a pretty-formatted description of the simulation.
      procedure, pass(self) :: destroy                      !< Destroy simulation data.
      procedure, pass(self) :: initialize                   !< Initialize simulation.
      procedure, pass(self) :: integrate                    !< Integrate the equations.
      procedure, pass(self) :: load_file_grid               !< Load grid file.
      procedure, pass(self) :: load_file_parameters         !< Load file parameters.
      procedure, pass(self) :: load_input_files             !< Load input files.
      procedure, pass(self) :: parse_command_line_interface !< Parse command line interface.
      procedure, pass(self) :: save_file_grid               !< Save grid file.
      procedure, pass(self) :: save_file_parameters         !< Save file parameters.
      ! private methods
      procedure, pass(self), private :: set_command_line_interface !< Set command line interface.
endtype simulation_object