67 character(len=*),
intent(in) :: name
68 integer,
intent(in) :: nfields
69 integer,
intent(in),
optional :: precision
70 character(len=*),
intent(in),
optional :: path
71 character(len=*),
intent(in),
optional :: format
72 character(len=1024) :: fname, suffix
77 if (
present(format))
then
78 select case (trim(format))
79 case (
'nek5000',
'fld')
86 suffix =
'.' // trim(format)
90 if (
present(path))
then
91 fname = trim(path) // trim(name) // trim(suffix)
93 fname = trim(name) // trim(suffix)
96 call this%init_base(fname, precision)
98 call this%fields%init(nfields)
106 call this%free_base()
107 call this%fields%free()
115 real(kind=
rp),
intent(in) :: t
119 do i = 1, this%fields%size()
120 associate(
field => this%fields%items(i)%ptr)
122 sync = i .eq. this%fields%size())
127 call this%file_%write(this%fields, t)
Copy data between host and device (or device and device)
Device abstraction, common interface for various accelerators.
integer, parameter, public device_to_host
Implements field_output_t.
subroutine field_output_sample(this, t)
Writes the data.
subroutine field_output_init(this, name, nfields, precision, path, format)
Constructor.
subroutine field_output_free(this)
Destructor.
integer, parameter neko_bcknd_device
integer, parameter, public rp
Global precision used in computations.
field_list_t, To be able to group fields together
A simple output saving a list of fields to a file.
Abstract type defining an output type.