Appearance
adam_slices_object
ADAM, slices (of domain) class definition, CPU backend.
Source: src/lib/common/adam_slices_object.F90
Dependencies
Contents
Variables
| Name | Type | Attributes | Description |
|---|---|---|---|
INI_SECTION_NAME | character(len=6) | parameter | INI (config) file section name containing slices configs. |
Derived Types
slice_object
Single slice class definition, CPU backend.
Components
| Name | Type | Attributes | Description |
|---|---|---|---|
itype | character(len=99) | Slice interpolation type. | |
n_save | integer(kind=I4P) | Iteration interval between subsequent data-slice saves. | |
nijk | integer(kind=I4P) | Slice number of points. | |
emin | real(kind=R8P) | Slice minimum extents. | |
emax | real(kind=R8P) | Slice maximum extents. | |
points | real(kind=R8P) | allocatable | Slice points coordinates [3,ni,nj,nk]. |
slices_object
Slices (of domain) class definition, CPU backend.
Components
| Name | Type | Attributes | Description |
|---|---|---|---|
slices_number | integer(kind=I4P) | Number of slices to be saved. | |
slice | type(slice_object) | allocatable | Slices data. |
Type-Bound Procedures
| Name | Attributes | Description |
|---|---|---|
initialize | pass(self) | Initialize RK. |
is_to_save | pass(self) | Return true if slices are to save. |
load_from_file | pass(self) | Load config from file. |
save_mat | pass(self) | Save simulation data slices in mat format. |
Subroutines
initialize
Initialize the slices; see load_from_file for grid and L0.
fortran
subroutine initialize(self, file_parameters, grid, L0)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(slices_object) | inout | Slices. | |
file_parameters | type(file_ini) | in | Simulation parameters ini file handler. | |
grid | type(grid_object) | in | optional | Grid of the realm, the points must lie in its domain. |
L0 | real(kind=R8P) | in | optional | Adimensionalization length, as the grid's. |
Call graph
load_from_file
Load config from file.
The [slice_N] extents are in the units of the [grid] ones: with L0 (an adimensional model) they are divided by it, as grid_object%initialize divides the domain, so that the points and the grid share the same units (the saved points are then adimensional too). With grid every point must lie in the realm domain [domain_emin, domain_emax): one outside would abort the run in grid%get_closest_block at the first save.
fortran
subroutine load_from_file(self, file_parameters, go_on_fail, grid, L0)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(slices_object) | inout | Slices. | |
file_parameters | type(file_ini) | in | Simulation parameters ini file handler. | |
go_on_fail | logical | in | optional | Go on if load fails. |
grid | type(grid_object) | in | optional | Grid of the realm, the points must lie in its domain. |
L0 | real(kind=R8P) | in | optional | Adimensionalization length. |
Call graph
save_mat
Save simulation data slices in mat format; length_scale, q_scale scale the written points and variables (see adam_object%save_slice).
fortran
subroutine save_mat(self, basename, it, it_max, time, time_max, adam, q, q_name, length_scale, q_scale)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(slices_object) | inout | Slices. | |
basename | character(len=*) | in | Output file basename. | |
it | integer(kind=I4P) | in | Time step iteration. | |
it_max | integer(kind=I4P) | in | Time step iteration max. | |
time | real(kind=R8P) | in | Time iteration. | |
time_max | real(kind=R8P) | in | Time iteration max. | |
adam | type(adam_object) | inout | Adam object. | |
q | real(kind=R8P) | in | Field variables. | |
q_name | character(len=*) | in | optional | Variables names. |
length_scale | real(kind=R8P) | in | optional | Scale of the written points. |
q_scale | real(kind=R8P) | in | optional | Scale of the written variables [nv]. |
Call graph
Functions
is_to_save
Return true if slices are to save.
Attributes: pure
Returns: logical
fortran
function is_to_save(self, it, it_max, time, time_max)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(slices_object) | in | Slices. | |
it | integer(kind=I4P) | in | Time step iteration. | |
it_max | integer(kind=I4P) | in | Time step iteration max. | |
time | real(kind=R8P) | in | Time iteration. | |
time_max | real(kind=R8P) | in | Time iteration max. |
Call graph