Skip to content

adam_grid_object

ADAM, grid class definition.

Source: src/lib/common/adam_grid_object.F90

Dependencies

Contents

Variables

NameTypeAttributesDescription
MAX_REF_LEVELSinteger(kind=I4P)parameterMaximum refinement levels.
INI_SECTION_NAMEcharacter(len=4)parameterINI (config) file section name containing configs.

Derived Types

grid_object

Grid class definition.

Components

NameTypeAttributesDescription
mpihtype(mpih_object)MPI handler.
domain_eminreal(kind=R8P)Coordinates of minimum abscissa of whole domain.
domain_emaxreal(kind=R8P)Coordinates of maximum abscissa of whole domain.
niinteger(kind=I4P)Number of cells in i direction.
njinteger(kind=I4P)Number of cells in j direction.
nkinteger(kind=I4P)Number of cells in k direction.
ngcinteger(kind=I4P)Number of ghost cells.
block_weightinteger(kind=I4P)Weight of single block.
weight_neighborinteger(kind=I4P)Weight of neighbors (cells number).
bc_typeinteger(kind=I4P)Type of boundary conditions in the 6 faces of grid.
is_ijk_periodiclogicalFlag to indicate if the direction i, j or k is periodic.
block_dxyzreal(kind=R8P)allocatableBlocks space steps for each level [3,0:MAX_REF_LEVELS].
cell_dxyzreal(kind=R8P)allocatableCells space steps for each level [3,0:MAX_REF_LEVELS].
nb_maxinteger(kind=I4P)allocatableNumber of maximum blocks in each direction for each level.
lin_space_xreal(kind=R8P)allocatableLin. space x for each level [0-ngc:ni+ngc,MAX_REF_LEVELS].
lin_space_yreal(kind=R8P)allocatableLin. space y for each level [0-ngc:nj+ngc,MAX_REF_LEVELS].
lin_space_zreal(kind=R8P)allocatableLin. space z for each level [0-ngc:nk+ngc,MAX_REF_LEVELS].
null_xyzlogicalHandy tags for nullify equations in some direction.

Type-Bound Procedures

NameAttributesDescription
block_eminpass(self)Return block emin given its coordinates.
block_emaxpass(self)Return block emax given its coordinates.
cell_xyzpass(self)Return cells xyz abscissa given block coordinates.
compute_metricspass(self)Compute metrics of a block.
compute_weight_neighborpass(self)Compute weight of neighbors.
descriptionpass(self)Return pretty-printed object description.
do_cplane_intersectnopassReturn true if a block is intersected by coordinate-plane.
fec_bc_typepass(self)Return BC type of given fec.
get_closest_blockpass(self)Get the closest block to a given point at a given level.
initializepass(self)Initialize the field.
load_from_ini_filepass(self)Load object data from INI file.
node_xyzpass(self)Return nodes xyz abscissa given block coordinates.
set_bc_typepass(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

NameTypeIntentAttributesDescription
selfclass(grid_object)inThe grid.
coordinatesinteger(kind=I4P)inBlock coordinates.
x_cellreal(kind=R8P)outoptionalX coordinates.
y_cellreal(kind=R8P)outoptionalY coordinates.
z_cellreal(kind=R8P)outoptionalZ 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

NameTypeIntentAttributesDescription
selfclass(grid_object)inThe grid.
coordinatesinteger(kind=I4P)inBlock coordinates.
dxreal(kind=R8P)outoptionalSpace steps.
dyreal(kind=R8P)outoptionalSpace steps.
dzreal(kind=R8P)outoptionalSpace steps.
eminreal(kind=R8P)outoptionalMin/max abscissa of block.
emaxreal(kind=R8P)outoptionalMin/max abscissa of block.
x_nodereal(kind=R8P)outoptionalX coordinates.
y_nodereal(kind=R8P)outoptionalY coordinates.
z_nodereal(kind=R8P)outoptionalZ coordinates.
x_cellreal(kind=R8P)outoptionalX coordinates.
y_cellreal(kind=R8P)outoptionalY coordinates.
z_cellreal(kind=R8P)outoptionalZ coordinates.

Call graph

compute_weight_neighbor

Compute weight of neighbors.

fortran
subroutine compute_weight_neighbor(self)

Arguments

NameTypeIntentAttributesDescription
selfclass(grid_object)inoutThe grid.

Call graph

initialize

Initialize field.

fortran
subroutine initialize(self, file_parameters, ni, nj, nk, ngc, emin, emax, bc_type, verbose)

Arguments

NameTypeIntentAttributesDescription
selfclass(grid_object)inoutThe grid.
file_parameterstype(file_ini)inoutINI file handler.
niinteger(kind=I4P)inoptionalNumber of cells in X direction.
njinteger(kind=I4P)inoptionalNumber of cells in Y direction.
nkinteger(kind=I4P)inoptionalNumber of cells in Z direction.
ngcinteger(kind=I4P)inoptionalNumber of ghost cells.
eminreal(kind=R8P)inoptionalCoordinates of minium abscissa.
emaxreal(kind=R8P)inoptionalCoordinates of maxium abscissa.
bc_typeinteger(kind=I4P)inoptionalType of boundary conditions in the 6 faces of grid.
verboselogicalinoptionalFlag 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

NameTypeIntentAttributesDescription
selfclass(grid_object)inoutThe grid.
file_parameterstype(file_ini)inoutINI file handler.
go_on_faillogicalinoptionalGo 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

NameTypeIntentAttributesDescription
selfclass(grid_object)inThe grid.
coordinatesinteger(kind=I4P)inBlock coordinates.
x_nodereal(kind=R8P)outoptionalX coordinates.
y_nodereal(kind=R8P)outoptionalY coordinates.
z_nodereal(kind=R8P)outoptionalZ coordinates.

Call graph

set_bc_type

Set grid boundary conditions accordingly with app'equation object.

fortran
subroutine set_bc_type(self, bc_type)

Arguments

NameTypeIntentAttributesDescription
selfclass(grid_object)inoutThe grid.
bc_typeinteger(kind=I4P)inType 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

NameTypeIntentAttributesDescription
selfclass(grid_object)inThe grid.
coordinatesinteger(kind=I4P)inBlock coordinates.

Call graph

block_emax

Return block emax given its coordinates.

Returns: real(kind=R8P)

fortran
function block_emax(self, coordinates) result(emax)

Arguments

NameTypeIntentAttributesDescription
selfclass(grid_object)inThe grid.
coordinatesinteger(kind=I4P)inBlock coordinates.

Call graph

description

Return a pretty-formatted object description.

Attributes: pure

Returns: character(len=:)

fortran
function description(self) result(desc)

Arguments

NameTypeIntentAttributesDescription
selfclass(grid_object)inThe 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

NameTypeIntentAttributesDescription
eminreal(kind=R8P)inBlock extents.
emaxreal(kind=R8P)inBlock extents.
dxyzreal(kind=R8P)inBlock space steps.
cplane_originreal(kind=R8P)inCoordinate-plane origin.
cplane_normalreal(kind=R8P)inCoordinate-plane normal.
cplane_block_indexesinteger(kind=I4P)outoptionalBlock-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

NameTypeIntentAttributesDescription
selfclass(grid_object)inThe grid.
fecinteger(kind=I4P)inCurrent 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

NameTypeIntentAttributesDescription
selfclass(grid_object)inoutThe grid.
pointreal(kind=R8P)inPoint xyz coordinates.
levelinteger(kind=I4P)inRefinement level.

Call graph