Skip to content

adam_slices_object ​

ADAM, slices (of domain) class definition, CPU backend.

Source: src/lib/common/adam_slices_object.F90

Dependencies

Contents ​

Variables ​

NameTypeAttributesDescription
INI_SECTION_NAMEcharacter(len=6)parameterINI (config) file section name containing slices configs.

Derived Types ​

slice_object ​

Single slice class definition, CPU backend.

Components ​

NameTypeAttributesDescription
itypecharacter(len=99)Slice interpolation type.
n_saveinteger(kind=I4P)Iteration interval between subsequent data-slice saves.
nijkinteger(kind=I4P)Slice number of points.
eminreal(kind=R8P)Slice minimum extents.
emaxreal(kind=R8P)Slice maximum extents.
pointsreal(kind=R8P)allocatableSlice points coordinates [3,ni,nj,nk].

slices_object ​

Slices (of domain) class definition, CPU backend.

Components ​

NameTypeAttributesDescription
slices_numberinteger(kind=I4P)Number of slices to be saved.
slicetype(slice_object)allocatableSlices data.

Type-Bound Procedures ​

NameAttributesDescription
initializepass(self)Initialize RK.
is_to_savepass(self)Return true if slices are to save.
load_from_filepass(self)Load config from file.
save_matpass(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

NameTypeIntentAttributesDescription
selfclass(slices_object)inoutSlices.
file_parameterstype(file_ini)inSimulation parameters ini file handler.
gridtype(grid_object)inoptionalGrid of the realm, the points must lie in its domain.
L0real(kind=R8P)inoptionalAdimensionalization 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

NameTypeIntentAttributesDescription
selfclass(slices_object)inoutSlices.
file_parameterstype(file_ini)inSimulation parameters ini file handler.
go_on_faillogicalinoptionalGo on if load fails.
gridtype(grid_object)inoptionalGrid of the realm, the points must lie in its domain.
L0real(kind=R8P)inoptionalAdimensionalization 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

NameTypeIntentAttributesDescription
selfclass(slices_object)inoutSlices.
basenamecharacter(len=*)inOutput file basename.
itinteger(kind=I4P)inTime step iteration.
it_maxinteger(kind=I4P)inTime step iteration max.
timereal(kind=R8P)inTime iteration.
time_maxreal(kind=R8P)inTime iteration max.
adamtype(adam_object)inoutAdam object.
qreal(kind=R8P)inField variables.
q_namecharacter(len=*)inoptionalVariables names.
length_scalereal(kind=R8P)inoptionalScale of the written points.
q_scalereal(kind=R8P)inoptionalScale 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

NameTypeIntentAttributesDescription
selfclass(slices_object)inSlices.
itinteger(kind=I4P)inTime step iteration.
it_maxinteger(kind=I4P)inTime step iteration max.
timereal(kind=R8P)inTime iteration.
time_maxreal(kind=R8P)inTime iteration max.

Call graph