59 integer,
intent(inout) :: precision
62 character(len=*),
intent(in),
optional :: name
63 character(len=*),
intent(in),
optional :: path
65 character(len=1024) :: fname
67 if (
present(name) .and.
present(path))
then
68 fname = trim(path) // trim(name) //
'.fld'
69 else if (
present(name))
then
70 fname = trim(name) //
'.fld'
71 else if (
present(path))
then
72 fname = trim(path) //
'field.fld'
77 call this%init_base(fname, precision)
79 if (
present(scalar))
then
80 call this%fluid%init(5)
82 call this%fluid%init(4)
85 call this%fluid%assign(1, fluid%p)
86 call this%fluid%assign(2, fluid%u)
87 call this%fluid%assign(3, fluid%v)
88 call this%fluid%assign(4, fluid%w)
90 if (
present(scalar))
then
91 call this%fluid%assign(5, scalar%s)
99 real(kind=
rp),
intent(in) :: t
104 associate(fields => this%fluid%items)
105 do i = 1,
size(fields)
108 sync=(i .eq.
size(fields)))
114 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.
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.