60 integer,
intent(inout) :: precision
63 character(len=*),
intent(in),
optional :: name
64 character(len=*),
intent(in),
optional :: path
66 character(len=1024) :: fname
68 if (
present(name) .and.
present(path))
then
69 fname = trim(path) // trim(name) //
'.fld'
70 else if (
present(name))
then
71 fname = trim(name) //
'.fld'
72 else if (
present(path))
then
73 fname = trim(path) //
'field.fld'
78 call this%init_base(fname, precision)
80 if (
present(scalar))
then
81 call this%fluid%init(5)
83 call this%fluid%init(4)
86 call this%fluid%assign(1, fluid%p)
87 call this%fluid%assign(2, fluid%u)
88 call this%fluid%assign(3, fluid%v)
89 call this%fluid%assign(4, fluid%w)
91 if (
present(scalar))
then
92 call this%fluid%assign(5, scalar%s)
101 call this%fluid%free()
108 real(kind=
rp),
intent(in) :: t
113 associate(fields => this%fluid%items)
114 do i = 1,
size(fields)
117 sync=(i .eq.
size(fields)))
123 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.
type(fluid_output_t) function fluid_output_init(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.
Abstract type defining an output type.
Base type for a scalar advection-diffusion solver.