solver_t Derived Type

type, public :: solver_t

solver class defines the Incompact3D algorithm at a very high level.

Procedures defined here that are part of the Incompact3D algorithm are: transeq, divergence, poisson, and gradient.

The operations these high level procedures require are provided by the relavant backend implementations.

transeq procedure obtains the derivations in x, y, and z directions using the transeq_x, transeq_y, and transeq_z operations provided by the backend. There are two different algorithms available for this operation, a distributed algorithm and the Thomas algorithm. At the solver class level it isn't known which algorithm will be executed, that is decided at run time and therefore backend implementations are responsible for executing the right subroutines.

Allocator is responsible from giving us a field sized array when requested. For example, when the derivations in x direction are completed and we are ready for the y directional derivatives, we need three fields to reorder and store the velocities in y direction. Also, we need three more fields for storing the results, and the get_block method of the allocator is used to arrange all these memory assignments. Later, when a field is no more required, release_block method of the allocator can be used to make this field available for later use.


Inherits

type~~solver_t~~InheritsGraph type~solver_t solver_t 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~field_t field_t type~solver_t->type~field_t u, v, w 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~allocator_t->type~mesh_t mesh 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~tdsops_t tdsops_t type~dirps_t->type~tdsops_t der1st, der1st_sym, der2nd, der2nd_sym, stagder_v2p, stagder_p2v, interpl_v2p, interpl_p2v type~field_t->type~field_t next 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~time_intg_t->type~allocator_t allocator type~time_intg_t->type~base_backend_t backend type~flist_t flist_t type~time_intg_t->type~flist_t olds, curr, deriv type~vector_calculus_t->type~base_backend_t backend type~flist_t->type~field_t ptr

Inherited by

type~~solver_t~~InheritedByGraph type~solver_t solver_t type~base_case_t base_case_t type~base_case_t->type~solver_t solver type~case_channel_t case_channel_t type~case_channel_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
real(kind=dp), public :: dt
real(kind=dp), public :: nu
integer, public :: n_iters
integer, public :: n_output
integer, public :: ngrid
class(field_t), public, pointer :: u
class(field_t), public, pointer :: v
class(field_t), public, pointer :: w
class(base_backend_t), public, pointer :: backend
type(mesh_t), public, pointer :: mesh
type(time_intg_t), public :: time_integrator
type(allocator_t), public, pointer :: host_allocator
type(dirps_t), public, pointer :: xdirps
type(dirps_t), public, pointer :: ydirps
type(dirps_t), public, pointer :: zdirps
type(vector_calculus_t), public :: vector_calculus
procedure(poisson_solver), public, pointer :: poisson => null()

Constructor

public interface solver_t

  • public function init(backend, mesh, host_allocator) result(solver)

    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(solver_t)


Type-Bound Procedures

procedure, public :: transeq

  • public subroutine transeq(self, du, dv, dw, u, v, w)

    Skew-symmetric form of convection-diffusion terms in the incompressible Navier-Stokes momemtum equations, excluding pressure terms. Inputs from velocity grid and outputs to velocity grid.

    Arguments

    Type IntentOptional Attributes Name
    class(solver_t) :: self
    class(field_t), intent(inout) :: du
    class(field_t), intent(inout) :: dv
    class(field_t), intent(inout) :: dw
    class(field_t), intent(in) :: u
    class(field_t), intent(in) :: v
    class(field_t), intent(in) :: w

procedure, public :: pressure_correction

procedure, public :: divergence_v2p

  • public subroutine divergence_v2p(self, div_u, u, v, w)

    Wrapper for divergence_v2p

    Arguments

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

procedure, public :: gradient_p2v

  • public subroutine gradient_p2v(self, dpdx, dpdy, dpdz, pressure)

    Wrapper for gradient_p2v

    Arguments

    Type IntentOptional Attributes Name
    class(solver_t) :: self
    class(field_t), intent(inout) :: dpdx
    class(field_t), intent(inout) :: dpdy
    class(field_t), intent(inout) :: dpdz
    class(field_t), intent(in) :: pressure

procedure, public :: curl

  • public subroutine curl(self, o_i_hat, o_j_hat, o_k_hat, u, v, w)

    Wrapper for curl

    Arguments

    Type IntentOptional Attributes Name
    class(solver_t) :: self
    class(field_t), intent(inout) :: o_i_hat

    Vector components of the output vector field Omega

    class(field_t), intent(inout) :: o_j_hat

    Vector components of the output vector field Omega

    class(field_t), intent(inout) :: o_k_hat

    Vector components of the output vector field Omega

    class(field_t), intent(in) :: u
    class(field_t), intent(in) :: v
    class(field_t), intent(in) :: w