This is a module to implement some matrix-free operations
Compute the L2-norm of a complex variable, ONLY for the default grid system.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| complex(kind=realdp), | intent(in), | dimension(1-LAP:nx+LAP,1-LAP:ny+LAP) | :: | v |
Compute the L2-norm of a real variable, ONLY for the default grid system.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=realdp), | intent(in), | dimension(1-LAP:nx+LAP,1-LAP:ny+LAP) | :: | v |
Compute the do product of two complex variables, ONLY for the default grid system.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| complex(kind=realdp), | intent(in), | dimension(1-LAP:nx+LAP,1-LAP:ny+LAP) | :: | v | ||
| complex(kind=realdp), | intent(in), | dimension(1-LAP:nx+LAP,1-LAP:ny+LAP) | :: | w |
Compute the L2-norm of a complex variable, for a coarse-grid system.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| complex(kind=realdp), | intent(in), | dimension(1-LAP:ni+LAP,1-LAP:nj+LAP) | :: | v | ||
| integer, | intent(in) | :: | ni |
ni, nj: grid size of the subdomain on the current coarse grid level |
||
| integer, | intent(in) | :: | nj |
ni, nj: grid size of the subdomain on the current coarse grid level |
Compute the dot product of two complex variables, for a coarse-grid system. Note that the dimension is not specified here, it means it calculate all the elements
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| complex(kind=realdp), | intent(in), | dimension(1-LAP:ni+LAP,1-LAP:nj+LAP) | :: | v | ||
| complex(kind=realdp), | intent(in), | dimension(1-LAP:ni+LAP,1-LAP:nj+LAP) | :: | w | ||
| integer, | intent(in) | :: | ni |
ni, nj: grid size of the subdomain on the current coarse grid level |
||
| integer, | intent(in) | :: | nj |
ni, nj: grid size of the subdomain on the current coarse grid level |
Compute log2(x)
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=realdp), | intent(in) | :: | x |
ReD-Glk Helmholtz operator for coarse levels
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| complex(kind=realdp), | intent(inout) | :: | v_in(1-LAP:grid%nx+LAP,1-LAP:grid%ny+LAP) | |||
| type(Gridpara), | intent(inout) | :: | grid |
Parameters of the current grid system |
ReD-Glk CSLP operator for coarse levels
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| complex(kind=realdp), | intent(inout) | :: | v_in(1-LAP:grid%nx+LAP,1-LAP:grid%ny+LAP) | |||
| type(Gridpara), | intent(inout) | :: | grid |
Computational stencils for the Helmholtz operator, second-order central FD scheme
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| complex(kind=realdp) | :: | ap | ||||
| real(kind=realdp) | :: | an | ||||
| real(kind=realdp) | :: | as | ||||
| real(kind=realdp) | :: | aw | ||||
| real(kind=realdp) | :: | ae | ||||
| real(kind=realdp), | intent(in) | :: | hxhykxy2 |
The value of (kh)^2, which is computed and stored in advance. |
Computational stencils for the CSLP operator
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| complex(kind=realdp) | :: | ap | ||||
| real(kind=realdp) | :: | an | ||||
| real(kind=realdp) | :: | as | ||||
| real(kind=realdp) | :: | aw | ||||
| real(kind=realdp) | :: | ae | ||||
| real(kind=realdp), | intent(in) | :: | hxhykxy2 |
The value of (kh)^2, which is computed and stored in advance |
matrix-free Helmholtz operator, ONLY for the default gird system First deal with the boundary grid points and then the internals
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| complex(kind=realdp), | intent(inout), | dimension(1-LAP:nx+LAP,1-LAP:ny+LAP) | :: | v_in | ||
| complex(kind=realdp), | intent(inout), | dimension(1-LAP:nx+LAP,1-LAP:ny+LAP) | :: | v_out |
matrix-free Helmholtz operator, for the specified coarse gird systems
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| complex(kind=realdp), | intent(inout), | dimension(1-LAP:ni+LAP,1-LAP:nj+LAP) | :: | v_in | ||
| complex(kind=realdp), | intent(inout), | dimension(1-LAP:ni+LAP,1-LAP:nj+LAP) | :: | v_out | ||
| integer, | intent(in) | :: | ni | |||
| integer, | intent(in) | :: | nj | |||
| real(kind=realdp), | intent(in) | :: | hx_c | |||
| real(kind=realdp), | intent(in) | :: | hy_c | |||
| real(kind=realdp), | intent(in), | dimension(1-LAP:ni+LAP,1-LAP:nj+LAP) | :: | kxy | ||
| real(kind=realdp), | intent(in), | dimension(1-LAP:ni+LAP,1-LAP:nj+LAP) | :: | kh2 |
matrix-free CSLP operator, for the specified gird systems
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| complex(kind=realdp), | intent(inout), | dimension(1-LAP:ni+LAP,1-LAP:nj+LAP) | :: | v_in | ||
| complex(kind=realdp), | intent(inout), | dimension(1-LAP:ni+LAP,1-LAP:nj+LAP) | :: | v_out | ||
| integer, | intent(in) | :: | ni |
ni,nj: grid size of subdomain on the current grid level |
||
| integer, | intent(in) | :: | nj |
ni,nj: grid size of subdomain on the current grid level |
||
| real(kind=realdp), | intent(in) | :: | hx_c |
hx_c,hy_c: space step of subdomain on the current grid level |
||
| real(kind=realdp), | intent(in) | :: | hy_c |
hx_c,hy_c: space step of subdomain on the current grid level |
||
| real(kind=realdp), | intent(in), | dimension(1-LAP:ni+LAP,1-LAP:nj+LAP) | :: | kxy |
kxy: wavenumber profile of subdomain on the current grid level,kh2=(kh)^2 |
|
| real(kind=realdp), | intent(in), | dimension(1-LAP:ni+LAP,1-LAP:nj+LAP) | :: | kh2 |
kxy: wavenumber profile of subdomain on the current grid level,kh2=(kh)^2 |
Extrapolation of a layer of ghost grid points
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| complex(kind=realdp), | intent(inout) | :: | v_in(1-LAP:grid%nx+LAP,1-LAP:grid%ny+LAP) | |||
| type(Gridpara), | intent(inout) | :: | grid |
ReD-Glk computational stencils of the Helmholtz operator for differnet coarse-grid level Default 2nd-ordr stencils
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| complex(kind=realdp) | :: | Stcl_nth(-3:3,-3:3) |
Resulting stencils for the Helmholtz operator |
|||
| type(Gridpara), | intent(inout) | :: | grid |
parameters for the current coarse-grid system |
||
| integer | :: | ic |
Index for the wavenumber field |
|||
| integer | :: | jc |
Index for the wavenumber field |
ReD-Glk computational stencils of the CSLP operator for differnet coarse-grid level
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| complex(kind=realdp) | :: | Stcl_nth(-3:3,-3:3) |
Resulting stencils for the CSLP operator |
|||
| type(Gridpara), | intent(inout) | :: | grid |
parameters for the current coarse-grid system |
||
| integer | :: | ic |
Index for the wavenumber field |
|||
| integer | :: | jc |
Index for the wavenumber field |