field_t Derived Type

type, public :: field_t

Memory block type holding both a data field and a pointer to the next block. The field_t type also holds an integer refcount that counts the number of references to this field. User code is currently responsible for incrementing the reference count.


Inherited by

type~~field_t~~InheritedByGraph type~field_t field_t type~field_t->type~field_t next type~abl_t abl_t type~abl_t->type~field_t damp_coeff type~allocator_t allocator_t type~abl_t->type~allocator_t host_allocator type~base_backend_t base_backend_t type~abl_t->type~base_backend_t backend type~adm_t adm_t type~adm_t->type~field_t gamma, disc_id type~adm_t->type~allocator_t host_allocator type~adm_t->type~base_backend_t backend type~allocator_t->type~field_t first type~base_case_t base_case_t type~base_case_t->type~field_t bc_start_u_x, bc_start_v_x, bc_start_w_x, bc_end_u_x, bc_end_v_x, bc_end_w_x, bc_start_u_y, bc_start_v_y, bc_start_w_y, bc_end_u_y, bc_end_v_y, bc_end_w_y type~solver_t solver_t type~base_case_t->type~solver_t solver type~cuda_field_t cuda_field_t type~cuda_field_t->type~field_t type~field_ptr_t field_ptr_t type~field_ptr_t->type~field_t ptr type~flist_t flist_t type~flist_t->type~field_t ptr type~ibm_t ibm_t type~ibm_t->type~field_t ep1 type~ibm_t->type~allocator_t host_allocator type~ibm_t->type~base_backend_t backend type~les_t les_t type~les_t->type~field_t nut, mixing_length_sq type~omptgt_field_t omptgt_field_t type~omptgt_field_t->type~field_t type~solver_t->type~field_t u, v, w, pressure, pressure_vert, dpdx_last, dpdy_last, dpdz_last, vort, qcrit type~solver_t->type~allocator_t host_allocator type~solver_t->type~flist_t species type~solver_t->type~ibm_t ibm type~solver_t->type~les_t les type~solver_t->type~base_backend_t backend type~time_intg_t time_intg_t type~solver_t->type~time_intg_t time_integrator type~vector_calculus_t vector_calculus_t type~solver_t->type~vector_calculus_t vector_calculus type~backend_setup_t backend_setup_t type~backend_setup_t->type~allocator_t allocator, host_allocator, omp_allocator type~backend_setup_t->type~base_backend_t backend type~cuda_allocator_t cuda_allocator_t type~backend_setup_t->type~cuda_allocator_t cuda_allocator type~omptgt_allocator_t omptgt_allocator_t type~backend_setup_t->type~omptgt_allocator_t omptgt_allocator type~cuda_backend_t cuda_backend_t type~backend_setup_t->type~cuda_backend_t cuda_backend type~omp_backend_t omp_backend_t type~backend_setup_t->type~omp_backend_t omp_backend type~omptgt_backend_t omptgt_backend_t type~backend_setup_t->type~omptgt_backend_t omptgt_backend type~base_backend_t->type~allocator_t allocator type~case_abl_t case_abl_t type~case_abl_t->type~abl_t abl type~case_abl_t->type~base_case_t type~abl_diagnostics_t abl_diagnostics_t type~case_abl_t->type~abl_diagnostics_t diagnostics type~case_channel_t case_channel_t type~case_channel_t->type~base_case_t type~case_cylinder_t case_cylinder_t type~case_cylinder_t->type~base_case_t type~case_generic_t case_generic_t type~case_generic_t->type~base_case_t type~case_tgv_t case_tgv_t type~case_tgv_t->type~base_case_t type~case_wind_turbine_t case_wind_turbine_t type~case_wind_turbine_t->type~base_case_t type~cuda_allocator_t->type~allocator_t type~omptgt_allocator_t->type~allocator_t type~time_intg_t->type~allocator_t allocator type~time_intg_t->type~flist_t olds type~time_intg_t->type~base_backend_t backend type~abl_diagnostics_t->type~base_backend_t backend type~cuda_backend_t->type~base_backend_t type~omp_backend_t->type~base_backend_t type~omptgt_backend_t->type~base_backend_t type~vector_calculus_t->type~base_backend_t backend

Components

Type Visibility Attributes Name Initial
class(field_t), public, pointer :: next
real(kind=dp), public, pointer, contiguous :: data(:,:,:)
integer, public :: dir
integer, public :: data_loc
integer, public :: refcount = 0
integer, public :: id

An integer identifying the memory block.


Constructor

public interface field_t

  • public function field_init(ngrid, next, id) result(f)

    Arguments

    Type IntentOptional Attributes Name
    integer, intent(in) :: ngrid

    next matches the polymorphic next component it is assigned to, so the caller hands over the list head as-is (see omptgt_field_init).

    class(field_t), intent(in), pointer :: next
    integer, intent(in) :: id

    next matches the polymorphic next component it is assigned to, so the caller hands over the list head as-is (see omptgt_field_init).

    Return Value type(field_t)


Type-Bound Procedures

procedure, public :: fill

  • public subroutine fill(self, c)

    Arguments

    Type IntentOptional Attributes Name
    class(field_t) :: self
    real(kind=dp), intent(in) :: c

procedure, public :: get_shape

  • public function get_shape(self) result(dims)

    Arguments

    Type IntentOptional Attributes Name
    class(field_t) :: self

    Return Value integer, (3)

procedure, public :: set_shape

  • public subroutine set_shape(self, dims)

    Arguments

    Type IntentOptional Attributes Name
    class(field_t) :: self
    integer, intent(in) :: dims(3)

procedure, public :: set_data_loc

  • public subroutine set_data_loc(self, data_loc)

    Arguments

    Type IntentOptional Attributes Name
    class(field_t) :: self
    integer, intent(in) :: data_loc

procedure, public :: get_dev_ptr

  • public function get_dev_ptr(self) result(ptr)

    Address of the block's storage in a separate device allocation, null for a host block. A device field type that keeps its storage behind a raw device pointer overrides this, letting its backend reach the storage by dynamic dispatch rather than by a type query.

    Arguments

    Type IntentOptional Attributes Name
    class(field_t) :: self

    Return Value type(c_ptr)