observer Derived Type

type, public, abstract :: observer

An abstract observer interface.


Inherited by

type~~observer~~InheritedByGraph type~observer observer type~robserver robserver type~robserver->type~observer type~cobserver cobserver type~cobserver->type~observer type~sing_observer sing_observer type~sing_observer->type~observer type~sf_observer sf_observer type~sf_observer->type~observer

Contents

Source Code


Components

TypeVisibility AttributesNameInitial
integer(kind=ip), public :: nradii

The number of radii the observer should observe at.

integer(kind=ip), public :: ioo_id

The file unit number this observer should use for output.

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

The name of the observer.

real(kind=wp), public, dimension(:), allocatable:: radii

A 1d-array containing the radii that the observer should observe at. On allocation the size is nradii.

integer(kind=ip), public, dimension(:), allocatable:: elem_index

A 1d-array containing the index of all the elements that contains radii.

integer(kind=ip), public, dimension(:), allocatable:: node_index

A 1d-array containing the node index within all the elements that contains radii.


Type-Bound Procedures

procedure(obs_init_interface), public, deferred, pass :: init

The initialization routine. Implementation is deferred to the derived class that actually implements an observer.

  • subroutine obs_init_interface(this, rad, coord, object) Prototype

    The initialization routine.

    Arguments

    Type IntentOptional AttributesName
    class(observer), intent(inout) :: this

    The observer that is being initialized.

    real(kind=wp), intent(in), dimension(:):: rad

    A 1d-array containing the radii where the observations have to be performed.

    type(rgf), intent(in) :: coord

    A real grid function containing the coordinates of the grid.

    class(*), intent(in), target:: object

    The object on which observations have to be done.

procedure(obs_extract_interface), public, deferred, pass :: extract

The extraction routine that performs the obseration. Implementation is deferred to the derived class that actually implements an observer.

  • subroutine obs_extract_interface(this) Prototype

    The extraction routine.

    Arguments

    Type IntentOptional AttributesName
    class(observer), intent(inout) :: this

    The routine is called on this observer.

procedure(obs_output_interface), public, deferred, pass :: output

The output routine. Implementation is deferred to the derived class that actually implements an observer.

  • subroutine obs_output_interface(this) Prototype

    The output routine.

    Arguments

    Type IntentOptional AttributesName
    class(observer), intent(inout) :: this

    The routine is called on this observer.

Source Code

  type, abstract :: observer
  !! An abstract observer interface.
    integer(ip) :: nradii
    !! The number of radii the observer should observe at.
    integer(ip) :: ioo_id
    !! The file unit number this observer should use for output.
    character(:), allocatable :: vname
    !! The name of the observer.
    real(wp), dimension(:), allocatable :: radii
    !! A 1d-array containing the radii that the observer should observe at.
    !! On allocation the size is [[observer:nradii]].
    integer(ip), dimension(:), allocatable :: elem_index
    !! A 1d-array containing the index of all the elements that contains
    !! [[observer:radii]].
    integer(ip), dimension(:), allocatable :: node_index
    !! A 1d-array containing the node index within all the elements that
    !! contains [[observer:radii]].
  contains
    procedure(obs_init_interface), deferred, pass :: init
    !! The initialization routine. Implementation is deferred to the
    !! derived class that actually implements an observer.
    procedure(obs_extract_interface), deferred, pass :: extract
    !! The extraction routine that performs the obseration. Implementation is
    !! deferred to the derived class that actually implements an observer.
    procedure(obs_output_interface), deferred, pass :: output
    !! The output routine. Implementation is deferred to the derived class
    !! that actually implements an observer.
  end type observer