61 type(
field_t),
intent(inout),
target :: f
62 character(len=*),
optional,
intent(in) :: field_name
63 character(len=80) :: name
70 if (
present(field_name))
then
73 write(name,
'(A,A)')
'mean_',trim(f%name)
76 call this%mf%init(f%dof, name)
84 if (
associated(this%f))
then
103 real(kind=
rp),
intent(in) :: k
106 call device_cmult(this%mf%x_d, this%time,
size(this%mf%x))
107 call device_add2s2(this%mf%x_d, this%f%x_d, k,
size(this%mf%x))
108 this%time = this%time + k
109 call device_cmult(this%mf%x_d, 1.0_rp / this%time,
size(this%mf%x))
111 this%mf%x = this%mf%x * this%time
112 call add2s2(this%mf%x, this%f%x, k, this%mf%dof%size())
113 this%time = this%time + k
114 this%mf%x = this%mf%x / this%time
subroutine, public device_add2s2(a_d, b_d, c1, n)
subroutine, public device_cmult(a_d, c, n)
subroutine, public add2s2(a, b, c1, n)
Vector addition with scalar multiplication (multiplication on second argument)
subroutine mean_field_update(this, k)
Update a mean field.
subroutine mean_field_init(this, f, field_name)
Initialize a mean field for a field f.
subroutine mean_field_reset(this)
Resets a mean field.
subroutine mean_field_free(this)
Deallocates a mean field.
integer, parameter neko_bcknd_device
integer, parameter, public rp
Global precision used in computations.
Defines a statistical quantity.
Abstract type defining a statistical quantity.