Skip to content

adam_ib_object ​

ADAM, IB class definition, CPU backend.

Source: src/lib/common/adam_ib_object.F90

Dependencies

Contents ​

Variables ​

NameTypeAttributesDescription
INI_SECTION_NAMEcharacter(len=5)parameterINI (config) file section name containing IB configs.
IB_ANALYTICAL_SPHEREcharacter(len=20)parameterAnalytical sphere solid.
IB_ANALYTICAL_CIRCLEcharacter(len=20)parameterAnalytical circle solid.
IB_ANALYTICAL_RECTANGLEcharacter(len=20)parameterAnalytical rectangle solid.
IB_DEFINITIONScharacter(len=20)parameterAvailable solid definitions.
BCS_VISCOUSinteger(kind=I4P)parameterVisous wall.
BCS_EULERinteger(kind=I4P)parameterInviscid wall.

Derived Types ​

analytical_sphere_object ​

Analytical sphere (or circle) solid class.

Components ​

NameTypeAttributesDescription
centerreal(kind=R8P)Sphere center.
radiusreal(kind=R8P)Sphere radius.
axischaracter(len=1)Axis (x,y,z) normal in case of circle solid.

analytical_rectangle_object ​

Analytical rectangle solid class.

Components ​

NameTypeAttributesDescription
centerreal(kind=R8P)Sphere center.
edgereal(kind=R8P)Major/minor edge length.
axischaracter(len=1)Axis (x,y,z) normal.

ib_object ​

IB class definition, CPU backend.

Components ​

NameTypeAttributesDescription
solids_numberinteger(kind=I4P)Number of solids (only 1 supported now).
s_namecharacter(len=99)allocatableSolid name.
bc_typeinteger(kind=I4P)allocatableBoundary condition type.
qreal(kind=R8P)allocatableVariables array for boundary conditions.
definitioncharacter(len=99)allocatable(Type of) Solid definition.
spheretype(analytical_sphere_object)allocatableAnalytical sphere/circle solid.
rectangletype(analytical_rectangle_object)allocatableAnalytical rectangle solid.
n_eikonalinteger(kind=I4P)Number of eikonal integration steps.
phireal(kind=R8P)allocatableIB distance function.

Type-Bound Procedures ​

NameAttributesDescription
compute_phipass(self)Compute distance function.
compute_phi_all_solidspass(self)Compute last phi index, all solids summary.
descriptionpass(self)Return pretty-printed object description.
evolve_eikonalpass(self)Evolve eikonal equation.
initializepass(self)Initialize IB.
invert_eikonalpass(self)Invert eikonal equation over q inside IB.
load_from_filepass(self)Load config from file.
move_phipass(self)Move phi and the actual ptree representation.
sphere_to_arraypass(self)Convert analytical sphere class data to array data.
compute_phi_analytical_spherepass(self)Compute distance for analytical sphere solids.
compute_phi_analytical_circlepass(self)Compute distance for analytical circle solids.
compute_phi_analytical_rectanglepass(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

NameTypeIntentAttributesDescription
selfclass(ib_object)inoutIB.
fieldtype(field_object)inField (sibling realm component, threaded in).
gridtype(grid_object)intargetGrid (sibling realm component, threaded in).
verboselogicalinoptionalFlag 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

NameTypeIntentAttributesDescription
selfclass(ib_object)inoutIB.
fieldtype(field_object)inField (sibling realm component, threaded in).
gridtype(grid_object)intargetGrid (sibling realm component, threaded in).
verboselogicalinoptionalFlag to trigger verbose prints.

Call graph

initialize ​

Initialize the equation.

fortran
subroutine initialize(self, field, grid, file_parameters)

Arguments

NameTypeIntentAttributesDescription
selfclass(ib_object)inoutIB.
fieldtype(field_object)inField (sibling realm component, threaded in).
gridtype(grid_object)intargetGrid (sibling realm component, threaded in).
file_parameterstype(file_ini)inoutINI file handler.

Call graph

load_from_file ​

Load config from file.

fortran
subroutine load_from_file(self, file_parameters, go_on_fail)

Arguments

NameTypeIntentAttributesDescription
selfclass(ib_object)inoutIB.
file_parameterstype(file_ini)inSimulation parameters ini file handler.
go_on_faillogicalinoptionalGo on if load fails.

Call graph

move_phi ​

Move phi.

fortran
subroutine move_phi(self, velocity, s)

Arguments

NameTypeIntentAttributesDescription
selfclass(ib_object)inoutIB.
velocityreal(kind=R8P)inVelocity of the movement.
sinteger(kind=I4P)inSolid 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

NameTypeIntentAttributesDescription
selfclass(ib_object)inIB.
fieldtype(field_object)inField (realm component).
gridtype(grid_object)intargetGrid (realm component).
qreal(kind=R8P)inoutConservative variables.
dqreal(kind=R8P)inouttarget, optionalWork array.

Call graph

invert_eikonal ​

Invert eikonal equation over q inside IB.

fortran
subroutine invert_eikonal(self, field, grid, q)

Arguments

NameTypeIntentAttributesDescription
selfclass(ib_object)inIB.
fieldtype(field_object)inField (sibling realm component, threaded in).
gridtype(grid_object)intargetGrid (sibling realm component, threaded in).
qreal(kind=R8P)inoutConservative 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

NameTypeIntentAttributesDescription
selfclass(ib_object)inoutIB.
fieldtype(field_object)inField (sibling realm component, threaded in).
gridtype(grid_object)intargetGrid (sibling realm component, threaded in).
solidinteger(kind=I4P)inSolid index.
spheretype(analytical_sphere_object)inAnalytical 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

NameTypeIntentAttributesDescription
selfclass(ib_object)inoutIB.
fieldtype(field_object)inField (sibling realm component, threaded in).
gridtype(grid_object)intargetGrid (sibling realm component, threaded in).
solidinteger(kind=I4P)inSolid index.
spheretype(analytical_sphere_object)inAnalytical 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

NameTypeIntentAttributesDescription
selfclass(ib_object)inoutIB.
fieldtype(field_object)inField (sibling realm component, threaded in).
gridtype(grid_object)intargetGrid (sibling realm component, threaded in).
solidinteger(kind=I4P)inSolid index.
rectangletype(analytical_rectangle_object)inAnalytical rectangle solid.

Call graph

Functions ​

description ​

Return a pretty-formatted object description.

Attributes: pure

Returns: character(len=:)

fortran
function description(self) result(desc)

Arguments

NameTypeIntentAttributesDescription
selfclass(ib_object)inIB.

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

NameTypeIntentAttributesDescription
selfclass(ib_object)inIB.
ibinteger(kind=I4P)inIndex of IB solid.

Call graph