Module that defines the abstract interface of an observer class as well as some simple observers for extracting real and complex data values from grid functions.
The implementation is found in submodule_observers_implementation.f90.
The initialization routine for the real grid function observer.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(robserver), | intent(inout) | :: | this | The observer that is being initialized. |
||
real(kind=wp), | intent(in), | dimension(:) | :: | rad | A 1d array of real values containing the radii for which observations will be performed. |
|
type(rgf), | intent(in) | :: | coord | A real grid function containing the coordinates. |
||
class(*), | intent(in), | target | :: | object | The real grid function for which observations will be performed. |
The extraction routine for the real grid function observer.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(robserver), | intent(inout) | :: | this | The routine is called on this observer. |
The output routine for the real grid function observer.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(robserver), | intent(inout) | :: | this | The routine is called on this observer. |
The finalizer for the real grid function observer.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(robserver) | :: | this | The real grid function observer to be finalized.. |
The initialization routine for the complex grid function observer.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(cobserver), | intent(inout) | :: | this | The observer that is being initialized. |
||
real(kind=wp), | intent(in), | dimension(:) | :: | rad | A 1d array of real values containing the radii for which observations will be performed. |
|
type(rgf), | intent(in) | :: | coord | A real grid function containing the coordinates. |
||
class(*), | intent(in), | target | :: | object | The complex grid function for which observations will be performed. |
The extraction routine for the complex grid function observer.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(cobserver), | intent(inout) | :: | this | The routine is called on this observer. |
The output routine for the complex grid function observer.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(cobserver), | intent(inout) | :: | this | The routine is called on this observer. |
The finalizer for the complex grid function observer.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(cobserver) | :: | this | The routine is called on this observer. |
A helper routine used by initialization routines to locate the element and node indices corresponding to the provided radii
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in), | dimension(:) | :: | rad | 1d array containing the radii to locate. |
|
type(rgf), | intent(in) | :: | coord | A real grid function containing the coordinates. |
||
integer(kind=ip), | intent(out), | dimension(:), allocatable | :: | elem_index | On output contains the indices of the elements containing the provided radii. |
|
integer(kind=ip), | intent(out), | dimension(:), allocatable | :: | node_index | On output contains the indices of the nodes inside the elements containing the provided radii. |
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.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(observer), | intent(inout) | :: | this | The routine is called on this observer. |
The output routine.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(observer), | intent(inout) | :: | this | The routine is called on this observer. |
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. |
procedure(obs_init_interface), public, pass :: init | The initialization routine. Implementation is deferred to the derived class that actually implements an observer. |
procedure(obs_extract_interface), public, 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), public, pass :: output | The output routine. Implementation is deferred to the derived class that actually implements an observer. |
An observer class that extracts information from real grid functions.
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. |
||
type(rgf), | public, | pointer | :: | p | A pointer to the real grid function that observations will be performed on. |
||
real(kind=wp), | public, | dimension(:), allocatable | :: | extract_data | A 1d-array that will hold the extracted data. On allocation the size is nradii. |
final :: close_robserver | The finalizer. |
procedure, public :: init => robs_init | The initialization routine is provided by robs_init. |
procedure, public :: extract => robs_extract | The extraction routine is provided by robs_extract. |
procedure, public :: output => robs_output | The output routine is provided by robs_output. |
An observer class that extracts information from complex grid functions.
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. |
||
type(cgf), | public, | pointer | :: | p | A pointer to the complex grid function that observations will be performed on. |
||
complex(kind=wp), | public, | dimension(:), allocatable | :: | extract_data | A 1d-array that will hold the extracted data. On allocation the size is nradii. |
final :: close_cobserver | The finalizer. |
procedure, public :: init => cobs_init | The initialization routine is provided by cobs_init. |
procedure, public :: extract => cobs_extract | The extraction routine is provided by cobs_extract. |
procedure, public :: output => cobs_output | The output routine is provided by cobs_output. |