56     real(kind=
rp) :: t_begin
 
 
   73    real(kind=
rp), 
intent(in) :: t_begin
 
   74    character(len=*), 
intent(in) :: hom_dir
 
   75    character(len=*), 
intent(in), 
optional :: name
 
   76    character(len=*), 
intent(in), 
optional :: path
 
   77    character(len=1024) :: fname
 
   79    if (trim(hom_dir) .eq. 
'none' .or. &
 
   80        trim(hom_dir) .eq. 
'x' .or.&
 
   81        trim(hom_dir) .eq. 
'y' .or.&
 
   82        trim(hom_dir) .eq. 
'z'&
 
   84       if (
present(name) .and. 
present(path)) 
then 
   85          fname = trim(path) // trim(name) // 
'.fld' 
   86       else if (
present(name)) 
then 
   87          fname = trim(name) // 
'.fld' 
   88       else if (
present(path)) 
then 
   89          fname = trim(path) // 
'scalar_stats.fld' 
   91          fname = 
'scalar_stats.fld' 
   96       if (trim(hom_dir) .eq. 
'x' .or.&
 
   97           trim(hom_dir) .eq. 
'y' .or.&
 
   98           trim(hom_dir) .eq. 
'z' ) 
then 
   99          call this%map_2d%init_char(
stats%coef, hom_dir, 1e-7_rp)
 
  103       if (
present(name) .and. 
present(path)) 
then 
  104          fname = trim(path) // trim(name) // 
'.csv' 
  105       else if (
present(name)) 
then 
  106          fname = trim(name) // 
'.csv' 
  107       else if (
present(path)) 
then 
  108          fname = trim(path) // 
'scalar_stats.csv' 
  110          fname = 
'scalar_stats.csv' 
  112       call this%map_1d%init_char(
stats%coef, hom_dir, 1e-7_rp)
 
  116    call this%init_base(fname)
 
  118    this%T_begin = t_begin
 
 
  124    real(kind=
rp), 
intent(in) :: t
 
  128    real(kind=
rp) :: u, v, w, p
 
  129    associate(out_fields => this%stats%stat_fields%items)
 
  130      if (t .ge. this%T_begin) 
then 
  131         call this%stats%make_strong_grad()
 
  133            do i = 1, 
size(out_fields)
 
  134               call device_memcpy(out_fields(i)%ptr%x, out_fields(i)%ptr%x_d,&
 
  136                    sync = (i .eq. 
size(out_fields))) 
 
  139         if (this%output_dim .eq. 1) 
then 
  140            call this%map_1d%average_planes(avg_output_1d, &
 
  141                 this%stats%stat_fields)
 
  142            call this%file_%write(avg_output_1d, t)
 
  143         else if (this%output_dim .eq. 2) 
then 
  144            call this%map_2d%average(output_2d, this%stats%stat_fields)
 
  146            call this%file_%write(output_2d, t)
 
  148            call this%file_%write(this%stats%stat_fields, t)
 
  150         call this%stats%reset()
 
 
Copy data between host and device (or device and device)
 
Device abstraction, common interface for various accelerators.
 
integer, parameter, public device_to_host
 
Simple module to handle fld file series. Provides an interface to the different fields sotred in a fl...
 
Creates a 1d GLL point map along a specified direction based on the connectivity in the mesh.
 
Maps a 3D dofmap to a 2D spectral element grid.
 
integer, parameter neko_bcknd_device
 
integer, parameter, public rp
Global precision used in computations.
 
Implements scalar_stats_ouput_t.
 
subroutine scalar_stats_output_sample(this, t)
Sample scalar_stats at time t.
 
subroutine scalar_stats_output_init(this, stats, t_begin, hom_dir, name, path)
Constructor.
 
Computes various statistics for the scalar fields. We use the Reynolds decomposition for a field u = ...
 
Defines a container for all statistics.
 
Type that encapsulates a mapping from each gll point in the mesh to its corresponding (global) GLL po...
 
Abstract type defining an output type.
 
Defines an output for the scalar statistics computed using the scalar_stats_t object.