Skip to content

mod_abstract_flat_data

Lines: 100 | Visibility: private

Dependencies

Uses

module~~mod_abstract_flat_data~~UsesGraph module~mod_abstract_flat_data mod_abstract_flat_data module~mod_io mod_io module~mod_abstract_flat_data->module~mod_io module~mod_mpi mod_mpi module~mod_abstract_flat_data->module~mod_mpi module~mod_string mod_string module~mod_abstract_flat_data->module~mod_string module~mod_throw mod_throw module~mod_abstract_flat_data->module~mod_throw iso_fortran_env iso_fortran_env module~mod_io->iso_fortran_env module~mod_optional_args mod_optional_args module~mod_io->module~mod_optional_args module~mod_precision mod_precision module~mod_io->module~mod_precision module~mod_mpi->module~mod_precision mpi_f08 mpi_f08 module~mod_mpi->mpi_f08 module~mod_string->module~mod_precision module~mod_throw->module~mod_io module~mod_throw->module~mod_mpi iso_c_binding iso_c_binding module~mod_throw->iso_c_binding module~mod_throw->iso_fortran_env module~mod_throw->module~mod_precision module~mod_sort mod_sort module~mod_throw->module~mod_sort module~mod_precision->iso_c_binding module~mod_precision->iso_fortran_env module~mod_sort->module~mod_precision

Derived Types Summary

Name Description
AbstractFlatData

Procedures Summary

Name Type Description
initialize_flat_data Subroutine Prepare the object for storing data by allocating the data array.
collect_flat_data Subroutine Retrieve the data from all MPI processes and store it in the data array on root. During...
reset_flat_data Subroutine Put the object back into a state where it can be filled again from the top.
sort_flat_data Subroutine Sort the second dimension of the contents in self%data by sort_index.
add_tag Subroutine Add a new tag at the end of the list of tags.

Derived Types Details

type AbstractFlatData

Components

  • name : character– The name of the property.
  • write_labels : type(String) (dim: (:))– The header to be used for each row of this property. Should be `nrows` long.
  • tags : integer (dim: (:))– Tags by which this property can be retrieved.
  • write_idx : integer– The index of the left-most column when writing to file.
  • nrows : integer– The number of rows (e.g. 3 for force components).
  • max_idx : integer– How many entries have been stored up to now.
  • ncols : integer– The number of columns, i.e. the number of total entries that can be stored.
  • collected : logical– Whether the contents of this type were already collected across MPI processes. Any future calls to `collect` will simply be skipped. Call `reset` to start over and collect again.
  • sorted : logical– Whether the contents of this type were already sorted. Any future calls to `sort` will be skipped.
  • frozen : logical– If frozen is `.true.`, adding new data to this container will result in an error.

Type-Bound Procedures

Name Attributes Binding
reallocate public ⇒ reallocate
collect_child public ⇒ collect_child
sort_child public ⇒ sort_child
initialize public ⇒ initialize_flat_data
sort public ⇒ sort_flat_data
collect public ⇒ collect_flat_data
reset public ⇒ reset_flat_data
add_tag public ⇒ add_tag

Inherits

type~~abstractflatdata~~InheritsGraph type~abstractflatdata AbstractFlatData type~string String type~abstractflatdata->type~string write_labels

Procedure Details

subroutine initialize_flat_data

subroutine initialize_flat_data( &
    self, &
    name, &
    nrows, &
    tags, &
    write_labels, &
    write_idx, &
    storage_size_root, &
    storage_size &
)

Prepare the object for storing data by allocating the data array.

Arguments

  • self : class(AbstractFlatData) [inout]
  • name : character [in]
  • nrows : integer [in]
  • tags : integer (dim: (:)) [in]
  • write_labels : type(String) (dim: (nrows)) [in]
  • write_idx : integer [in]
  • storage_size_root : integer [in]
  • storage_size : integer [in]

subroutine collect_flat_data

subroutine collect_flat_data( &
    self &
)

Retrieve the data from all MPI processes and store it in the data array on root.

During initialization, we make sure that the data array on root is large enough to contain the values from all processes.

Arguments


subroutine reset_flat_data

subroutine reset_flat_data( &
    self &
)

Put the object back into a state where it can be filled again from the top.

Arguments


subroutine sort_flat_data

subroutine sort_flat_data( &
    self, &
    sort_index &
)

Sort the second dimension of the contents in self%data by sort_index.

Arguments

  • self : class(AbstractFlatData) [inout]
  • sort_index : integer (dim: (:)) [in]– Order that the contents will have after sorting.

subroutine add_tag

subroutine add_tag( &
    self, &
    tag &
)

Add a new tag at the end of the list of tags.

Arguments