An abstract observer interface.
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
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. |
The initialization routine. Implementation is deferred to the derived class that actually implements an observer.
The initialization routine.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
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. |
The extraction routine that performs the obseration. Implementation is deferred to the derived class that actually implements an observer.
The extraction routine.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(observer), | intent(inout) | :: | this | The routine is called on this observer. |
The output routine. Implementation is deferred to the derived class that actually implements an observer.
The output routine.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(observer), | intent(inout) | :: | this | The routine is called on this observer. |
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