m_tdsops Module


Uses

  • module~~m_tdsops~~UsesGraph module~m_tdsops m_tdsops module~m_common m_common module~m_tdsops->module~m_common module~m_logger m_logger module~m_tdsops->module~m_logger module~m_common->module~m_logger m_mpi m_mpi module~m_common->m_mpi iso_fortran_env iso_fortran_env module~m_logger->iso_fortran_env module~m_logger->m_mpi

Used by

  • module~~m_tdsops~~UsedByGraph module~m_tdsops m_tdsops module~m_base_backend m_base_backend module~m_base_backend->module~m_tdsops module~m_poisson_fft m_poisson_fft module~m_base_backend->module~m_poisson_fft module~m_cuda_backend m_cuda_backend module~m_cuda_backend->module~m_tdsops module~m_cuda_backend->module~m_base_backend module~m_cuda_poisson_fft m_cuda_poisson_fft module~m_cuda_backend->module~m_cuda_poisson_fft module~m_cuda_tdsops m_cuda_tdsops module~m_cuda_backend->module~m_cuda_tdsops module~m_cuda_exec_dist m_cuda_exec_dist module~m_cuda_backend->module~m_cuda_exec_dist module~m_cuda_exec_thom m_cuda_exec_thom module~m_cuda_backend->module~m_cuda_exec_thom module~m_cuda_poisson_fft->module~m_tdsops module~m_cuda_poisson_fft->module~m_poisson_fft module~m_cuda_tdsops->module~m_tdsops module~m_exec_thom m_exec_thom module~m_exec_thom->module~m_tdsops module~m_les m_les module~m_les->module~m_tdsops module~m_les->module~m_base_backend module~m_omp_backend m_omp_backend module~m_omp_backend->module~m_tdsops module~m_omp_backend->module~m_base_backend module~m_omp_backend->module~m_exec_thom module~m_omp_exec_dist m_omp_exec_dist module~m_omp_backend->module~m_omp_exec_dist module~m_omp_exec_dist->module~m_tdsops module~m_omp_poisson_fft m_omp_poisson_fft module~m_omp_poisson_fft->module~m_tdsops module~m_omp_poisson_fft->module~m_poisson_fft module~m_omptgt_backend m_omptgt_backend module~m_omptgt_backend->module~m_tdsops module~m_omptgt_backend->module~m_base_backend module~m_omptgt_tdsops m_omptgt_tdsops module~m_omptgt_backend->module~m_omptgt_tdsops module~m_omptgt_exec_dist m_omptgt_exec_dist module~m_omptgt_backend->module~m_omptgt_exec_dist module~m_omptgt_exec_thom m_omptgt_exec_thom module~m_omptgt_backend->module~m_omptgt_exec_thom module~m_omptgt_tdsops->module~m_tdsops module~m_poisson_fft->module~m_tdsops module~m_solver m_solver module~m_solver->module~m_tdsops module~m_solver->module~m_base_backend module~m_solver->module~m_les module~m_vector_calculus m_vector_calculus module~m_solver->module~m_vector_calculus module~m_ibm m_ibm module~m_solver->module~m_ibm module~m_time_integrator m_time_integrator module~m_solver->module~m_time_integrator module~m_vector_calculus->module~m_tdsops module~m_vector_calculus->module~m_base_backend module~m_abl m_abl module~m_abl->module~m_base_backend module~m_abl->module~m_les module~m_abl_diagnostics m_abl_diagnostics module~m_abl_diagnostics->module~m_base_backend module~m_abl_diagnostics->module~m_les module~m_adm m_adm module~m_adm->module~m_base_backend module~m_io_session m_io_session module~m_adm->module~m_io_session module~m_turbine_model m_turbine_model module~m_adm->module~m_turbine_model module~m_backend_setup m_backend_setup module~m_backend_setup->module~m_base_backend module~m_backend_setup->module~m_cuda_backend module~m_backend_setup->module~m_omp_backend module~m_backend_setup->module~m_omptgt_backend module~m_base_case m_base_case module~m_base_case->module~m_base_backend module~m_base_case->module~m_solver module~m_io_manager m_io_manager module~m_base_case->module~m_io_manager module~m_monitoring m_monitoring module~m_base_case->module~m_monitoring module~m_postprocess m_postprocess module~m_base_case->module~m_postprocess module~m_case_abl m_case_abl module~m_case_abl->module~m_base_backend module~m_case_abl->module~m_abl module~m_case_abl->module~m_abl_diagnostics module~m_case_abl->module~m_base_case module~m_case_channel m_case_channel module~m_case_channel->module~m_base_backend module~m_case_channel->module~m_solver module~m_case_channel->module~m_base_case module~m_case_cylinder m_case_cylinder module~m_case_cylinder->module~m_base_backend module~m_case_cylinder->module~m_solver module~m_case_cylinder->module~m_base_case module~m_case_generic m_case_generic module~m_case_generic->module~m_base_backend module~m_case_generic->module~m_solver module~m_case_generic->module~m_base_case module~m_case_tgv m_case_tgv module~m_case_tgv->module~m_base_backend module~m_case_tgv->module~m_solver module~m_case_tgv->module~m_base_case module~m_case_wind_turbine m_case_wind_turbine module~m_case_wind_turbine->module~m_base_backend module~m_case_wind_turbine->module~m_solver module~m_case_wind_turbine->module~m_adm module~m_case_wind_turbine->module~m_base_case module~m_turbine_dummy m_turbine_dummy module~m_case_wind_turbine->module~m_turbine_dummy module~m_case_wind_turbine->module~m_turbine_model module~m_checkpoint_manager m_checkpoint_manager module~m_checkpoint_manager->module~m_solver module~m_io_field_utils m_io_field_utils module~m_checkpoint_manager->module~m_io_field_utils module~m_checkpoint_manager->module~m_io_session module~m_stats m_stats module~m_checkpoint_manager->module~m_stats module~m_checkpoint_state m_checkpoint_state module~m_checkpoint_manager->module~m_checkpoint_state module~m_cuda_exec_dist->module~m_cuda_tdsops module~m_cuda_exec_thom->module~m_cuda_tdsops module~m_ibm->module~m_base_backend module~m_ibm->module~m_io_session module~m_io_backend m_io_backend module~m_io_backend->module~m_base_backend module~m_io_base m_io_base module~m_io_backend->module~m_io_base module~m_io_backend~2 m_io_backend module~m_io_backend~2->module~m_base_backend module~m_io_backend~2->module~m_io_base module~m_io_base->module~m_base_backend module~m_io_field_utils->module~m_solver module~m_io_field_utils->module~m_io_base module~m_io_manager->module~m_solver module~m_io_manager->module~m_checkpoint_manager module~m_snapshot_manager m_snapshot_manager module~m_io_manager->module~m_snapshot_manager module~m_io_manager->module~m_stats module~m_io_manager->module~m_checkpoint_state module~m_io_session->module~m_base_backend module~m_io_session->module~m_io_backend~2 module~m_io_session->module~m_io_base module~m_monitoring->module~m_solver module~m_omptgt_exec_dist->module~m_omptgt_tdsops module~m_omptgt_exec_thom->module~m_omptgt_tdsops module~m_postprocess->module~m_solver module~m_snapshot_manager->module~m_solver module~m_snapshot_manager->module~m_io_field_utils module~m_snapshot_manager->module~m_io_session module~m_stats->module~m_solver module~m_stats->module~m_io_session module~m_time_integrator->module~m_base_backend module~m_turbine_dummy->module~m_base_backend module~m_turbine_dummy->module~m_io_session module~m_turbine_dummy->module~m_turbine_model module~m_turbine_model->module~m_base_backend module~m_turbine_model->module~m_checkpoint_state proc~init_omp_poisson_fft m_omp_backend::omp_backend_t%init_omp_poisson_fft proc~init_omp_poisson_fft->module~m_omp_poisson_fft module~m_checkpoint_state->module~m_io_session program~xcompact xcompact program~xcompact->module~m_backend_setup program~xcompact->module~m_base_case program~xcompact->module~m_case_abl program~xcompact->module~m_case_channel program~xcompact->module~m_case_cylinder program~xcompact->module~m_case_generic program~xcompact->module~m_case_tgv program~xcompact->module~m_case_wind_turbine

Interfaces

public interface tdsops_t

  • public function tdsops_init(n_tds, delta, operation, scheme, bc_start, bc_end, stretch, stretch_correct, n_halo, from_to, sym, c_nu, nu0_nu, filter_alpha) result(tdsops)

    Constructor function for the tdsops_t class.

    'n_tds', 'delta', 'operation', 'scheme', 'bc_start', and 'bc_end' are necessary arguments. The remaining arguments are optional.

    'stretch' is for obtaining the correct derivations in a stretched mesh 'stretch_correct' is for correcting the second derivative with the first

    'from_to' is necessary for interpolation and staggered derivative, and it can be 'v2p' or 'p2v'. If the specific region the instance is operating is not a boundary region, then 'bc_start' and 'bc_end' are BC_HALO.

    'sym' is relevant when the BC is free-slip. If sym is .true. then it means the field we operate on is assumed to be an even function (symmetric, cos type) across the boundary. If it is .false. it means the field is assumed to be an odd function (anti-symmetric, sin type).

    'c_nu', 'nu0_nu' are relevant when operation is second order derivative and scheme is compact6-hyperviscous.

    Arguments

    Type IntentOptional Attributes Name
    integer, intent(in) :: n_tds

    Tridiagonal system size

    real(kind=dp), intent(in) :: delta

    Grid spacing

    character(len=*), intent(in) :: operation
    character(len=*), intent(in) :: scheme
    integer, intent(in) :: bc_start

    Boundary Cond.

    integer, intent(in) :: bc_end

    Boundary Cond.

    real(kind=dp), intent(in), optional :: stretch(:)

    Stretching coefficients

    real(kind=dp), intent(in), optional :: stretch_correct(:)

    Stretch correction

    integer, intent(in), optional :: n_halo

    Number of halo cells

    character(len=*), intent(in), optional :: from_to

    'v2p' or 'p2v'

    logical, intent(in), optional :: sym

    (==npaire), only for Neumann BCs

    real(kind=dp), intent(in), optional :: c_nu

    params for hypervisc.

    real(kind=dp), intent(in), optional :: nu0_nu

    params for hypervisc.

    real(kind=dp), intent(in), optional :: filter_alpha

    low-pass filter parameter

    Return Value type(tdsops_t)

    return value of the function


Derived Types

type, public ::  tdsops_t

Tridiagonal Solver Operators class.

Read more…

Components

Type Visibility Attributes Name Initial
real(kind=dp), public, allocatable, dimension(:) :: dist_fw

fw/bw phase back subs. the auxiliary factors

real(kind=dp), public, allocatable, dimension(:) :: dist_bw

fw/bw phase back subs. the auxiliary factors

real(kind=dp), public, allocatable, dimension(:) :: dist_sa

fw/bw phase back subs. the auxiliary factors

real(kind=dp), public, allocatable, dimension(:) :: dist_sc

fw/bw phase back subs. the auxiliary factors

real(kind=dp), public, allocatable, dimension(:) :: dist_af

fw/bw phase back subs. the auxiliary factors

real(kind=dp), public, allocatable, dimension(:) :: thom_f
real(kind=dp), public, allocatable, dimension(:) :: thom_s
real(kind=dp), public, allocatable, dimension(:) :: thom_w
real(kind=dp), public, allocatable, dimension(:) :: thom_p
real(kind=dp), public, allocatable :: stretch(:)
real(kind=dp), public, allocatable :: stretch_correct(:)
real(kind=dp), public, allocatable :: coeffs(:)
real(kind=dp), public, allocatable :: coeffs_s(:,:)
real(kind=dp), public, allocatable :: coeffs_e(:,:)
real(kind=dp), public :: alpha

Compact scheme coeffs

real(kind=dp), public :: a

Compact scheme coeffs

real(kind=dp), public :: b

Compact scheme coeffs

real(kind=dp), public :: c = 0._dp

Compact scheme coeffs

real(kind=dp), public :: d = 0._dp

Compact scheme coeffs

real(kind=dp), public :: beta = 0._dp

LHS 2nd off-diagonal (pentadiag LHS only)

real(kind=dp), public :: beta_lhs_s = 0._dp

j=1 backward-sub beta (0/2β Neumann, β otherwise)

logical, public :: periodic
logical, public :: pentadiag = .false.

.true. for pentadiagonal LHS schemes Solve with the serial Thomas algorithm instead of the distributed one. The distributed solver truncates a neighbour's influence at the subdomain edge, which is invisible for the well-conditioned derivative operators but not for the low-pass filter, whose system is only marginally diagonally dominant as alpha approaches 0.5. Thomas is serial along the line, so this is only valid when the direction is not decomposed.

logical, public :: prefer_thomas = .false.
integer, public :: n_tds

Tridiagonal system size

integer, public :: n_rhs

Right-hand-side builder size

integer, public :: move = 0

move between vertices and cell centres

integer, public :: n_halo

number of halo points

Constructor

public function tdsops_init (n_tds, delta, operation, scheme, bc_start, bc_end, stretch, stretch_correct, n_halo, from_to, sym, c_nu, nu0_nu, filter_alpha)

Constructor function for the tdsops_t class.

Read more…

Type-Bound Procedures

procedure, public :: lowpass
procedure, public :: stagder_1st
procedure, public :: interpl_mid
procedure, public :: deriv_2nd
procedure, public :: deriv_1st
procedure, public :: preprocess_thom
procedure, public :: preprocess_penta_dist
procedure, public :: preprocess_dist

type, public ::  dirps_t

Directional tridiagonal solver container.

Read more…

Components

Type Visibility Attributes Name Initial
class(tdsops_t), public, allocatable :: der1st
class(tdsops_t), public, allocatable :: der1st_sym
class(tdsops_t), public, allocatable :: der2nd
class(tdsops_t), public, allocatable :: der2nd_sym
class(tdsops_t), public, allocatable :: stagder_v2p
class(tdsops_t), public, allocatable :: stagder_p2v
class(tdsops_t), public, allocatable :: interpl_v2p
class(tdsops_t), public, allocatable :: interpl_p2v
class(tdsops_t), public, allocatable :: lowpass
class(tdsops_t), public, allocatable :: lowpass_sym
integer, public :: dir

Functions

public function tdsops_init(n_tds, delta, operation, scheme, bc_start, bc_end, stretch, stretch_correct, n_halo, from_to, sym, c_nu, nu0_nu, filter_alpha) result(tdsops)

Constructor function for the tdsops_t class.

Read more…

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: n_tds

Tridiagonal system size

real(kind=dp), intent(in) :: delta

Grid spacing

character(len=*), intent(in) :: operation
character(len=*), intent(in) :: scheme
integer, intent(in) :: bc_start

Boundary Cond.

integer, intent(in) :: bc_end

Boundary Cond.

real(kind=dp), intent(in), optional :: stretch(:)

Stretching coefficients

real(kind=dp), intent(in), optional :: stretch_correct(:)

Stretch correction

integer, intent(in), optional :: n_halo

Number of halo cells

character(len=*), intent(in), optional :: from_to

'v2p' or 'p2v'

logical, intent(in), optional :: sym

(==npaire), only for Neumann BCs

real(kind=dp), intent(in), optional :: c_nu

params for hypervisc.

real(kind=dp), intent(in), optional :: nu0_nu

params for hypervisc.

real(kind=dp), intent(in), optional :: filter_alpha

low-pass filter parameter

Return Value type(tdsops_t)

return value of the function


Subroutines

public subroutine deriv_1st(self, delta, scheme, bc_start, bc_end, sym)

Arguments

Type IntentOptional Attributes Name
class(tdsops_t), intent(inout) :: self
real(kind=dp), intent(in) :: delta
character(len=*), intent(in) :: scheme
integer, intent(in) :: bc_start
integer, intent(in) :: bc_end
logical, intent(in), optional :: sym

public subroutine lowpass(self, af, bc_start, bc_end, sym)

Tridiagonal low-pass filter, matching Incompact3d's filter.

Read more…

Arguments

Type IntentOptional Attributes Name
class(tdsops_t), intent(inout) :: self
real(kind=dp), intent(in) :: af

filter parameter, -0.5 < af < 0.5

integer, intent(in) :: bc_start
integer, intent(in) :: bc_end
logical, intent(in), optional :: sym

public subroutine deriv_2nd(self, delta, scheme, bc_start, bc_end, sym, c_nu, nu0_nu)

Arguments

Type IntentOptional Attributes Name
class(tdsops_t), intent(inout) :: self
real(kind=dp), intent(in) :: delta
character(len=*), intent(in) :: scheme
integer, intent(in) :: bc_start
integer, intent(in) :: bc_end
logical, intent(in), optional :: sym
real(kind=dp), intent(in), optional :: c_nu
real(kind=dp), intent(in), optional :: nu0_nu

public subroutine interpl_mid(self, scheme, from_to, bc_start, bc_end, sym)

Arguments

Type IntentOptional Attributes Name
class(tdsops_t), intent(inout) :: self
character(len=*), intent(in) :: scheme
character(len=*), intent(in) :: from_to
integer, intent(in) :: bc_start
integer, intent(in) :: bc_end
logical, intent(in), optional :: sym

public subroutine stagder_1st(self, delta, scheme, from_to, bc_start, bc_end, sym)

Arguments

Type IntentOptional Attributes Name
class(tdsops_t), intent(inout) :: self
real(kind=dp), intent(in) :: delta
character(len=*), intent(in) :: scheme
character(len=*), intent(in) :: from_to
integer, intent(in) :: bc_start
integer, intent(in) :: bc_end
logical, intent(in), optional :: sym

public subroutine preprocess_dist(self, dist_b)

Arguments

Type IntentOptional Attributes Name
class(tdsops_t), intent(inout) :: self
real(kind=dp), intent(in), dimension(:) :: dist_b

public subroutine preprocess_thom(self, b)

Arguments

Type IntentOptional Attributes Name
class(tdsops_t), intent(inout) :: self
real(kind=dp), intent(in), dimension(:) :: b

public subroutine preprocess_penta_dist(self, bc_start, bc_end, symmetry)

LU preprocessing for non-periodic pentadiagonal Thomas algorithm.

Read more…

Arguments

Type IntentOptional Attributes Name
class(tdsops_t), intent(inout) :: self
integer, intent(in) :: bc_start
integer, intent(in) :: bc_end
logical, intent(in) :: symmetry