59 integer,
intent(inout) :: precision
62 character(len=*),
intent(in),
optional :: name
63 character(len=*),
intent(in),
optional :: path
64 character(len=1024) :: fname
66 if (
present(name) .and.
present(path))
then
67 fname = trim(path) // trim(name) //
'.fld'
68 else if (
present(name))
then
69 fname = trim(name) //
'.fld'
70 else if (
present(path))
then
71 fname = trim(path) //
'field.fld'
76 call this%init_base(fname, precision)
78 if (
present(scalar))
then
79 call this%fluid%init(5)
81 call this%fluid%init(4)
84 call this%fluid%assign(1, fluid%p)
85 call this%fluid%assign(2, fluid%u)
86 call this%fluid%assign(3, fluid%v)
87 call this%fluid%assign(4, fluid%w)
89 if (
present(scalar))
then
90 call this%fluid%assign(5, scalar%s)
99 call this%fluid%free()
106 real(kind=
rp),
intent(in) :: t
111 associate(fields => this%fluid%items)
112 do i = 1,
size(fields)
115 sync=(i .eq.
size(fields)))
121 call this%file_%write(this%fluid, t)
Copy data between host and device (or device and device)
Device abstraction, common interface for various accelerators.
integer, parameter, public device_to_host
Defines an output for a fluid.
subroutine fluid_output_sample(this, t)
Sample a fluid solution at time t.
subroutine fluid_output_free(this)
Destroy a fluid output list.
subroutine fluid_output_init(this, precision, fluid, scalar, name, path)
integer, parameter neko_bcknd_device
integer, parameter, public rp
Global precision used in computations.
Contains the scalar_scheme_t type.
field_list_t, To be able to group fields together
Base type of all fluid formulations.
Base type of all fluid formulations.
Abstract type defining an output type.
Base type for a scalar advection-diffusion solver.