m_base_case Module

Provides the base case for running a simulation. New cases are implemented by extending this to specify the initial and boundary conditions, forcing terms and case-specific postprocessing and analysis.


Uses

  • module~~m_base_case~~UsesGraph module~m_base_case m_base_case module~m_allocator m_allocator module~m_base_case->module~m_allocator module~m_base_backend m_base_backend module~m_base_case->module~m_base_backend module~m_common m_common module~m_base_case->module~m_common module~m_field m_field module~m_base_case->module~m_field module~m_mesh m_mesh module~m_base_case->module~m_mesh module~m_solver m_solver module~m_base_case->module~m_solver module~m_allocator->module~m_common module~m_allocator->module~m_field module~m_allocator->module~m_mesh iso_fortran_env iso_fortran_env module~m_allocator->iso_fortran_env module~m_base_backend->module~m_allocator module~m_base_backend->module~m_common module~m_base_backend->module~m_field module~m_base_backend->module~m_mesh module~m_poisson_fft m_poisson_fft module~m_base_backend->module~m_poisson_fft module~m_tdsops m_tdsops module~m_base_backend->module~m_tdsops mpi mpi module~m_base_backend->mpi module~m_field->module~m_common module~m_mesh->module~m_common module~m_mesh->module~m_field module~m_mesh->iso_fortran_env module~m_mesh_content m_mesh_content module~m_mesh->module~m_mesh_content module~m_mesh->mpi module~m_solver->module~m_allocator module~m_solver->module~m_base_backend module~m_solver->module~m_common module~m_solver->module~m_field module~m_solver->module~m_mesh module~m_solver->iso_fortran_env module~m_config m_config module~m_solver->module~m_config module~m_solver->module~m_tdsops module~m_time_integrator m_time_integrator module~m_solver->module~m_time_integrator module~m_vector_calculus m_vector_calculus module~m_solver->module~m_vector_calculus module~m_solver->mpi module~m_config->module~m_common module~m_config->iso_fortran_env module~m_mesh_content->module~m_common module~m_poisson_fft->module~m_common module~m_poisson_fft->module~m_field module~m_poisson_fft->module~m_mesh module~m_poisson_fft->module~m_tdsops module~m_tdsops->module~m_common module~m_tdsops->iso_fortran_env module~m_time_integrator->module~m_allocator module~m_time_integrator->module~m_base_backend module~m_time_integrator->module~m_common module~m_time_integrator->module~m_field module~m_vector_calculus->module~m_allocator module~m_vector_calculus->module~m_base_backend module~m_vector_calculus->module~m_common module~m_vector_calculus->module~m_field module~m_vector_calculus->iso_fortran_env module~m_vector_calculus->module~m_tdsops

Used by

  • module~~m_base_case~~UsedByGraph module~m_base_case m_base_case module~m_case_channel m_case_channel module~m_case_channel->module~m_base_case module~m_case_generic m_case_generic module~m_case_generic->module~m_base_case module~m_case_tgv m_case_tgv module~m_case_tgv->module~m_base_case program~xcompact xcompact program~xcompact->module~m_base_case program~xcompact->module~m_case_channel program~xcompact->module~m_case_generic program~xcompact->module~m_case_tgv

Abstract Interfaces

abstract interface

  • public subroutine boundary_conditions(self)

    Applies case-specific boundary coinditions

    Arguments

    Type IntentOptional Attributes Name
    class(base_case_t) :: self

abstract interface

  • public subroutine initial_conditions(self)

    Sets case-specific initial conditions

    Arguments

    Type IntentOptional Attributes Name
    class(base_case_t) :: self

abstract interface

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

    Applies case-specific or model realated forcings after transeq

    Arguments

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

abstract interface

  • public subroutine pre_correction(self, u, v, w)

    Applies case-specific pre-correction to the velocity fields before pressure correction

    Arguments

    Type IntentOptional Attributes Name
    class(base_case_t) :: self
    class(field_t), intent(inout) :: u
    class(field_t), intent(inout) :: v
    class(field_t), intent(inout) :: w

abstract interface

  • public subroutine postprocess(self, iter, t)

    Triggers case-specific postprocessings at user specified intervals

    Arguments

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

Derived Types

type, public, abstract ::  base_case_t

Components

Type Visibility Attributes Name Initial
class(solver_t), public, allocatable :: solver

Type-Bound Procedures

procedure(boundary_conditions), public, deferred :: boundary_conditions
procedure(initial_conditions), public, deferred :: initial_conditions
procedure(forcings), public, deferred :: forcings
procedure(pre_correction), public, deferred :: pre_correction
procedure(postprocess), public, deferred :: postprocess
procedure, public :: case_init
procedure, public :: set_init
procedure, public :: run
procedure, public :: print_enstrophy
procedure, public :: print_div_max_mean

Subroutines

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

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)

public subroutine print_enstrophy(self, u, v, w)

Reports the enstrophy

Arguments

Type IntentOptional Attributes Name
class(base_case_t), intent(in) :: self
class(field_t), intent(in) :: u
class(field_t), intent(in) :: v
class(field_t), intent(in) :: w

public subroutine print_div_max_mean(self, u, v, w)

Reports the div(u) at cell centres

Arguments

Type IntentOptional Attributes Name
class(base_case_t), intent(in) :: self
class(field_t), intent(in) :: u
class(field_t), intent(in) :: v
class(field_t), intent(in) :: w

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