Tridiagonal Solver Operators class.
Operator arrays are preprocessed in this class based on the arguments provided. dist_fw and dist_bw are used in the first phase of the distributed tridiagonal solver algorithm. dist_sa and dist_sc are used in the final substitution phase. See the kernels_dist.f90 files in the relevant backend folders. coeff arrays define the specific rules of building the RHS corresponding to the tridiagonal system to be solved, and used only in the first phase of the distributed algorithm when building the RHS. If a boundary condition is defined then coeffs_s and coeffs_e differ from coeffs array and define the RHS rule for the first and last 4 entries in the tridiagonal system (n_halo = 4).
This class does not know about the current rank or its relative location among other ranks. All the operator arrays here are used when executing a distributed tridiagonal solver phase one or two.
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 | :: | coeffs(:) | |||
real(kind=dp), | public, | allocatable | :: | coeffs_s(:,:) | |||
real(kind=dp), | public, | allocatable | :: | coeffs_e(:,:) | |||
real(kind=dp), | public | :: | alpha | ||||
real(kind=dp), | public | :: | a | ||||
real(kind=dp), | public | :: | b | ||||
real(kind=dp), | public | :: | c | = | 0._dp | ||
real(kind=dp), | public | :: | d | = | 0._dp | ||
logical, | public | :: | periodic | ||||
integer, | public | :: | tds_n | ||||
integer, | public | :: | move | = | 0 | ||
integer, | public | :: | n_halo |
Constructor function for the tdsops_t class.
'n', 'delta', 'operation', and 'scheme' are necessary arguments. Number of points 'n', distance between two points 'delta', the 'operation' the tridiagonal system defines, and the 'scheme' that specifies the exact scheme we choose to apply for the operation. The remaining arguments are optional. 'from_to' is necessary for interpolation and staggared 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 either 'null' or not defined. 'sym' is relevant when the boundary condition is free-slip. If sym is .true. then it means the field we operate on is assumed to be an even function (symmetric) accross the boundary. If it is .false. it means that the field is assumed to be an odd function (anti-symmetric). 'c_nu', 'nu0_nu' are relevant when operation is second order derivative and scheme is compact6-hyperviscous.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | tds_n | |||
real(kind=dp), | intent(in) | :: | delta | |||
character(len=*), | intent(in) | :: | operation | |||
character(len=*), | intent(in) | :: | scheme | |||
integer, | intent(in) | :: | bc_start |
Boundary Cond. |
||
integer, | intent(in) | :: | bc_end |
Boundary Cond. |
||
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. |
return value of the function
Type | Intent | Optional | 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 |
Type | Intent | Optional | 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 |
Type | Intent | Optional | 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 |
Type | Intent | Optional | 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 |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(tdsops_t), | intent(inout) | :: | self | |||
real(kind=dp), | intent(in), | dimension(:) | :: | b |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(tdsops_t), | intent(inout) | :: | self | |||
real(kind=dp), | intent(in), | dimension(:) | :: | dist_b |