case_generic_t Derived Type

type, public, extends(base_case_t) :: case_generic_t


Inherits

type~~case_generic_t~~InheritsGraph type~case_generic_t case_generic_t type~base_case_t base_case_t type~case_generic_t->type~base_case_t type~field_t field_t type~base_case_t->type~field_t bc_start_u_x, bc_start_v_x, bc_start_w_x, bc_end_u_x, bc_end_v_x, bc_end_w_x, bc_start_u_y, bc_start_v_y, bc_start_w_y, bc_end_u_y, bc_end_v_y, bc_end_w_y type~io_manager_t io_manager_t type~base_case_t->type~io_manager_t io_mgr type~monitoring_t monitoring_t type~base_case_t->type~monitoring_t monitoring type~solver_t solver_t type~base_case_t->type~solver_t solver type~field_t->type~field_t next type~checkpoint_manager_t checkpoint_manager_t type~io_manager_t->type~checkpoint_manager_t checkpoint_mgr type~checkpoint_state_t checkpoint_state_t type~io_manager_t->type~checkpoint_state_t additional_checkpoint_state type~snapshot_manager_t snapshot_manager_t type~io_manager_t->type~snapshot_manager_t snapshot_mgr type~stats_manager_t stats_manager_t type~io_manager_t->type~stats_manager_t stats_mgr type~scalar_series_t scalar_series_t type~monitoring_t->type~scalar_series_t series type~solver_t->type~field_t u, v, w, pressure, pressure_vert, dpdx_last, dpdy_last, dpdz_last, vort, qcrit type~allocator_t allocator_t type~solver_t->type~allocator_t host_allocator type~base_backend_t base_backend_t type~solver_t->type~base_backend_t backend type~dirps_t dirps_t type~solver_t->type~dirps_t xdirps, ydirps, zdirps type~flist_t flist_t type~solver_t->type~flist_t species type~ibm_t ibm_t type~solver_t->type~ibm_t ibm type~les_t les_t type~solver_t->type~les_t les type~mesh_t mesh_t type~solver_t->type~mesh_t mesh type~time_intg_t time_intg_t type~solver_t->type~time_intg_t time_integrator type~vector_calculus_t vector_calculus_t type~solver_t->type~vector_calculus_t vector_calculus type~allocator_t->type~field_t first type~base_backend_t->type~allocator_t allocator type~base_backend_t->type~mesh_t mesh type~poisson_fft_t poisson_fft_t type~base_backend_t->type~poisson_fft_t poisson_fft type~checkpoint_config_t checkpoint_config_t type~checkpoint_manager_t->type~checkpoint_config_t config type~field_buffer_map_t field_buffer_map_t type~checkpoint_manager_t->type~field_buffer_map_t field_buffers type~tdsops_t tdsops_t type~dirps_t->type~tdsops_t der1st, der1st_sym, der2nd, der2nd_sym, stagder_v2p, stagder_p2v, interpl_v2p, interpl_p2v, lowpass, lowpass_sym type~flist_t->type~field_t ptr type~ibm_t->type~field_t ep1 type~ibm_t->type~allocator_t host_allocator type~ibm_t->type~base_backend_t backend type~ibm_t->type~mesh_t mesh type~les_t->type~field_t nut, mixing_length_sq type~geo_t geo_t type~mesh_t->type~geo_t geo type~grid_t grid_t type~mesh_t->type~grid_t grid type~par_t par_t type~mesh_t->type~par_t par type~snapshot_manager_t->type~checkpoint_config_t config type~snapshot_manager_t->type~field_buffer_map_t field_buffers type~writer_session_t writer_session_t type~snapshot_manager_t->type~writer_session_t snapshot_writer type~stats_config_t stats_config_t type~stats_manager_t->type~stats_config_t config type~time_intg_t->type~allocator_t allocator type~time_intg_t->type~base_backend_t backend type~time_intg_t->type~flist_t olds type~vector_calculus_t->type~base_backend_t backend type~base_config_t base_config_t type~checkpoint_config_t->type~base_config_t type~poisson_fft_t->type~mesh_t mesh type~stats_config_t->type~base_config_t type~io_session_base_t io_session_base_t type~writer_session_t->type~io_session_base_t type~io_writer_t io_writer_t type~writer_session_t->type~io_writer_t writer type~io_file_t io_file_t type~io_session_base_t->type~io_file_t file

Components

Type Visibility Attributes Name Initial
class(solver_t), public, allocatable :: solver
type(io_manager_t), public :: io_mgr
type(monitoring_t), public :: monitoring
class(field_t), public, pointer :: bc_start_u_x => null()
class(field_t), public, pointer :: bc_start_v_x => null()
class(field_t), public, pointer :: bc_start_w_x => null()
class(field_t), public, pointer :: bc_end_u_x => null()
class(field_t), public, pointer :: bc_end_v_x => null()
class(field_t), public, pointer :: bc_end_w_x => null()
class(field_t), public, pointer :: bc_start_u_y => null()
class(field_t), public, pointer :: bc_start_v_y => null()
class(field_t), public, pointer :: bc_start_w_y => null()
class(field_t), public, pointer :: bc_end_u_y => null()
class(field_t), public, pointer :: bc_end_v_y => null()
class(field_t), public, pointer :: bc_end_w_y => null()

Constructor

public interface case_generic_t

  • public function case_generic_init(backend, mesh, host_allocator) result(flow_case)

    Arguments

    Type IntentOptional Attributes Name
    class(base_backend_t), intent(inout), target :: backend
    type(mesh_t), intent(inout), target :: mesh
    type(allocator_t), intent(inout), target :: host_allocator

    Return Value type(case_generic_t)


Type-Bound Procedures

procedure, public :: post_step

  • public subroutine post_step(self, iter, t)

    Called after every completed time step, unlike postprocess which runs only every n_output steps. No-op unless a case overrides it.

    Arguments

    Type IntentOptional Attributes Name
    class(base_case_t) :: self
    integer, intent(in) :: iter
    real(kind=dp), intent(in) :: t

procedure, public :: compute_outflow_params

  • public subroutine compute_outflow_params(self, out_vel, flow_rate_diff)

    Convective outflow number and inlet/outlet flow-rate imbalance for a case with an x inflow and a convective x outflow (the X_FACE form of field_set_face_from_field). Three slice reductions on the device and two batched MPI_Allreduces; no D2H copy of the full field. Assumes x is not decomposed, as the FFT Poisson solver requires. Without flow_rate_diff only the outflow number is computed.

    Arguments

    Type IntentOptional Attributes Name
    class(base_case_t) :: self
    real(kind=dp), intent(out) :: out_vel
    real(kind=dp), intent(out), optional :: flow_rate_diff

procedure, public :: outflow_flow_rate_correction

  • public function outflow_flow_rate_correction(self, u, out_vel, y_weights) result(flow_rate_diff)

    The flow_rate_diff for the X_FACE stamp of field_set_face_from_field that makes the flow rate out equal the flow rate in exactly, as the pressure projection sees them. The x staggered derivative sums to (u(nx) - u(1))/dx over the cells, so only the two face planes enter, each weighted over y by y_weights: the case passes the weights of the y interpolation (1/2 on a non-periodic boundary plane, 1 elsewhere), with 0 on any plane it overwrites with the same value on both faces after the stamp. The stamp is linear in u, u(nx) <- (1 - c)u(nx) + cu(nx - 1) + flow_rate_diff, so the sums of the planes before it give the outlet flow rate after it. Call it with u as it is about to be stamped, once bc_start_u_x holds this substep's inlet plane. Assumes x is not decomposed, as compute_outflow_params does.

    Arguments

    Type IntentOptional Attributes Name
    class(base_case_t) :: self
    class(field_t), intent(in) :: u
    real(kind=dp), intent(in) :: out_vel
    real(kind=dp), intent(in) :: y_weights(:)

    Return Value real(kind=dp)

procedure, public :: case_init

  • public subroutine case_init(self, backend, mesh, host_allocator)

    Arguments

    Type IntentOptional Attributes Name
    class(base_case_t) :: self
    class(base_backend_t), intent(inout), target :: backend
    type(mesh_t), intent(inout), target :: mesh
    type(allocator_t), intent(inout), target :: host_allocator

procedure, public :: case_finalise

procedure, public :: finalise_case_specific => finalise_case_specific_default

procedure, public :: set_init

  • public subroutine set_init(self, field, field_func)

    Arguments

    Type IntentOptional Attributes Name
    class(base_case_t) :: self
    class(field_t), intent(inout) :: field
    public pure function field_func(coords) result(r)
    Arguments
    Type IntentOptional Attributes Name
    real(kind=dp), intent(in) :: coords(3)
    Return Value real(kind=dp)

procedure, public :: substep

  • public subroutine substep(self, curr, deriv, iter)

    One time-integrator sub-stage: case-specific BCs, transeq, forcings, time integration, case BC re-application, IBM body force, and pressure correction. Extracted from run()'s per-sub-stage loop body so the same allocation path can be driven directly (e.g. by the memory-estimate probe) without going through the full time loop, I/O cadence, or diagnostics.

    Arguments

    Type IntentOptional Attributes Name
    class(base_case_t), intent(inout) :: self
    type(flist_t), intent(inout) :: curr(:)
    type(flist_t), intent(inout) :: deriv(:)
    integer, intent(in) :: iter

procedure, public :: set_curr_fields

  • public subroutine set_curr_fields(self, curr, deriv)

    Allocates the time integrator field lists and points curr at the solver velocity and species fields. Shared by run() and x3d2-memcheck.

    Arguments

    Type IntentOptional Attributes Name
    class(base_case_t), intent(inout) :: self
    type(flist_t), intent(out), allocatable :: curr(:)
    type(flist_t), intent(out), allocatable :: deriv(:)

procedure, public :: finish_step

  • public subroutine finish_step(self, iter, output_vorticity, output_qcriterion)

    The per-iteration work after the substeps: sets current_iter and computes the pressure and the derived fields. Shared by run() and x3d2-memcheck.

    Arguments

    Type IntentOptional Attributes Name
    class(base_case_t), intent(inout) :: self
    integer, intent(in) :: iter
    logical, intent(in) :: output_vorticity
    logical, intent(in) :: output_qcriterion

procedure, public :: run

  • public subroutine run(self)

    Runs the solver forwards in time from t=t_0 to t=T, performing postprocessing/IO and reporting diagnostics.

    Arguments

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

procedure, public :: define_BC => define_BC_generic

procedure, public :: initial_conditions => initial_conditions_generic

procedure, public :: forcings => forcings_generic

  • public subroutine forcings_generic(self, du, dv, dw, iter)

    Arguments

    Type IntentOptional Attributes Name
    class(case_generic_t) :: self
    class(field_t), intent(inout) :: du
    class(field_t), intent(inout) :: dv
    class(field_t), intent(inout) :: dw
    integer, intent(in) :: iter

procedure, public :: apply_BC => apply_BC_generic

procedure, public :: postprocess => postprocess_generic

  • public subroutine postprocess_generic(self, iter, t)

    Arguments

    Type IntentOptional Attributes Name
    class(case_generic_t) :: self
    integer, intent(in) :: iter
    real(kind=dp), intent(in) :: t