Appearance
adam_ib_object
ADAM, IB class definition, CPU backend.
Source: src/lib/common/adam_ib_object.F90
Dependencies
Contents
- analytical_sphere_object
- analytical_rectangle_object
- ib_object
- compute_phi
- compute_phi_all_solids
- initialize
- load_from_file
- move_phi
- evolve_eikonal
- invert_eikonal
- compute_phi_analytical_sphere
- compute_phi_analytical_circle
- compute_phi_analytical_rectangle
- description
- sphere_to_array
Variables
| Name | Type | Attributes | Description |
|---|---|---|---|
INI_SECTION_NAME | character(len=5) | parameter | INI (config) file section name containing IB configs. |
IB_ANALYTICAL_SPHERE | character(len=20) | parameter | Analytical sphere solid. |
IB_ANALYTICAL_CIRCLE | character(len=20) | parameter | Analytical circle solid. |
IB_ANALYTICAL_RECTANGLE | character(len=20) | parameter | Analytical rectangle solid. |
IB_DEFINITIONS | character(len=20) | parameter | Available solid definitions. |
BCS_VISCOUS | integer(kind=I4P) | parameter | Visous wall. |
BCS_EULER | integer(kind=I4P) | parameter | Inviscid wall. |
Derived Types
analytical_sphere_object
Analytical sphere (or circle) solid class.
Components
| Name | Type | Attributes | Description |
|---|---|---|---|
center | real(kind=R8P) | Sphere center. | |
radius | real(kind=R8P) | Sphere radius. | |
axis | character(len=1) | Axis (x,y,z) normal in case of circle solid. |
analytical_rectangle_object
Analytical rectangle solid class.
Components
| Name | Type | Attributes | Description |
|---|---|---|---|
center | real(kind=R8P) | Sphere center. | |
edge | real(kind=R8P) | Major/minor edge length. | |
axis | character(len=1) | Axis (x,y,z) normal. |
ib_object
IB class definition, CPU backend.
Components
| Name | Type | Attributes | Description |
|---|---|---|---|
solids_number | integer(kind=I4P) | Number of solids (only 1 supported now). | |
s_name | character(len=99) | allocatable | Solid name. |
bc_type | integer(kind=I4P) | allocatable | Boundary condition type. |
q | real(kind=R8P) | allocatable | Variables array for boundary conditions. |
definition | character(len=99) | allocatable | (Type of) Solid definition. |
sphere | type(analytical_sphere_object) | allocatable | Analytical sphere/circle solid. |
rectangle | type(analytical_rectangle_object) | allocatable | Analytical rectangle solid. |
n_eikonal | integer(kind=I4P) | Number of eikonal integration steps. | |
phi | real(kind=R8P) | allocatable | IB distance function. |
Type-Bound Procedures
| Name | Attributes | Description |
|---|---|---|
compute_phi | pass(self) | Compute distance function. |
compute_phi_all_solids | pass(self) | Compute last phi index, all solids summary. |
description | pass(self) | Return pretty-printed object description. |
evolve_eikonal | pass(self) | Evolve eikonal equation. |
initialize | pass(self) | Initialize IB. |
invert_eikonal | pass(self) | Invert eikonal equation over q inside IB. |
load_from_file | pass(self) | Load config from file. |
move_phi | pass(self) | Move phi and the actual ptree representation. |
sphere_to_array | pass(self) | Convert analytical sphere class data to array data. |
compute_phi_analytical_sphere | pass(self) | Compute distance for analytical sphere solids. |
compute_phi_analytical_circle | pass(self) | Compute distance for analytical circle solids. |
compute_phi_analytical_rectangle | pass(self) | Compute distance for analytical rectangle solids. |
Subroutines
compute_phi
Compute phi, distance from IB solid.
fortran
subroutine compute_phi(self, field, grid, verbose)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(ib_object) | inout | IB. | |
field | type(field_object) | in | Field (sibling realm component, threaded in). | |
grid | type(grid_object) | in | target | Grid (sibling realm component, threaded in). |
verbose | logical | in | optional | Flag to trigger verbose prints. |
Call graph
compute_phi_all_solids
Compute the all-solids summary slot of phi, the maximum over the solids, on every cell, ghost cells included.
The summary used to be computed on the interior cells only, so its ghost cells kept the initial -1 (fluid): every stencil reading the summary across a block face (the cut spacing of a fluid cell next to the surface) missed a solid neighbour lying in the next block.
fortran
subroutine compute_phi_all_solids(self, field, grid, verbose)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(ib_object) | inout | IB. | |
field | type(field_object) | in | Field (sibling realm component, threaded in). | |
grid | type(grid_object) | in | target | Grid (sibling realm component, threaded in). |
verbose | logical | in | optional | Flag to trigger verbose prints. |
Call graph
initialize
Initialize the equation.
fortran
subroutine initialize(self, field, grid, file_parameters)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(ib_object) | inout | IB. | |
field | type(field_object) | in | Field (sibling realm component, threaded in). | |
grid | type(grid_object) | in | target | Grid (sibling realm component, threaded in). |
file_parameters | type(file_ini) | inout | INI file handler. |
Call graph
load_from_file
Load config from file.
fortran
subroutine load_from_file(self, file_parameters, go_on_fail)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(ib_object) | inout | IB. | |
file_parameters | type(file_ini) | in | Simulation parameters ini file handler. | |
go_on_fail | logical | in | optional | Go on if load fails. |
Call graph
move_phi
Move phi.
fortran
subroutine move_phi(self, velocity, s)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(ib_object) | inout | IB. | |
velocity | real(kind=R8P) | in | Velocity of the movement. | |
s | integer(kind=I4P) | in | Solid index. |
Call graph
evolve_eikonal
Evolve the eikonal extrapolation one pseudo-time step inside the solids (interior cells).
Jacobi update, one sweep per solid: every increment is computed from the old state, then all are applied. The result is independent of the loop order and of the thread count, and equals the FNL twin (ib_fnl_object). The former in-place update read neighbours already updated in the same sweep, which made it order-dependent and, under OpenMP, a data race. dq is an optional work array shaped like q (a local one is allocated otherwise).
fortran
subroutine evolve_eikonal(self, field, grid, q, dq)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(ib_object) | in | IB. | |
field | type(field_object) | in | Field (realm component). | |
grid | type(grid_object) | in | target | Grid (realm component). |
q | real(kind=R8P) | inout | Conservative variables. | |
dq | real(kind=R8P) | inout | target, optional | Work array. |
Call graph
invert_eikonal
Invert eikonal equation over q inside IB.
fortran
subroutine invert_eikonal(self, field, grid, q)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(ib_object) | in | IB. | |
field | type(field_object) | in | Field (sibling realm component, threaded in). | |
grid | type(grid_object) | in | target | Grid (sibling realm component, threaded in). |
q | real(kind=R8P) | inout | Conservative variables. |
Call graph
compute_phi_analytical_sphere
Compute distance for analytical sphere solid.
fortran
subroutine compute_phi_analytical_sphere(self, field, grid, solid, sphere)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(ib_object) | inout | IB. | |
field | type(field_object) | in | Field (sibling realm component, threaded in). | |
grid | type(grid_object) | in | target | Grid (sibling realm component, threaded in). |
solid | integer(kind=I4P) | in | Solid index. | |
sphere | type(analytical_sphere_object) | in | Analytical sphere solid. |
Call graph
compute_phi_analytical_circle
Compute distance function for analytical circle (2D) solid.
fortran
subroutine compute_phi_analytical_circle(self, field, grid, solid, sphere)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(ib_object) | inout | IB. | |
field | type(field_object) | in | Field (sibling realm component, threaded in). | |
grid | type(grid_object) | in | target | Grid (sibling realm component, threaded in). |
solid | integer(kind=I4P) | in | Solid index. | |
sphere | type(analytical_sphere_object) | in | Analytical circle solid. |
Call graph
compute_phi_analytical_rectangle
Compute distance function for analytical rectangle (2D) solid.
fortran
subroutine compute_phi_analytical_rectangle(self, field, grid, solid, rectangle)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(ib_object) | inout | IB. | |
field | type(field_object) | in | Field (sibling realm component, threaded in). | |
grid | type(grid_object) | in | target | Grid (sibling realm component, threaded in). |
solid | integer(kind=I4P) | in | Solid index. | |
rectangle | type(analytical_rectangle_object) | in | Analytical rectangle solid. |
Call graph
Functions
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(ib_object) | in | IB. |
Call graph
sphere_to_array
Convert analytical sphere class data to array data.
Returns: real(kind=R8P)
fortran
function sphere_to_array(self, ib) result(array)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(ib_object) | in | IB. | |
ib | integer(kind=I4P) | in | Index of IB solid. |
Call graph