44 integer,
private :: n_items = 0
63 integer,
intent(in) :: capacity
67 if (capacity <= 0)
then
68 call neko_error(
'Field series list capacity must be positive')
71 allocate(this%items(capacity))
81 if (
allocated(this%items))
then
82 do i = 1,
size(this%items)
83 if (
associated(this%items(i)%ptr))
then
84 nullify(this%items(i)%ptr)
87 deallocate(this%items)
100 if (.not.
allocated(this%items))
then
101 allocate(this%items(1))
105 if (this%n_items >=
size(this%items))
then
106 len =
size(this%items)
107 allocate(tmp(len + 1))
108 tmp(1:len) = this%items
109 call move_alloc(tmp, this%items)
112 this%n_items = this%n_items + 1
113 this%items(this%n_items)%ptr => fld_series
120 integer,
intent(in) :: index
123 if (index < 1 .or. index > this%n_items)
then
124 call neko_error(
'Field series list index out of bounds')
127 field_series_ptr => this%items(index)%ptr
Contains the field_series_list_t type for managing multiple field series.
pure integer function field_series_list_size(this)
Get the number of items in the list.
subroutine field_series_list_init(this, capacity)
Initialize a field series list with a given capacity.
type(field_series_t) function, pointer field_series_list_get(this, index)
Get a field series by index.
subroutine field_series_list_free(this)
Free the field series list.
subroutine field_series_list_append(this, fld_series)
Add a field series to the list.
Contains the field_serties_t type.
A wrapper for a pointer to a field_series_t.
Stores a series (sequence) of fields, logically connected to a base field, and arranged according to ...
A list of field series pointers, used for managing multiple scalar lag fields.