observers Module

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.


Uses

  • module~~observers~~UsesGraph module~observers observers module~grid_function grid_function module~observers->module~grid_function module~kinds kinds module~observers->module~kinds module~grid_function->module~kinds module~element element module~grid_function->module~element module~element->module~kinds

Used by

  • module~~observers~~UsedByGraph module~observers observers module~observers_implementation observers_implementation module~observers_implementation->module~observers module~singular_observer singular_observer module~singular_observer->module~observers program~test test program~test->module~observers program~test->module~singular_observer module~self_force_observer self_force_observer program~test->module~self_force_observer module~self_force_observer->module~observers module~singuler_observer_implementation singuler_observer_implementation module~singuler_observer_implementation->module~singular_observer proc~scal_schw_save_globals_2 scal_schw_save_globals_2 proc~scal_schw_save_globals_2->module~self_force_observer module~self_force_observer_implementation self_force_observer_implementation module~self_force_observer_implementation->module~self_force_observer

Contents


Interfaces

interface

  • public module subroutine robs_init(this, rad, coord, object)

    The initialization routine for the real grid function observer.

    Arguments

    Type IntentOptional AttributesName
    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.

interface

  • public module subroutine robs_extract(this)

    The extraction routine for the real grid function observer.

    Arguments

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

    The routine is called on this observer.

interface

  • public module subroutine robs_output(this)

    The output routine for the real grid function observer.

    Arguments

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

    The routine is called on this observer.

interface

  • public module subroutine close_robserver(this)

    The finalizer for the real grid function observer.

    Arguments

    Type IntentOptional AttributesName
    type(robserver) :: this

    The real grid function observer to be finalized..

interface

  • public module subroutine cobs_init(this, rad, coord, object)

    The initialization routine for the complex grid function observer.

    Arguments

    Type IntentOptional AttributesName
    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.

interface

  • public module subroutine cobs_extract(this)

    The extraction routine for the complex grid function observer.

    Arguments

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

    The routine is called on this observer.

interface

  • public module subroutine cobs_output(this)

    The output routine for the complex grid function observer.

    Arguments

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

    The routine is called on this observer.

interface

  • public module subroutine close_cobserver(this)

    The finalizer for the complex grid function observer.

    Arguments

    Type IntentOptional AttributesName
    type(cobserver) :: this

    The routine is called on this observer.

interface

  • public module subroutine find_indices(rad, coord, elem_index, node_index)

    A helper routine used by initialization routines to locate the element and node indices corresponding to the provided radii

    Read more…

    Arguments

    Type IntentOptional AttributesName
    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.


Abstract Interfaces

abstract interface

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

    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.

abstract interface

  • public subroutine obs_extract_interface(this)

    The extraction routine.

    Arguments

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

    The routine is called on this observer.

abstract interface

  • public subroutine obs_output_interface(this)

    The output routine.

    Arguments

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

    The routine is called on this observer.


Derived Types

type, public, abstract :: observer

An abstract observer interface.

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, 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.

type, public, extends(observer) :: robserver

An observer class that extracts information from real grid functions.

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(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.

Finalizations Procedures

final :: close_robserver

The finalizer.

Type-Bound Procedures

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.

type, public, extends(observer) :: cobserver

An observer class that extracts information from complex grid functions.

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(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.

Finalizations Procedures

final :: close_cobserver

The finalizer.

Type-Bound Procedures

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.