86 subroutine file_init(this, fname, header, precision, layout, overwrite)
87 class(
file_t),
intent(inout) :: this
88 character(len=*),
intent(in) :: fname
89 character(len=*),
intent(in),
optional :: header
90 integer,
intent(in),
optional :: precision
91 integer,
intent(in),
optional :: layout
92 logical,
intent(in),
optional :: overwrite
93 character(len=80) :: suffix
98 if (
allocated(this%file_type))
then
99 deallocate(this%file_type)
123 this%file_type%serial = .true.
130 call this%file_type%init(fname)
132 if (
present(header))
then
133 call this%set_header(header)
136 if (
present(precision))
then
137 call this%set_precision(precision)
140 if (
present(layout).and. (suffix .eq.
"bp"))
then
141 call this%set_layout(layout)
144 if (
present(overwrite))
then
145 call this%set_overwrite(overwrite)
152 type(
file_t),
intent(inout) :: this
154 if (
allocated(this%file_type))
then
155 deallocate(this%file_type)
163 class(
file_t),
intent(inout) :: this
164 class(*),
intent(inout) :: data
165 real(kind=
rp),
intent(in),
optional :: t
167 call this%file_type%write(
data, t = t)
174 class(
file_t),
intent(in) :: this
175 class(*),
intent(inout) :: data
177 call this%file_type%read(data)
183 class(
file_t),
intent(inout) :: this
187 select type (ft => this%file_type)
196 class(
file_t),
intent(inout) :: this
197 integer,
intent(in) :: n
199 select type (ft => this%file_type)
201 call ft%set_counter(n)
208 class(
file_t),
intent(inout) :: this
209 integer,
intent(in) :: n
211 select type (ft => this%file_type)
213 call ft%set_start_counter(n)
220 class(
file_t),
intent(inout) :: this
221 character(len=*),
intent(in) :: hd
222 character(len=80) :: suffix
224 select type (ft => this%file_type)
226 call ft%set_header(hd)
229 call neko_warning(
"No set_header defined for " // trim(suffix) //
" yet")
237 class(
file_t),
intent(inout) :: this
238 integer,
intent(in) :: precision
239 character(len=80) :: suffix
241 select type (ft => this%file_type)
243 call ft%set_precision(precision)
245 call ft%set_precision(precision)
248 call neko_warning(
"No precision strategy defined for " // trim(suffix) &
257 class(
file_t),
intent(inout) :: this
258 integer,
intent(in) :: layout
259 character(len=80) :: suffix
261 select type (ft => this%file_type)
263 call ft%set_layout(layout)
266 call neko_warning(
"No set_layout defined for " // trim(suffix) //
" yet")
273 class(
file_t),
intent(inout) :: this
274 logical,
intent(in) :: overwrite
275 character(len=80) :: suffix
277 select type (ft => this%file_type)
279 call ft%set_overwrite(overwrite)
282 call neko_warning(
"No set_overwrite defined for " // trim(suffix) // &
Neko checkpoint file format.
File format for .csv files, used for any read/write operations involving floating point data.
Module for file I/O operations.
subroutine file_set_header(this, hd)
Set a file's header.
subroutine file_set_overwrite(this, overwrite)
Sets the file's overwrite flag.
subroutine file_set_start_counter(this, n)
Set a file's start counter.
subroutine file_set_counter(this, n)
Set a file's counter.
subroutine file_set_layout(this, layout)
Set a file's output layout.
integer function file_get_counter(this)
Get a file's counter.
subroutine file_read(this, data)
Read data from a file.
subroutine file_set_precision(this, precision)
Set a file's output precision.
subroutine file_free(this)
File operation destructor.
subroutine file_init(this, fname, header, precision, layout, overwrite)
Constructor.
subroutine file_write(this, data, t)
Writes data to a file.
Simple module to handle fld file series. Provides an interface to the different fields sotred in a fl...
integer, parameter, public rp
Global precision used in computations.
NEKTON mesh data in re2 format.
NEKTON session data reader.
Stereolithography (STL) file.
subroutine, public neko_warning(warning_msg)
Reports a warning to standard output.
subroutine, public filename_suffix(fname, suffix)
Extract a filename's suffix.
Interface for ADIOS2 bp files.
Interface for Neko checkpoint files.
A wrapper around a polymorphic generic_file_t that handles its init. This is essentially a factory fo...
Interface for NEKTON fld files.
Interface for HDF5 files.
Interface for NEKTON map files.
Interface for Neko nmsh files.
Interface for NEKTON re2 files.
Interface for NEKTON ascii files.
Interface for legacy VTK files.