mod_abstract_flat_data¶
Dependencies¶
Uses
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
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
-
self: class(AbstractFlatData) [inout]
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
-
self: class(AbstractFlatData) [inout]
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
-
self: class(AbstractFlatData) [inout] -
tag: integer [in]