Appearance
adam_grid_object
ADAM, grid class definition.
Source: src/lib/common/adam_grid_object.F90
Dependencies
Contents
- grid_object
- cell_xyz
- compute_metrics
- compute_weight_neighbor
- initialize
- load_from_ini_file
- node_xyz
- set_bc_type
- block_emin
- block_emax
- description
- do_cplane_intersect
- fec_bc_type
- get_closest_block
Variables
| Name | Type | Attributes | Description |
|---|---|---|---|
MAX_REF_LEVELS | integer(kind=I4P) | parameter | Maximum refinement levels. |
INI_SECTION_NAME | character(len=4) | parameter | INI (config) file section name containing configs. |
Derived Types
grid_object
Grid class definition.
Components
| Name | Type | Attributes | Description |
|---|---|---|---|
mpih | type(mpih_object) | MPI handler. | |
domain_emin | real(kind=R8P) | Coordinates of minimum abscissa of whole domain. | |
domain_emax | real(kind=R8P) | Coordinates of maximum abscissa of whole domain. | |
ni | integer(kind=I4P) | Number of cells in i direction. | |
nj | integer(kind=I4P) | Number of cells in j direction. | |
nk | integer(kind=I4P) | Number of cells in k direction. | |
ngc | integer(kind=I4P) | Number of ghost cells. | |
block_weight | integer(kind=I4P) | Weight of single block. | |
weight_neighbor | integer(kind=I4P) | Weight of neighbors (cells number). | |
bc_type | integer(kind=I4P) | Type of boundary conditions in the 6 faces of grid. | |
is_ijk_periodic | logical | Flag to indicate if the direction i, j or k is periodic. | |
block_dxyz | real(kind=R8P) | allocatable | Blocks space steps for each level [3,0:MAX_REF_LEVELS]. |
cell_dxyz | real(kind=R8P) | allocatable | Cells space steps for each level [3,0:MAX_REF_LEVELS]. |
nb_max | integer(kind=I4P) | allocatable | Number of maximum blocks in each direction for each level. |
lin_space_x | real(kind=R8P) | allocatable | Lin. space x for each level [0-ngc:ni+ngc,MAX_REF_LEVELS]. |
lin_space_y | real(kind=R8P) | allocatable | Lin. space y for each level [0-ngc:nj+ngc,MAX_REF_LEVELS]. |
lin_space_z | real(kind=R8P) | allocatable | Lin. space z for each level [0-ngc:nk+ngc,MAX_REF_LEVELS]. |
null_xyz | logical | Handy tags for nullify equations in some direction. |
Type-Bound Procedures
| Name | Attributes | Description |
|---|---|---|
block_emin | pass(self) | Return block emin given its coordinates. |
block_emax | pass(self) | Return block emax given its coordinates. |
cell_xyz | pass(self) | Return cells xyz abscissa given block coordinates. |
compute_metrics | pass(self) | Compute metrics of a block. |
compute_weight_neighbor | pass(self) | Compute weight of neighbors. |
description | pass(self) | Return pretty-printed object description. |
do_cplane_intersect | nopass | Return true if a block is intersected by coordinate-plane. |
fec_bc_type | pass(self) | Return BC type of given fec. |
get_closest_block | pass(self) | Get the closest block to a given point at a given level. |
initialize | pass(self) | Initialize the field. |
load_from_ini_file | pass(self) | Load object data from INI file. |
node_xyz | pass(self) | Return nodes xyz abscissa given block coordinates. |
set_bc_type | pass(self) | Set grid boundary conditions accordingly with app'equation object. |
Subroutines
cell_xyz
Return cells xyz abscissa given block coordinates.
fortran
subroutine cell_xyz(self, coordinates, x_cell, y_cell, z_cell)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(grid_object) | in | The grid. | |
coordinates | integer(kind=I4P) | in | Block coordinates. | |
x_cell | real(kind=R8P) | out | optional | X coordinates. |
y_cell | real(kind=R8P) | out | optional | Y coordinates. |
z_cell | real(kind=R8P) | out | optional | Z coordinates. |
Call graph
compute_metrics
Compute metrics of a block.
fortran
subroutine compute_metrics(self, coordinates, dx, dy, dz, emin, emax, x_node, y_node, z_node, x_cell, y_cell, z_cell)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(grid_object) | in | The grid. | |
coordinates | integer(kind=I4P) | in | Block coordinates. | |
dx | real(kind=R8P) | out | optional | Space steps. |
dy | real(kind=R8P) | out | optional | Space steps. |
dz | real(kind=R8P) | out | optional | Space steps. |
emin | real(kind=R8P) | out | optional | Min/max abscissa of block. |
emax | real(kind=R8P) | out | optional | Min/max abscissa of block. |
x_node | real(kind=R8P) | out | optional | X coordinates. |
y_node | real(kind=R8P) | out | optional | Y coordinates. |
z_node | real(kind=R8P) | out | optional | Z coordinates. |
x_cell | real(kind=R8P) | out | optional | X coordinates. |
y_cell | real(kind=R8P) | out | optional | Y coordinates. |
z_cell | real(kind=R8P) | out | optional | Z coordinates. |
Call graph
compute_weight_neighbor
Compute weight of neighbors.
fortran
subroutine compute_weight_neighbor(self)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(grid_object) | inout | The grid. |
Call graph
initialize
Initialize field.
fortran
subroutine initialize(self, file_parameters, ni, nj, nk, ngc, emin, emax, bc_type, verbose)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(grid_object) | inout | The grid. | |
file_parameters | type(file_ini) | inout | INI file handler. | |
ni | integer(kind=I4P) | in | optional | Number of cells in X direction. |
nj | integer(kind=I4P) | in | optional | Number of cells in Y direction. |
nk | integer(kind=I4P) | in | optional | Number of cells in Z direction. |
ngc | integer(kind=I4P) | in | optional | Number of ghost cells. |
emin | real(kind=R8P) | in | optional | Coordinates of minium abscissa. |
emax | real(kind=R8P) | in | optional | Coordinates of maxium abscissa. |
bc_type | integer(kind=I4P) | in | optional | Type of boundary conditions in the 6 faces of grid. |
verbose | logical | in | optional | Flag to activate verbose output. |
Call graph
load_from_ini_file
Load object data from INI file.
fortran
subroutine load_from_ini_file(self, file_parameters, go_on_fail)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(grid_object) | inout | The grid. | |
file_parameters | type(file_ini) | inout | INI file handler. | |
go_on_fail | logical | in | optional | Go on if load fails. |
Call graph
node_xyz
Return nodes xyz abscissa given block coordinates.
fortran
subroutine node_xyz(self, coordinates, x_node, y_node, z_node)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(grid_object) | in | The grid. | |
coordinates | integer(kind=I4P) | in | Block coordinates. | |
x_node | real(kind=R8P) | out | optional | X coordinates. |
y_node | real(kind=R8P) | out | optional | Y coordinates. |
z_node | real(kind=R8P) | out | optional | Z coordinates. |
Call graph
set_bc_type
Set grid boundary conditions accordingly with app'equation object.
fortran
subroutine set_bc_type(self, bc_type)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(grid_object) | inout | The grid. | |
bc_type | integer(kind=I4P) | in | Type of boundary conditions in the 6 faces of grid. |
Functions
block_emin
Return block emin given its coordinates.
Returns: real(kind=R8P)
fortran
function block_emin(self, coordinates) result(emin)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(grid_object) | in | The grid. | |
coordinates | integer(kind=I4P) | in | Block coordinates. |
Call graph
block_emax
Return block emax given its coordinates.
Returns: real(kind=R8P)
fortran
function block_emax(self, coordinates) result(emax)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(grid_object) | in | The grid. | |
coordinates | integer(kind=I4P) | in | Block coordinates. |
Call graph
description
Return a pretty-formatted object description.
Attributes: pure
Returns: character(len=:)
fortran
function description(self) result(desc)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(grid_object) | in | The grid. |
Call graph
do_cplane_intersect
Return true if a block is intersected by coordinate-plane.
Returns: logical
fortran
function do_cplane_intersect(emin, emax, dxyz, cplane_origin, cplane_normal, cplane_block_indexes) result(do_intersect)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
emin | real(kind=R8P) | in | Block extents. | |
emax | real(kind=R8P) | in | Block extents. | |
dxyz | real(kind=R8P) | in | Block space steps. | |
cplane_origin | real(kind=R8P) | in | Coordinate-plane origin. | |
cplane_normal | real(kind=R8P) | in | Coordinate-plane normal. | |
cplane_block_indexes | integer(kind=I4P) | out | optional | Block-local indexes of cplane intersection. |
Call graph
fec_bc_type
Return BC type of given fec.
Returns: integer(kind=I4P)
fortran
function fec_bc_type(self, fec) result(bc_type)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(grid_object) | in | The grid. | |
fec | integer(kind=I4P) | in | Current fec. |
Call graph
get_closest_block
Get the closest block to a given point at a given level.
Returns: integer(kind=I4P)
fortran
function get_closest_block(self, point, level) result(ijk)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(grid_object) | inout | The grid. | |
point | real(kind=R8P) | in | Point xyz coordinates. | |
level | integer(kind=I4P) | in | Refinement level. |
Call graph