stats_manager_t Derived Type

type, public :: stats_manager_t


Inherits

type~~stats_manager_t~~InheritsGraph type~stats_manager_t stats_manager_t type~stats_config_t stats_config_t type~stats_manager_t->type~stats_config_t config type~base_config_t base_config_t type~stats_config_t->type~base_config_t

Inherited by

type~~stats_manager_t~~InheritedByGraph type~stats_manager_t stats_manager_t type~io_manager_t io_manager_t type~io_manager_t->type~stats_manager_t stats_mgr type~base_case_t base_case_t type~base_case_t->type~io_manager_t io_mgr type~case_channel_t case_channel_t type~case_channel_t->type~base_case_t type~case_cylinder_t case_cylinder_t type~case_cylinder_t->type~base_case_t type~case_generic_t case_generic_t type~case_generic_t->type~base_case_t type~case_tgv_t case_tgv_t type~case_tgv_t->type~base_case_t

Components

Type Visibility Attributes Name Initial
type(stats_config_t), public :: config
integer, public :: sample_count = 0
logical, public :: is_active = .false.

Running means of first moments

real(kind=dp), public, allocatable :: umean(:,:,:)
real(kind=dp), public, allocatable :: vmean(:,:,:)
real(kind=dp), public, allocatable :: wmean(:,:,:)

Running means of second moments

real(kind=dp), public, allocatable :: uumean(:,:,:)

real(kind=dp), public, allocatable :: vvmean(:,:,:)

real(kind=dp), public, allocatable :: wwmean(:,:,:)

real(kind=dp), public, allocatable :: uvmean(:,:,:)

real(kind=dp), public, allocatable :: uwmean(:,:,:)

real(kind=dp), public, allocatable :: vwmean(:,:,:)

Pressure mean

real(kind=dp), public, allocatable :: pmean(:,:,:)

Scalar (species) statistics

integer, public :: nspecies = 0
real(kind=dp), public, allocatable :: phimean(:,:,:,:)

real(kind=dp), public, allocatable :: phiphimean(:,:,:,:)


Type-Bound Procedures

procedure, public :: init

  • private subroutine init(self, solver, comm)

    Initialise the statistics manager: read config and allocate accumulators.

    Arguments

    Type IntentOptional Attributes Name
    class(stats_manager_t), intent(inout) :: self
    class(solver_t), intent(in) :: solver
    integer, intent(in) :: comm

procedure, public :: update

  • private subroutine update(self, solver, iter)

    Accumulate running means for the current iteration. Velocity fields must be at VERT data location.

    Arguments

    Type IntentOptional Attributes Name
    class(stats_manager_t), intent(inout) :: self
    class(solver_t), intent(in) :: solver
    integer, intent(in) :: iter

procedure, public :: write_stats

  • private subroutine write_stats(self, solver, timestep, comm)

    Write statistics to file. Output fields are mean velocities (umean, vmean, wmean), RMS fluctuations (uprime, vprime, wprime), and Reynolds stresses (uvmean, uwmean, vwmean).

    Arguments

    Type IntentOptional Attributes Name
    class(stats_manager_t), intent(inout) :: self
    class(solver_t), intent(in) :: solver
    integer, intent(in) :: timestep
    integer, intent(in) :: comm

procedure, public :: write_checkpoint

  • private subroutine write_checkpoint(self, solver, writer_session)

    Write running means into an already-open checkpoint session. Saves all accumulator arrays and sample_count so that statistics can be resumed exactly after a restart.

    Arguments

    Type IntentOptional Attributes Name
    class(stats_manager_t), intent(inout) :: self
    class(solver_t), intent(in) :: solver
    type(writer_session_t), intent(inout) :: writer_session

procedure, public :: read_checkpoint

  • private subroutine read_checkpoint(self, solver, reader_session)

    Restore running means from an already-open checkpoint session. If stats were not present in the checkpoint, statistics start fresh.

    Arguments

    Type IntentOptional Attributes Name
    class(stats_manager_t), intent(inout) :: self
    class(solver_t), intent(in) :: solver
    type(reader_session_t), intent(inout) :: reader_session

procedure, public :: finalise

  • private subroutine finalise(self)

    Deallocate all accumulator arrays.

    Arguments

    Type IntentOptional Attributes Name
    class(stats_manager_t), intent(inout) :: self