data_storage_m Module

Module containing the definition and interface of the data storage types. The data storage includes storaging data_arrays with capabilities for MPI halos. These can be exchanged automatically by calling the start_exchange and finish_exchange procedure of the types.



Interfaces

interface

  • public module subroutine initialize_parent(this, dcomm_handler, dimensions)

    Initializes the parent type

    Arguments

    Type IntentOptional Attributes Name
    class(data_storage_t), intent(inout) :: this

    Instance of the type

    type(dcomm_handler_t), intent(in), pointer :: dcomm_handler

    MPI communication handler

    integer, intent(in) :: dimensions

    Number of dimensions

interface

  • public module function get_physical_dimension_5d(this, ex_dim) result(res)

    Returns the physical dimension associated to ex_dim via dim_permut. This corresponds to the inverse of dim_permut

    Arguments

    Type IntentOptional Attributes Name
    class(data_storage_5d_t), intent(in) :: this

    Instance of the type

    integer, intent(in) :: ex_dim

    Exchange dimension

    Return Value integer

interface

  • public module function get_mailbox_index_5d(this, ex_dim) result(mb_ind)

    Returns the index of the mailbox storage reserved for the exchange dimension

    Arguments

    Type IntentOptional Attributes Name
    class(data_storage_5d_t), intent(in) :: this

    Instance of the type

    integer, intent(in) :: ex_dim

    Exchange dimension

    Return Value integer

interface

  • public module function has_edge_ghosts_5d(this, ex_dim, comm_dim) result(res)

    Returns 1 if the ghost cells along the comm_dim dimensions are included in MPI exchange when exchanging along the ex_dim dimension. Required only for the spectral approach. Otherwise, returns 0.

    Arguments

    Type IntentOptional Attributes Name
    class(data_storage_5d_t), intent(in) :: this

    Instance of the type

    integer, intent(in) :: ex_dim

    Exchange dimension

    integer, intent(in) :: comm_dim

    Exchange dimension including the ghost cells

    Return Value integer

interface

  • public module subroutine initialize_5d(this, dcomm_handler, init_value)

    Initializes the type

    Arguments

    Type IntentOptional Attributes Name
    class(data_storage_5d_t), intent(inout) :: this

    Instance of the type

    type(dcomm_handler_t), intent(in), pointer :: dcomm_handler

    MPI communication handler

    real(kind=GP), intent(in), optional :: init_value

    Optional initial value to uniformly set to the array

interface

  • public module subroutine start_exchange_5d(this, ex_dim)

    Start the exchange of the ghost cells via mpi. This subroutine returns immediately. Other calculations can be performed while the exchange is ongoing.

    Arguments

    Type IntentOptional Attributes Name
    class(data_storage_5d_t), intent(inout) :: this

    Instance of the type

    integer, intent(in) :: ex_dim

    Exchange dimension, PHI, VP and MU exchange is possible

interface

  • public module subroutine finish_exchange_5d(this, ex_dim)

    Finishes the exchange of the ghost cells via mpi. After this subroutine has returned it is guaranteed that the information of the ghost cells is present in the storage.

    Arguments

    Type IntentOptional Attributes Name
    class(data_storage_5d_t), intent(inout) :: this

    Instance of the type

    integer, intent(in) :: ex_dim

    Exchange dimension, PHI, VP and MU exchange is possible

interface

  • public module subroutine initialize_cpu_5d(this, dcomm_handler, init_value)

    Arguments

    Type IntentOptional Attributes Name
    class(data_storage_cpu_5d_t), intent(inout) :: this
    type(dcomm_handler_t), intent(in), pointer :: dcomm_handler
    real(kind=GP), intent(in), optional :: init_value

interface

  • public module subroutine start_exchange_cpu_5d(this, ex_dim)

    Arguments

    Type IntentOptional Attributes Name
    class(data_storage_cpu_5d_t), intent(inout) :: this
    integer, intent(in) :: ex_dim

interface

  • public module subroutine finish_exchange_cpu_5d(this, ex_dim)

    Arguments

    Type IntentOptional Attributes Name
    class(data_storage_cpu_5d_t), intent(inout) :: this
    integer, intent(in) :: ex_dim

interface

  • public module subroutine initialize_4d(this, dcomm_handler, n_mom, n_spec, init_value)

    Initializes the type

    Arguments

    Type IntentOptional Attributes Name
    class(data_storage_4d_t), intent(inout) :: this

    Instance of the type

    type(dcomm_handler_t), intent(in), pointer :: dcomm_handler

    MPI communication handler

    integer, intent(in) :: n_mom

    Number of neutrals moments

    integer, intent(in) :: n_spec

    Number of neutrals species

    real(kind=GP), intent(in), optional :: init_value

    Optional initial value to uniformly set to the array

interface

  • public module subroutine start_exchange_4d(this)

    Start the exchange of the ghost cells via mpi. This subroutine returns immediately. Other calculations can be performed while the exchange is ongoing.

    Arguments

    Type IntentOptional Attributes Name
    class(data_storage_4d_t), intent(inout) :: this

    Instance of the type

interface

  • public module subroutine finish_exchange_4d(this)

    Finishes the exchange of the ghost cells via mpi. After this subroutine has returned it is guaranteed that the information of the ghost cells is present in the storage.

    Arguments

    Type IntentOptional Attributes Name
    class(data_storage_4d_t), intent(inout) :: this

    Instance of the type

interface

  • public module subroutine initialize_cpu_4d(this, dcomm_handler, n_mom, n_spec, init_value)

    Arguments

    Type IntentOptional Attributes Name
    class(data_storage_cpu_4d_t), intent(inout) :: this
    type(dcomm_handler_t), intent(in), pointer :: dcomm_handler
    integer, intent(in) :: n_mom
    integer, intent(in) :: n_spec
    real(kind=GP), intent(in), optional :: init_value

interface

  • public module subroutine start_exchange_cpu_4d(this)

    Arguments

    Type IntentOptional Attributes Name
    class(data_storage_cpu_4d_t), intent(inout) :: this

interface

  • public module subroutine finish_exchange_cpu_4d(this)

    Arguments

    Type IntentOptional Attributes Name
    class(data_storage_cpu_4d_t), intent(inout) :: this

interface

  • public module subroutine initialize_2d(this, dcomm_handler, init_value)

    Initializes the type

    Arguments

    Type IntentOptional Attributes Name
    class(data_storage_2d_t), intent(inout) :: this

    Instance of the type

    type(dcomm_handler_t), intent(in), pointer :: dcomm_handler

    MPI communication handler

    real(kind=GP), intent(in), optional :: init_value

    Optional initial value to uniformly set to the array

interface

  • public module subroutine start_exchange_2d(this)

    Start the exchange of the ghost cells via mpi. This subroutine returns immediately. Other calculations can be performed while the exchange is ongoing.

    Arguments

    Type IntentOptional Attributes Name
    class(data_storage_2d_t), intent(inout) :: this

    Instance of the type

interface

  • public module subroutine finish_exchange_2d(this)

    Finishes the exchange of the ghost cells via mpi. After this subroutine has returned it is guaranteed that the information of the ghost cells is present in the storage.

    Arguments

    Type IntentOptional Attributes Name
    class(data_storage_2d_t), intent(inout) :: this

    Instance of the type

interface

  • public module subroutine initialize_cpu_2d(this, dcomm_handler, init_value)

    Arguments

    Type IntentOptional Attributes Name
    class(data_storage_cpu_2d_t), intent(inout) :: this
    type(dcomm_handler_t), intent(in), pointer :: dcomm_handler
    real(kind=GP), intent(in), optional :: init_value

interface

  • public module subroutine start_exchange_cpu_2d(this)

    Arguments

    Type IntentOptional Attributes Name
    class(data_storage_cpu_2d_t), intent(inout) :: this

interface

  • public module subroutine finish_exchange_cpu_2d(this)

    Arguments

    Type IntentOptional Attributes Name
    class(data_storage_cpu_2d_t), intent(inout) :: this

interface

  • public module subroutine initialize_gpu_5d(this, dcomm_handler, init_value)

    Arguments

    Type IntentOptional Attributes Name
    class(data_storage_gpu_5d_t), intent(inout) :: this
    type(dcomm_handler_t), intent(in), pointer :: dcomm_handler
    real(kind=GP), intent(in), optional :: init_value

interface

  • public module subroutine start_exchange_gpu_5d(this, ex_dim)

    Arguments

    Type IntentOptional Attributes Name
    class(data_storage_gpu_5d_t), intent(inout) :: this
    integer, intent(in) :: ex_dim

interface

  • public module subroutine finish_exchange_gpu_5d(this, ex_dim)

    Arguments

    Type IntentOptional Attributes Name
    class(data_storage_gpu_5d_t), intent(inout) :: this
    integer, intent(in) :: ex_dim

interface

  • public module subroutine finalize_gpu_5d(this)

    Arguments

    Type IntentOptional Attributes Name
    type(data_storage_gpu_5d_t), intent(inout) :: this

interface

  • public module subroutine initialize_gpu_4d(this, dcomm_handler, n_mom, n_spec, init_value)

    Arguments

    Type IntentOptional Attributes Name
    class(data_storage_gpu_4d_t), intent(inout) :: this
    type(dcomm_handler_t), intent(in), pointer :: dcomm_handler
    integer, intent(in) :: n_mom
    integer, intent(in) :: n_spec
    real(kind=GP), intent(in), optional :: init_value

interface

  • public module subroutine start_exchange_gpu_4d(this)

    Arguments

    Type IntentOptional Attributes Name
    class(data_storage_gpu_4d_t), intent(inout) :: this

interface

  • public module subroutine finish_exchange_gpu_4d(this)

    Arguments

    Type IntentOptional Attributes Name
    class(data_storage_gpu_4d_t), intent(inout) :: this

interface

  • public module subroutine finalize_gpu_4d(this)

    Arguments

    Type IntentOptional Attributes Name
    type(data_storage_gpu_4d_t), intent(inout) :: this

interface

  • public module subroutine initialize_gpu_2d(this, dcomm_handler, init_value)

    Arguments

    Type IntentOptional Attributes Name
    class(data_storage_gpu_2d_t), intent(inout) :: this
    type(dcomm_handler_t), intent(in), pointer :: dcomm_handler
    real(kind=GP), intent(in), optional :: init_value

interface

  • public module subroutine start_exchange_gpu_2d(this)

    Arguments

    Type IntentOptional Attributes Name
    class(data_storage_gpu_2d_t), intent(inout) :: this

interface

  • public module subroutine finish_exchange_gpu_2d(this)

    Arguments

    Type IntentOptional Attributes Name
    class(data_storage_gpu_2d_t), intent(inout) :: this

interface

  • public module subroutine finalize_gpu_2d(this)

    Arguments

    Type IntentOptional Attributes Name
    type(data_storage_gpu_2d_t), intent(inout) :: this

Derived Types

type, public, abstract ::  data_storage_t

Type to store data for the state_vector

Type-Bound Procedures

procedure, public :: get_size
procedure, public :: get_dimension
procedure, public :: get_num_mail_partners

type, public, abstract, extends(data_storage_t) ::  data_storage_5d_t

Type to store 5 dimensional fields with possible exchange in PHI, VP and MU dimensions

Components

Type Visibility Attributes Name Initial
type(mailbox_t), public, dimension(3) :: mailboxes

Mailbox buffering data for boundary exchange in PHI, VP and MU dimension

integer, public :: n_ex_dims = 3

Number of exchange dimension, currently PHI, VP and MU exchange is possible

Type-Bound Procedures

procedure, public :: get_size
procedure, public :: get_dimension
procedure, public :: get_num_mail_partners
procedure(initialize_5d), public, deferred :: initialize
procedure(start_exchange_5d), public, deferred :: start_exchange
procedure(finish_exchange_5d), public, deferred :: finish_exchange
procedure, public :: get_data_pointer => get_data_array_pointer_5d
procedure, public :: get_pointer => get_pointer_5d
procedure, public :: get_pointer_stripped => get_pointer_stripped_5d
procedure, public :: shape => shape_5d
procedure, public :: shape_stripped => shape_stripped_5d
procedure, public :: lbound => lbound_5d
procedure, public :: ubound => ubound_5d
procedure, public :: lbound_stripped => lbound_stripped_5d
procedure, public :: ubound_stripped => ubound_stripped_5d
procedure, public :: update_host => update_host_5d
procedure, public :: update_device => update_device_5d

type, public, extends(data_storage_5d_t) ::  data_storage_cpu_5d_t

Type to store 5 dimensional fields on the CPU

Components

Type Visibility Attributes Name Initial
type(mailbox_t), public, dimension(3) :: mailboxes

Mailbox buffering data for boundary exchange in PHI, VP and MU dimension

integer, public :: n_ex_dims = 3

Number of exchange dimension, currently PHI, VP and MU exchange is possible

Type-Bound Procedures

procedure, public :: get_size
procedure, public :: get_dimension
procedure, public :: get_num_mail_partners
procedure, public :: get_data_pointer => get_data_array_pointer_5d
procedure, public :: get_pointer => get_pointer_5d
procedure, public :: get_pointer_stripped => get_pointer_stripped_5d
procedure, public :: shape => shape_5d
procedure, public :: shape_stripped => shape_stripped_5d
procedure, public :: lbound => lbound_5d
procedure, public :: ubound => ubound_5d
procedure, public :: lbound_stripped => lbound_stripped_5d
procedure, public :: ubound_stripped => ubound_stripped_5d
procedure, public :: update_host => update_host_5d
procedure, public :: update_device => update_device_5d
procedure, public :: initialize => initialize_cpu_5d
procedure, public :: start_exchange => start_exchange_cpu_5d
procedure, public :: finish_exchange => finish_exchange_cpu_5d

type, public, abstract, extends(data_storage_t) ::  data_storage_4d_t

Type to store 4 dimensional fields with exchange in the PHI dimension

Components

Type Visibility Attributes Name Initial
type(mailbox_t), public :: mailbox

Mailbox buffering data for boundary exchange in PHI dimension

Type-Bound Procedures

procedure, public :: get_size
procedure, public :: get_dimension
procedure, public :: get_num_mail_partners
procedure(initialize_4d), public, deferred :: initialize
procedure(start_exchange_4d), public, deferred :: start_exchange
procedure(finish_exchange_4d), public, deferred :: finish_exchange
procedure, public :: get_data_pointer => get_data_array_pointer_4d
procedure, public :: get_pointer => get_pointer_4d
procedure, public :: get_pointer_stripped => get_pointer_stripped_4d
procedure, public :: shape => shape_4d
procedure, public :: shape_stripped => shape_stripped_4d
procedure, public :: lbound => lbound_4d
procedure, public :: ubound => ubound_4d
procedure, public :: lbound_stripped => lbound_stripped_4d
procedure, public :: ubound_stripped => ubound_stripped_4d
procedure, public :: update_host => update_host_4d
procedure, public :: update_device => update_device_4d

type, public, extends(data_storage_4d_t) ::  data_storage_cpu_4d_t

Type to store 4 dimensional fields on the CPU

Components

Type Visibility Attributes Name Initial
type(mailbox_t), public :: mailbox

Mailbox buffering data for boundary exchange in PHI dimension

Type-Bound Procedures

procedure, public :: get_size
procedure, public :: get_dimension
procedure, public :: get_num_mail_partners
procedure, public :: get_data_pointer => get_data_array_pointer_4d
procedure, public :: get_pointer => get_pointer_4d
procedure, public :: get_pointer_stripped => get_pointer_stripped_4d
procedure, public :: shape => shape_4d
procedure, public :: shape_stripped => shape_stripped_4d
procedure, public :: lbound => lbound_4d
procedure, public :: ubound => ubound_4d
procedure, public :: lbound_stripped => lbound_stripped_4d
procedure, public :: ubound_stripped => ubound_stripped_4d
procedure, public :: update_host => update_host_4d
procedure, public :: update_device => update_device_4d
procedure, public :: initialize => initialize_cpu_4d
procedure, public :: start_exchange => start_exchange_cpu_4d
procedure, public :: finish_exchange => finish_exchange_cpu_4d

type, public, abstract, extends(data_storage_t) ::  data_storage_2d_t

Type to store 2 dimensional fields with exchange in the PHI dimension

Components

Type Visibility Attributes Name Initial
type(mailbox_t), public :: mailbox

Mailbox buffering data for boundary exchange in PHI dimension

Type-Bound Procedures

procedure, public :: get_size
procedure, public :: get_dimension
procedure, public :: get_num_mail_partners
procedure(initialize_2d), public, deferred :: initialize
procedure(start_exchange_2d), public, deferred :: start_exchange
procedure(finish_exchange_2d), public, deferred :: finish_exchange
procedure, public :: get_data_pointer => get_data_array_pointer_2d
procedure, public :: get_pointer => get_pointer_2d
procedure, public :: get_pointer_stripped => get_pointer_stripped_2d
procedure, public :: shape => shape_2d
procedure, public :: shape_stripped => shape_stripped_2d
procedure, public :: lbound => lbound_2d
procedure, public :: ubound => ubound_2d
procedure, public :: lbound_stripped => lbound_stripped_2d
procedure, public :: ubound_stripped => ubound_stripped_2d
procedure, public :: update_host => update_host_2d
procedure, public :: update_device => update_device_2d

type, public, extends(data_storage_2d_t) ::  data_storage_cpu_2d_t

Type to store 2 dimensional fields on the CPU

Components

Type Visibility Attributes Name Initial
type(mailbox_t), public :: mailbox

Mailbox buffering data for boundary exchange in PHI dimension

Type-Bound Procedures

procedure, public :: get_size
procedure, public :: get_dimension
procedure, public :: get_num_mail_partners
procedure, public :: get_data_pointer => get_data_array_pointer_2d
procedure, public :: get_pointer => get_pointer_2d
procedure, public :: get_pointer_stripped => get_pointer_stripped_2d
procedure, public :: shape => shape_2d
procedure, public :: shape_stripped => shape_stripped_2d
procedure, public :: lbound => lbound_2d
procedure, public :: ubound => ubound_2d
procedure, public :: lbound_stripped => lbound_stripped_2d
procedure, public :: ubound_stripped => ubound_stripped_2d
procedure, public :: update_host => update_host_2d
procedure, public :: update_device => update_device_2d
procedure, public :: initialize => initialize_cpu_2d
procedure, public :: start_exchange => start_exchange_cpu_2d
procedure, public :: finish_exchange => finish_exchange_cpu_2d

type, public, extends(data_storage_5d_t) ::  data_storage_gpu_5d_t

Type to store 5 dimensional fields on the GPU

Components

Type Visibility Attributes Name Initial
type(mailbox_t), public, dimension(3) :: mailboxes

Mailbox buffering data for boundary exchange in PHI, VP and MU dimension

integer, public :: n_ex_dims = 3

Number of exchange dimension, currently PHI, VP and MU exchange is possible

Finalizations Procedures

final :: finalize_gpu_5d

Type-Bound Procedures

procedure, public :: get_size
procedure, public :: get_dimension
procedure, public :: get_num_mail_partners
procedure, public :: get_data_pointer => get_data_array_pointer_5d
procedure, public :: get_pointer => get_pointer_5d
procedure, public :: get_pointer_stripped => get_pointer_stripped_5d
procedure, public :: shape => shape_5d
procedure, public :: shape_stripped => shape_stripped_5d
procedure, public :: lbound => lbound_5d
procedure, public :: ubound => ubound_5d
procedure, public :: lbound_stripped => lbound_stripped_5d
procedure, public :: ubound_stripped => ubound_stripped_5d
procedure, public :: update_host => update_host_5d
procedure, public :: update_device => update_device_5d
procedure, public :: initialize => initialize_gpu_5d
procedure, public :: start_exchange => start_exchange_gpu_5d
procedure, public :: finish_exchange => finish_exchange_gpu_5d
procedure, public :: get_cxx_pointer => get_data_storage_5d_cxx_pointer

type, public, extends(data_storage_4d_t) ::  data_storage_gpu_4d_t

Type to store 4 dimensional fields on the GPU

Components

Type Visibility Attributes Name Initial
type(mailbox_t), public :: mailbox

Mailbox buffering data for boundary exchange in PHI dimension

Finalizations Procedures

final :: finalize_gpu_4d

Type-Bound Procedures

procedure, public :: get_size
procedure, public :: get_dimension
procedure, public :: get_num_mail_partners
procedure, public :: get_data_pointer => get_data_array_pointer_4d
procedure, public :: get_pointer => get_pointer_4d
procedure, public :: get_pointer_stripped => get_pointer_stripped_4d
procedure, public :: shape => shape_4d
procedure, public :: shape_stripped => shape_stripped_4d
procedure, public :: lbound => lbound_4d
procedure, public :: ubound => ubound_4d
procedure, public :: lbound_stripped => lbound_stripped_4d
procedure, public :: ubound_stripped => ubound_stripped_4d
procedure, public :: update_host => update_host_4d
procedure, public :: update_device => update_device_4d
procedure, public :: initialize => initialize_gpu_4d
procedure, public :: start_exchange => start_exchange_gpu_4d
procedure, public :: finish_exchange => finish_exchange_gpu_4d
procedure, public :: get_cxx_pointer => get_data_storage_4d_cxx_pointer

type, public, extends(data_storage_2d_t) ::  data_storage_gpu_2d_t

Type to store 5 dimensional fields on the GPU

Components

Type Visibility Attributes Name Initial
type(mailbox_t), public :: mailbox

Mailbox buffering data for boundary exchange in PHI dimension

Finalizations Procedures

final :: finalize_gpu_2d

Type-Bound Procedures

procedure, public :: get_size
procedure, public :: get_dimension
procedure, public :: get_num_mail_partners
procedure, public :: get_data_pointer => get_data_array_pointer_2d
procedure, public :: get_pointer => get_pointer_2d
procedure, public :: get_pointer_stripped => get_pointer_stripped_2d
procedure, public :: shape => shape_2d
procedure, public :: shape_stripped => shape_stripped_2d
procedure, public :: lbound => lbound_2d
procedure, public :: ubound => ubound_2d
procedure, public :: lbound_stripped => lbound_stripped_2d
procedure, public :: ubound_stripped => ubound_stripped_2d
procedure, public :: update_host => update_host_2d
procedure, public :: update_device => update_device_2d
procedure, public :: initialize => initialize_gpu_2d
procedure, public :: start_exchange => start_exchange_gpu_2d
procedure, public :: finish_exchange => finish_exchange_gpu_2d
procedure, public :: get_cxx_pointer => get_data_storage_2d_cxx_pointer

type, public, bind(C) ::  data_storage_data_t

Fortran/C++ interoperable structure of the class members relevant to data_storage_t

Components

Type Visibility Attributes Name Initial
integer(kind=C_INT32_T), public :: array_dim

Number of dimension or rank of the array

integer(kind=C_INT32_T), public :: n_ex_dims

Number of echange dimension

type(C_PTR), public :: number_of_elements_ptr

C pointer to the array specifying the number of elements of the stored data

type(C_PTR), public :: number_of_ghost_cells_ptr

C pointer to the array specifying the number of ghost cells

type(C_PTR), public :: number_of_data_cells_ptr

C pointer to the array specifying the number of data cells

type(C_PTR), public :: number_of_mail_partners_ptr

C pointer to the array specifying the number of mail partners for mpi ghost exchange

type(C_PTR), public :: dim_permut_ptr

C pointer to the array specifying the order of the dimensions in storage


Functions

public function get_data_array_pointer_5d(this) result(ptr)

Return a pointer of the data array class object containing 5d array

Arguments

Type IntentOptional Attributes Name
class(data_storage_5d_t), intent(inout), target :: this

Instance of the type

Return Value class(data_array_5d_t), pointer

public function get_pointer_5d(this) result(ptr)

Returns a pointer of rank 5 pointing to the data stored in data_storage_5d_t

Arguments

Type IntentOptional Attributes Name
class(data_storage_5d_t), intent(inout), target :: this

Instance of the type

Return Value real(kind=GP), contiguous, pointer, dimension(:,:,:,:,:)

public function get_pointer_stripped_5d(this) result(ptr)

Returns a pointer of rank 5 pointing to the data stored in data_storage_5d_cpu_t without ghost cells NOTE: The pointer is not contiguous anymore

Arguments

Type IntentOptional Attributes Name
class(data_storage_5d_t), intent(inout), target :: this

Return Value real(kind=GP), pointer, dimension(:,:,:,:,:)

public function get_data_array_pointer_4d(this) result(ptr)

Return a pointer of the data array class object containing 4d array

Arguments

Type IntentOptional Attributes Name
class(data_storage_4d_t), intent(inout), target :: this

Instance of the type

Return Value class(data_array_4d_t), pointer

public function get_pointer_4d(this) result(ptr)

Returns a pointer of rank 4 pointing to the data stored in data_storage_4d_t

Arguments

Type IntentOptional Attributes Name
class(data_storage_4d_t), intent(inout), target :: this

Instance of the type

Return Value real(kind=GP), contiguous, pointer, dimension(:,:,:,:)

public function get_pointer_stripped_4d(this) result(ptr)

Returns a pointer of rank 4 pointing to the data stored in data_storage_4d_cpu_t without ghost cells NOTE: The pointer is not contiguous anymore

Arguments

Type IntentOptional Attributes Name
class(data_storage_4d_t), intent(inout), target :: this

Return Value real(kind=GP), pointer, dimension(:,:,:,:)

public function get_data_array_pointer_2d(this) result(ptr)

Return a pointer of the data array class object containing 2d array

Arguments

Type IntentOptional Attributes Name
class(data_storage_2d_t), intent(inout), target :: this

Instance of the type

Return Value class(data_array_2d_t), pointer

public function get_pointer_2d(this) result(ptr)

Returns a pointer of rank 5 pointing to the data stored in data_storage_2d_t

Arguments

Type IntentOptional Attributes Name
class(data_storage_2d_t), intent(inout), target :: this

Instance of the type

Return Value real(kind=GP), contiguous, pointer, dimension(:,:)

public function get_pointer_stripped_2d(this) result(ptr)

Returns a pointer of rank 2 pointing to the data stored in data_storage_2d_cpu_t without ghost cells NOTE: The pointer is not contiguous anymore

Arguments

Type IntentOptional Attributes Name
class(data_storage_2d_t), intent(inout), target :: this

Return Value real(kind=GP), pointer, dimension(:,:)

public function lbound_stripped_5d(this) result(lb_stripped)

Returns the lower bound of the data storage without ghost cells

Arguments

Type IntentOptional Attributes Name
class(data_storage_5d_t) :: this

Instance of the type

Return Value integer, (5)

public function ubound_stripped_5d(this) result(ub_stripped)

Returns the upper bound of the data storage without ghost cells

Arguments

Type IntentOptional Attributes Name
class(data_storage_5d_t) :: this

Instance of the type

Return Value integer, (5)

public function lbound_5d(this) result(lb)

Returns the lower bound of the data storage with ghost cells

Arguments

Type IntentOptional Attributes Name
class(data_storage_5d_t) :: this

Instance of the type

Return Value integer, (5)

public function ubound_5d(this) result(ub)

Returns the upper bound of the data storage with ghost cells

Arguments

Type IntentOptional Attributes Name
class(data_storage_5d_t) :: this

Instance of the type

Return Value integer, (5)

public function shape_5d(this) result(shp)

Returns the upper bound of the data storage with ghost cells

Arguments

Type IntentOptional Attributes Name
class(data_storage_5d_t) :: this

Instance of the type

Return Value integer, (5)

public function shape_stripped_5d(this) result(shp)

Returns the shape of the data storage without ghost cells

Arguments

Type IntentOptional Attributes Name
class(data_storage_5d_t) :: this

Instance of the type

Return Value integer, (5)

public function lbound_stripped_4d(this) result(lb_stripped)

Returns the lower bound of the data storage without ghost cells

Arguments

Type IntentOptional Attributes Name
class(data_storage_4d_t) :: this

Instance of the type

Return Value integer, (4)

public function ubound_stripped_4d(this) result(ub_stripped)

Returns the upper bound of the data storage without ghost cells

Arguments

Type IntentOptional Attributes Name
class(data_storage_4d_t) :: this

Instance of the type

Return Value integer, (4)

public function lbound_4d(this) result(lb)

Returns the lower bound of the data storage with ghost cells

Arguments

Type IntentOptional Attributes Name
class(data_storage_4d_t) :: this

Instance of the type

Return Value integer, (4)

public function ubound_4d(this) result(ub)

Returns the upper bound of the data storage with ghost cells

Arguments

Type IntentOptional Attributes Name
class(data_storage_4d_t) :: this

Instance of the type

Return Value integer, (4)

public function shape_4d(this) result(shp)

Returns the upper bound of the data storage with ghost cells

Arguments

Type IntentOptional Attributes Name
class(data_storage_4d_t) :: this

Instance of the type

Return Value integer, (4)

public function shape_stripped_4d(this) result(shp)

Returns the shape of the data storage without ghost cells

Arguments

Type IntentOptional Attributes Name
class(data_storage_4d_t) :: this

Instance of the type

Return Value integer, (4)

public function lbound_stripped_2d(this) result(lb_stripped)

Returns the lower bound of the data storage without ghost cells

Arguments

Type IntentOptional Attributes Name
class(data_storage_2d_t) :: this

Instance of the type

Return Value integer, (2)

public function ubound_stripped_2d(this) result(ub_stripped)

Returns the upper bound of the data storage without ghost cells

Arguments

Type IntentOptional Attributes Name
class(data_storage_2d_t) :: this

Instance of the type

Return Value integer, (2)

public function lbound_2d(this) result(lb)

Returns the lower bound of the data storage with ghost cells

Arguments

Type IntentOptional Attributes Name
class(data_storage_2d_t) :: this

Instance of the type

Return Value integer, (2)

public function ubound_2d(this) result(ub)

Returns the upper bound of the data storage with ghost cells

Arguments

Type IntentOptional Attributes Name
class(data_storage_2d_t) :: this

Instance of the type

Return Value integer, (2)

public function shape_2d(this) result(shp)

Returns the shape of the data storage with ghost cells

Arguments

Type IntentOptional Attributes Name
class(data_storage_2d_t) :: this

Instance of the type

Return Value integer, (2)

public function shape_stripped_2d(this) result(shp)

Returns the shape of the data storage without ghost cells

Arguments

Type IntentOptional Attributes Name
class(data_storage_2d_t) :: this

Instance of the type

Return Value integer, (2)

public pure function get_size(this) result(res)

Returns the number of dimensions

Arguments

Type IntentOptional Attributes Name
class(data_storage_t), intent(in) :: this

Instance of the type

Return Value integer

public pure function get_dimension(this) result(res)

Returns the total number of elements in storage

Arguments

Type IntentOptional Attributes Name
class(data_storage_t), intent(in) :: this

Instance of the type

Return Value integer

public function get_num_mail_partners(this) result(res)

Returns the number of ghost cells

Arguments

Type IntentOptional Attributes Name
class(data_storage_t) :: this

Instance of the type

Return Value integer, dimension(5)

public function get_data_storage_5d_cxx_pointer(this) result(pptr)

Returns the C pointer of the data_storage_gpu_5d_t C++ class instance pointer

Arguments

Type IntentOptional Attributes Name
class(data_storage_gpu_5d_t), intent(inout), target :: this

Instance of the type

Return Value type(C_PTR), pointer

public function get_data_storage_4d_cxx_pointer(this) result(pptr)

Returns the C pointer of the data_storage_gpu_4d_t C++ class instance pointer

Arguments

Type IntentOptional Attributes Name
class(data_storage_gpu_4d_t), intent(inout), target :: this

Instance of the type

Return Value type(C_PTR), pointer

public function get_data_storage_2d_cxx_pointer(this) result(pptr)

Returns the C pointer of the data_storage_gpu_2d_t C++ class instance pointer

Arguments

Type IntentOptional Attributes Name
class(data_storage_gpu_2d_t), intent(inout), target :: this

Instance of the type

Return Value type(C_PTR), pointer


Subroutines

public subroutine update_host_5d(this)

Update the 5D array on CPU from GPU. This does nothing if no specific GPU backend is set.

Arguments

Type IntentOptional Attributes Name
class(data_storage_5d_t), intent(inout) :: this

Instance of the type

public subroutine update_device_5d(this)

Update the 5D array on GPU from CPU. This does nothing if no specific GPU backend is set.

Arguments

Type IntentOptional Attributes Name
class(data_storage_5d_t), intent(inout) :: this

Instance of the type

public subroutine update_host_4d(this)

Update the 4D array on CPU from GPU. This does nothing if no specific GPU backend is set.

Arguments

Type IntentOptional Attributes Name
class(data_storage_4d_t), intent(inout) :: this

Instance of the type

public subroutine update_device_4d(this)

Update the 4D array on GPU from CPU. This does nothing if no specific GPU backend is set.

Arguments

Type IntentOptional Attributes Name
class(data_storage_4d_t), intent(inout) :: this

Instance of the type

public subroutine update_host_2d(this)

Update the 2D array on CPU from GPU. This does nothing if no specific GPU backend is set.

Arguments

Type IntentOptional Attributes Name
class(data_storage_2d_t), intent(inout) :: this

Instance of the type

public subroutine update_device_2d(this)

Update the 5D array on GPU from CPU. This does nothing if no specific GPU backend is set.

Arguments

Type IntentOptional Attributes Name
class(data_storage_2d_t), intent(inout) :: this

Instance of the type