1D grid in radial coordinate "s": Contains sgrid type definition and associated routines
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| logical, | private | :: | test_called | = | .FALSE. |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(c_sgrid), | intent(in) | :: | sf | |||
| real(kind=wp), | intent(in) | :: | x |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(c_sgrid), | intent(inout) | :: | sf | |||
| integer, | intent(in) | :: | nElems_in | |||
| integer, | intent(in) | :: | grid_type_in | |||
| real(kind=wp), | intent(in), | optional | :: | sp_in(0:nElems_in) |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(c_sgrid), | intent(inout) | :: | sf |
| procedure(i_sub_sgrid_init), public, deferred :: init | |
| procedure(i_sub_sgrid_free), public, deferred :: free | |
| procedure(i_sub_sgrid_copy), public, deferred :: copy | |
| procedure(i_sub_sgrid_compare), public, deferred :: compare | |
| procedure(i_fun_sgrid_find_elem), public, deferred :: find_elem |
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| logical, | public | :: | initialized | = | .FALSE. | ||
| integer, | public | :: | nElems |
global number of radial elements |
|||
| integer, | public | :: | nElems_str |
local number of radial elements per MPI subdomain !<<<< |
|||
| integer, | public | :: | nElems_end |
local number of radial elements per MPI subdomain !<<<< |
|||
| integer, | public, | ALLOCATABLE | :: | offset_elem(:) |
allocated (0:nRanks), gives range on each rank: nElems_str:nElems_end=offset_elem(rank)+1:offset_elem(myRank+1) |
||
| integer, | public | :: | grid_type |
type of grid (stretching functions...) |
|||
| real(kind=wp), | public, | ALLOCATABLE | :: | sp(:) |
element point positions in [0,1], size(0:nElems) |
||
| real(kind=wp), | public, | ALLOCATABLE | :: | ds(:) |
ds(i)=sp(i)-sp(i-1), size(1:nElems) |
| procedure, public :: init => sGrid_init | |
| procedure, public :: copy => sGrid_copy | |
| procedure, public :: compare => sGrid_compare | |
| procedure, public :: free => sGrid_free | |
| procedure, public :: find_elem => sGrid_find_elem |
find grid cell for certain position
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(t_sGrid), | intent(in) | :: | sf |
self |
||
| real(kind=wp), | intent(in) | :: | x |
initialize the type sgrid with number of elements
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(t_sGrid), | intent(inout) | :: | sf |
self |
||
| integer, | intent(in) | :: | nElems_in |
total number of elements |
||
| integer, | intent(in) | :: | grid_type_in |
GRID_TYPE_UNIFORM, GRID_TYPE_SQRT_S, GRID_TYPE_S2, GRID_TYPE_BUMP |
||
| real(kind=wp), | intent(in), | optional | :: | sp_in(0:nElems_in) |
inner grid point positions, first position should be 0, last should be 1. |
finalize the type sgrid
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(t_sGrid), | intent(inout) | :: | sf |
self |
test sgrid variable
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(t_sGrid), | intent(inout) | :: | sf |
self |