58 integer,
intent(inout) :: precision
61 character(len=*),
intent(in),
optional :: name
62 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 (
allocated(this%fluid%fields))
then
79 deallocate(this%fluid%fields)
82 if (
present(scalar))
then
83 allocate(this%fluid%fields(5))
85 allocate(this%fluid%fields(4))
88 this%fluid%fields(1)%f => fluid%p
89 this%fluid%fields(2)%f => fluid%u
90 this%fluid%fields(3)%f => fluid%v
91 this%fluid%fields(4)%f => fluid%w
93 if (
present(scalar))
then
94 this%fluid%fields(5)%f => scalar%s
102 real(kind=
rp),
intent(in) :: t
107 associate(fields => this%fluid%fields)
108 do i = 1,
size(fields)
111 sync=(i .eq.
size(fields)))
117 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.