93 subroutine file_init(this, fname, header, precision, layout, overwrite)
94 class(
file_t),
intent(inout) :: this
95 character(len=*),
intent(in) :: fname
96 character(len=*),
intent(in),
optional :: header
97 integer,
intent(in),
optional :: precision
98 integer,
intent(in),
optional :: layout
99 logical,
intent(in),
optional :: overwrite
100 character(len=80) :: suffix
105 if (
allocated(this%file_type))
then
106 deallocate(this%file_type)
130 this%file_type%serial = .true.
139 call this%file_type%init(fname)
141 if (
present(header))
then
142 call this%set_header(header)
145 if (
present(precision))
then
146 call this%set_precision(precision)
149 if (
present(layout) .and. (suffix .eq.
"bp"))
then
150 call this%set_layout(layout)
153 if (
present(overwrite))
then
154 call this%set_overwrite(overwrite)
161 class(
file_t),
intent(inout) :: this
163 if (
allocated(this%file_type))
then
164 deallocate(this%file_type)
172 class(
file_t),
intent(inout) :: this
173 class(*),
intent(inout) :: data
174 real(kind=
rp),
intent(in),
optional :: t
176 call this%file_type%write(
data, t = t)
183 class(
file_t),
intent(in) :: this
184 class(*),
intent(inout) :: data
186 call this%file_type%read(data)
192 class(
file_t),
intent(in) :: this
193 character(len=1024) :: fname
197 select type (ft => this%file_type)
199 fname = ft%get_fname()
206 class(
file_t),
intent(in) :: this
207 character(len=1024) :: fname
211 select type (ft => this%file_type)
213 fname = ft%get_base_fname()
220 class(
file_t),
intent(inout) :: this
224 select type (ft => this%file_type)
233 class(
file_t),
intent(inout) :: this
234 integer,
intent(in) :: n
236 select type (ft => this%file_type)
238 call ft%set_counter(n)
245 class(
file_t),
intent(inout) :: this
246 integer,
intent(in) :: n
248 select type (ft => this%file_type)
250 call ft%set_start_counter(n)
257 class(
file_t),
intent(inout) :: this
258 character(len=*),
intent(in) :: hd
259 character(len=80) :: suffix
261 select type (ft => this%file_type)
263 call ft%set_header(hd)
266 call neko_warning(
"No set_header defined for " // trim(suffix) //
" yet")
274 class(
file_t),
intent(inout) :: this
275 integer,
intent(in) :: precision
276 character(len=80) :: suffix
278 select type (ft => this%file_type)
280 call ft%set_precision(precision)
282 call ft%set_precision(precision)
284 call ft%set_precision(precision)
287 call neko_warning(
"No precision strategy defined for " // trim(suffix) &
296 class(
file_t),
intent(inout) :: this
297 integer,
intent(in) :: layout
298 character(len=80) :: suffix
300 select type (ft => this%file_type)
302 call ft%set_layout(layout)
305 call neko_warning(
"No set_layout defined for " // trim(suffix) //
" yet")
312 class(
file_t),
intent(inout) :: this
313 logical,
intent(in) :: overwrite
314 character(len=80) :: suffix
316 select type (ft => this%file_type)
318 call ft%set_overwrite(overwrite)
326 class(
file_t),
intent(inout) :: this
327 logical,
intent(in) :: subdivide
328 character(len=80) :: suffix
330 select type (ft => this%file_type)
332 call ft%set_subdivide(subdivide)
336 call neko_warning(
"Subdivide output not supported for " // &
337 trim(suffix) //
" files")
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.
character(len=1024) function file_get_fname(this)
Get a file's name.
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_set_subdivide(this, subdivide)
Enable or disable subdivision of spectral elements into linear sub-cells. Only has effect for VTKHDF ...
subroutine file_free(this)
File operation destructor.
subroutine file_init(this, fname, header, precision, layout, overwrite)
Constructor.
character(len=1024) function file_get_base_fname(this)
Get a file's base name.
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.
Interface for HDF5 files.