m_solver Module



Interfaces

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)


Abstract Interfaces

abstract interface

  • public subroutine poisson_solver(self, pressure, div_u)

    Arguments

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

Derived Types

type, public ::  solver_t

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

Read more…

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
class(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 function init (backend, mesh, host_allocator)

Type-Bound Procedures

procedure, public :: transeq
procedure, public :: divergence_v2p
procedure, public :: gradient_p2v
procedure, public :: curl
procedure, public :: output
procedure, public :: run

Functions

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)


Subroutines

public subroutine allocate_tdsops(dirps, backend, der1st_scheme, der2nd_scheme, interpl_scheme, stagder_scheme)

Arguments

Type IntentOptional Attributes Name
type(dirps_t), intent(inout) :: dirps
class(base_backend_t), intent(in) :: backend
character(len=*), intent(in) :: der1st_scheme
character(len=*), intent(in) :: der2nd_scheme
character(len=*), intent(in) :: interpl_scheme
character(len=*), intent(in) :: stagder_scheme

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

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

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

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

public subroutine poisson_fft(self, pressure, div_u)

Arguments

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

public subroutine poisson_cg(self, pressure, div_u)

Arguments

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

public subroutine output(self, t)

Arguments

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

public subroutine run(self)

Arguments

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