Pure metadata describing a structured Cartesian grid: physical and ghosted dimensions, ghost width, and cell sizes. No allocatables, no GPU mapping needed.
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| real(kind=wp), | public | :: | dx | = | 0.0_wp |
Cell size in x (m) |
|
| real(kind=wp), | public | :: | dy | = | 0.0_wp |
Cell size in y (m) |
|
| integer, | public | :: | i_offset_global | = | 0 |
Global index offset for this subdomain: i_global = i_phys_local + i_offset_global (0 on a single-rank / undecomposed grid — formula fills must add this when converting a local loop index to a physical coordinate) |
|
| integer, | public | :: | j_offset_global | = | 0 |
Global index offset in y (see i_offset_global) |
|
| integer, | public | :: | nghost | = | 2 |
Ghost cell width on each side |
|
| integer, | public | :: | nx_global | = | 0 |
GLOBAL physical (interior) cells in x, i.e. the undecomposed
domain extent. Equals |
|
| integer, | public | :: | nx_phys | = | 0 |
Physical (interior) cells in x |
|
| integer, | public | :: | nx_total | = | 0 |
Total cells in x including ghosts (nx_phys + 2*nghost) |
|
| integer, | public | :: | ny_global | = | 0 |
GLOBAL physical (interior) cells in y (see nx_global) |
|
| integer, | public | :: | ny_phys | = | 0 |
Physical (interior) cells in y |
|
| integer, | public | :: | ny_total | = | 0 |
Total cells in y including ghosts |
| procedure, public, non_overridable :: init => grid_init |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(hgrid_t), | intent(inout) | :: | this | |||
| integer, | intent(in) | :: | nx_phys | |||
| integer, | intent(in) | :: | ny_phys | |||
| integer, | intent(in) | :: | nghost | |||
| real(kind=wp), | intent(in) | :: | dx | |||
| real(kind=wp), | intent(in) | :: | dy |