Skip to content

adam_maps_object ​

ADAM, maps class definition

Face direction codes (see inter_realm_neighbor_t).

Encoded as small integers rather than a Fortran enum because the values travel through the manifest INI parser and need stable, INI-friendly representations.

Source: src/lib/common/adam_maps_object.F90

Dependencies

Contents ​

Variables ​

NameTypeAttributesDescription
FACE_X_MAXinteger(kind=I4P)parameter+x face (max-x boundary of a block).
FACE_X_MINinteger(kind=I4P)parameter-x face (min-x boundary of a block).
FACE_Y_MAXinteger(kind=I4P)parameter+y face.
FACE_Y_MINinteger(kind=I4P)parameter-y face.
FACE_Z_MAXinteger(kind=I4P)parameter+z face.
FACE_Z_MINinteger(kind=I4P)parameter-z face.
COUPLING_MIRRORinteger(kind=I4P)parameterPeer cells copied as-is (the trivial pass-through coupling).
COUPLING_PERIODICinteger(kind=I4P)parameterPeriodic identification across the inter-realm face (reserved, not implemented).
COUPLING_INTERPOLATEinteger(kind=I4P)parameterInterpolate across mismatched grids (reserved, not implemented).
COUPLING_REFINEDinteger(kind=I4P)parameter2:1 resolution jump across the seam, nested blocks (issue #52).
COUPLING_AUTOinteger(kind=I4P)parameterMirror or refined, from the levels of the two sides at every topology build: the kind of a seam runtime AMR may change (issue #110); the refined requirements are checked always.
CADENCE_END_OF_STEPinteger(kind=I4P)parameterα: once per step, after close_step_forest (default).
CADENCE_STAGE_COINCIDENTinteger(kind=I4P)parameterβ: once per RK substage, inside the stage loop.

Derived Types ​

inter_realm_neighbor_t ​

Description of a single inter-realm face coupling.

One entry per (my realm, my block, my face) that touches a face on another realm. Populated by the forest during initialization from the [forest.topology] section of the manifest.

Architectural note: this type carries only intrinsic-typed components — no derived-type pointer components reachable from kernels. The peer_realm index is used by the consumer to look up the peer realm in the realm(:) array the forest passes through; the lookup happens on the host side outside any device region (R2).

Components

NameTypeAttributesDescription
my_realminteger(kind=I4P)Realm index that owns this entry (1-based; redundant with the enclosing maps' realm, kept for self-describing dumps).
my_blockinteger(kind=I4P)Block index in MY realm whose face touches the peer.
my_faceinteger(kind=I4P)Face code on MY block (FACE_X_MAX..FACE_Z_MIN).
peer_realminteger(kind=I4P)Realm index of the peer.
peer_blockinteger(kind=I4P)Block index in the peer realm whose face touches mine.
peer_faceinteger(kind=I4P)Face code on the peer block (typically opposite to my_face).
couplinginteger(kind=I4P)Coupling kind (COUPLING_MIRROR | COUPLING_REFINED | reserved kinds).

maps_object ​

Maps class definition

Components

NameTypeAttributesDescription
is_initialized_logicalFlag: maps have been initialized.
seam_ghost_fillinteger(kind=I4P)Coarse->fine seam ghost-fill regime (issue #21 N2): selects the flag emitted on coarse->fine map rows (1 = injection legacy copy, 4 = interpolate per the packed metadata column). Set from the [amr] seam_ghost_fill INI key by adam_object%initialize BEFORE any ghost-map build; default injection so that map builds predating the parse (or tests bypassing it) keep legacy behavior.
seam_density_varinteger(kind=I4P)Guard of the coarse->fine seam fill (issue #101): the index of the density in the field, the three momenta at the next indices; 0 for no guard (the default: PRISM and every app that does not set it). With it, the density and the momenta of a fine seam ghost are clamped to the MP bound of the coarse cells around it (seam_mp_bound), and a ghost whose clamped density is below SEAM_DENSITY_GUARD (0.1) times its coarse anchor cell's takes in every variable the anchor's value (the injection value).
seam_restrictioninteger(kind=I4P)Fine->coarse seam ghost restriction (issue #68 C1, C3): the mean (meta 0 on the restriction rows), the 6-point Lagrange or the WENO (codes and regime packed in the meta column, see restriction_meta). Set from [amr] seam_restriction by adam_object%initialize before any ghost-map build.
seam_restriction_fallbacksinteger(kind=I4P)Restriction rows whose fine pair is not inside the donor block (they keep the mean, meta 0), counted by the last ghost-map build (local rows, plus one per variable of the MPI send rows).
ghost_maps_buildinteger(kind=I4P)Builds of the ghost-cell maps so far (make_comm_local_maps_ghost): a map derived from them (make_restricted_ghost_maps) records the build it read.
parent_buildinteger(kind=I4P)Restricted maps: the parent's ghost_maps_build they were made from.
restricted_uncoveredlogicalRestricted maps: some flagged cell of this rank is filled by no local or MPI row (a boundary, null-axis or inter-realm ghost): the update needs the boundary conditions.
restricted_derivedlogicalRestricted maps: some kept row of any rank is not a plain copy (a seam interpolant or restriction, which the positivity blend may touch).
refine_ratiointeger(kind=I4P)Refinement ratio per axis of a 2:1 seam: 2, or 1 along an axis the tree does not refine (z of a quadtree, y and z of a binary tree, issue #46). Set from the tree.
local_mapinteger(kind=I8P)allocatableLocal map, list block index changes of my nodes.
local_map_ghostinteger(kind=I8P)allocatableLocal map for ghost cells updating [fec_number, 4].
local_map_ghost_cellinteger(kind=I8P)allocatableLocal map ghost cells update, cells order.
local_map_bc_faceinteger(kind=I8P)allocatableLocal map for face BC ghost cells.
local_map_bc_edgeinteger(kind=I8P)allocatableLocal map for edge BC ghost cells.
local_map_bc_cornerinteger(kind=I8P)allocatableLocal map for corner BC ghost cells.
local_map_bc_crowninteger(kind=I8P)allocatableLocal map for face BC ghost cells, crown order.
my_nodes_numberinteger(kind=I4P)Number of my nodes, keep_nodes_number + recv_nodes_number.
send_nodes_numberinteger(kind=I4P)Number of nodes to be sent.
recv_nodes_numberinteger(kind=I4P)Number of nodes to be received.
keep_nodes_numberinteger(kind=I4P)Number of nodes to be keept.
inner_blocks_numberinteger(kind=I4P)Number of inner blocks where I need fecs.
inner_outer_block_mapinteger(kind=I4P)allocatableInner/outer blocks map.
comm_map_n_sendinteger(kind=I4P)allocatableCommunication map, number of blocks to send [procs_number].
comm_map_n_recvinteger(kind=I4P)allocatableCommunication map, number of blocks to recv [procs_number].
comm_map_send_ptrinteger(kind=I4P)allocatableCommunication map, pointers in list to send [procs_number+1].
comm_map_recv_ptrinteger(kind=I4P)allocatableCommunication map, pointers in list to recv [procs_number+1].
comm_map_sendinteger(kind=I8P)allocatableCommunication map, blocks to send [sum(comm_map_n_send)].
comm_map_recvinteger(kind=I8P)allocatableCommunication map, blocks to receive [sum(comm_map_n_recv)].
comm_map_n_send_ghostinteger(kind=I4P)allocatableCommunication map, number of ghost celss to send [procs_number].
comm_map_n_recv_ghostinteger(kind=I4P)allocatableCommunication map, number of ghost celss to recv [procs_number].
comm_map_send_ptr_ghostinteger(kind=I4P)allocatableCommunication map, pointers in list to send [procs_number+1].
comm_map_recv_ptr_ghostinteger(kind=I4P)allocatableCommunication map, pointers in list to recv [procs_number+1].
comm_map_send_ghostinteger(kind=I8P)allocatableCommunication map, send ghost cells, fec order.
comm_map_send_ghost_cellinteger(kind=I8P)allocatableCommunication map, send ghost cells, cells order.
comm_map_recv_ghostinteger(kind=I8P)allocatableCommunication map, recv ghost cells, fec order.
comm_map_recv_ghost_cellinteger(kind=I8P)allocatableCommunication map, recv ghost cells, cells order.
send_buffer_ghostreal(kind=R8P)allocatableSend buffer of ghost cells.
recv_buffer_ghostreal(kind=R8P)allocatableReceive buffer of ghost cells.
inter_realm_neighborstype(inter_realm_neighbor_t)allocatableFace couplings to other realms; unallocated when this realm has no inter-realm neighbors.
inter_realm_ghost_cellinteger(kind=I4P)allocatablePer-cell inter-realm ghost map; layout per the comment above.
inter_realm_face_register_indexinteger(kind=I4P)allocatable(block, face_1_6) → signed flux register face index; 0 = not a seam face, +idx = coarse side, -idx = fine side.
seam_facelogicalRealm faces that are inter-realm seams.
amr_seam_quadrantinteger(kind=I4P)allocatable(1:2, block, face_1_6) → fine-block quadrant offset (inner, outer) ∈ {0,1}²; meaningful only where inter_realm_face_register_index < 0.
seam_local_map_ghost_cellinteger(kind=I4P)allocatablePer-cell same-rank inter-realm ghost map; layout per the comment above; rows sorted by peer_realm.
seam_local_peer_realminteger(kind=I4P)allocatablePeer realm index for each row range (one entry per distinct peer).
seam_local_peer_row_startinteger(kind=I4P)allocatableFirst row index in seam_local_map_ghost_cell for each peer.
seam_local_peer_row_countinteger(kind=I4P)allocatableRow count in seam_local_map_ghost_cell for each peer.
seam_local_cadenceinteger(kind=I4P)allocatablePer-peer seam-fill cadence (CADENCE_END_OF_STEP | CADENCE_STAGE_COINCIDENT; populated from manifest face_pairs).
seam_local_send_bufreal(kind=R8P)allocatablePer-peer pack buffer for same-rank seams.
seam_local_recv_bufreal(kind=R8P)allocatablePer-peer unpack buffer for same-rank seams.
seam_mpi_recv_cellinteger(kind=I4P)allocatableCross-rank receive rows [rank, b, i, j, k].
seam_mpi_recv_row_startinteger(kind=I4P)allocatableFirst receive row of each peer slot.
seam_mpi_recv_row_countinteger(kind=I4P)allocatableReceive rows of each peer slot.
seam_mpi_send_cellinteger(kind=I4P)allocatableSend rows [rank, b, i, j, k, kind, meta] (own cells).
seam_mpi_send_row_startinteger(kind=I4P)allocatableFirst send row of each peer slot.
seam_mpi_send_row_countinteger(kind=I4P)allocatableSend rows of each peer slot.
seam_overlapinteger(kind=I4P)allocatableOverlap rows (8, rows).
seam_overlap_startinteger(kind=I4P)allocatableFirst row of each (block, bc_fec).
seam_overlap_countinteger(kind=I4P)allocatableRows of each (block, bc_fec).
seam_timinglogicalAccumulate the timers below.
seam_wtimereal(kind=R8P)Local copy, buffers, pack (peer owner), MPI, unpack; MPI is the posts (and, outside the forest's batch, the wait; the batch's one wait is the forest's seam wait, issue #53 F3).
seam_fillsinteger(kind=I8P)Calls that moved cross-rank (or to-self) rows on this rank.
seam_rowsinteger(kind=I8P)Cross-rank rows moved: received (unpacked), packed (sent).

Type-Bound Procedures

NameAttributesDescription
blocks_reorderpass(self)Reorder blocks indexes in field.
get_block_layoutpass(self)Return block Morton codes and/or coordinates.
initializepass(self)Initialize maps.
make_comm_local_mapspass(self)Make communication/local maps.
make_comm_local_maps_ghostpass(self)Make communication/local maps of ghost cells.
make_local_maps_bcpass(self)Make local maps of boundary conditions.
make_restricted_ghost_mapspass(self)The ghost maps of a parent restricted to masked cells.
mpi_gather_nodes_datapass(self)Gather nodes data between MPI processes.
save_local_mappass(self)Save local map.
alloc_comm_local_maps_ghostpass(self)Allocate communication/local maps of ghost cells.
count_bc_numberspass(self)Count BC numbers.
ijk_mmdpass(self)Return IJK min/max/delta.
ijk_mmd_ghostpass(self)Return IJK min/max/delta, ghost maps.
make_comm_map_recv_ghost_cellpass(self)Make communication recv map of ghost cells in cell order.
make_comm_map_send_ghost_cellpass(self)Make communication send map of ghost cells in cell order.
make_local_map_ghost_cellpass(self)Make local map of ghost cells in cell order.
populate_comm_local_maps_ghostpass(self)Populate communication/local maps of ghost cells.
restriction_metapass(self)Return the meta of a fine->coarse restriction row.

Subroutines ​

face_axis_sign ​

Translate FACE_X_MAX / FACE_X_MIN / ... into (axis 1..3, sign ±1).

Canonical decoder for the FACE_* face-direction constants. Used by the forest's seam-topology builder, by inter-realm ghost-fill paths, and by realm-side reflux TBPs that need to map a face_code onto the corresponding axis and sign.

Attributes: pure

fortran
subroutine face_axis_sign(face_code, axis, sgn)

Arguments

NameTypeIntentAttributesDescription
face_codeinteger(kind=I4P)inFace code (FACE_X_MAX..FACE_Z_MIN).
axisinteger(kind=I4P)out1=x, 2=y, 3=z. 0 on malformed input.
sgninteger(kind=I4P)out+1 if MAX, -1 if MIN. 0 on malformed input.

Call graph

blocks_reorder ​

Reorder blocks indexes in field.

fortran
subroutine blocks_reorder(self, tree)

Arguments

NameTypeIntentAttributesDescription
selfclass(maps_object)inoutThe maps.
treetype(tree_object)inTree (sibling realm component, threaded in).

Call graph

get_block_layout ​

Return block Morton codes and/or coordinates from the underlying tree. Provides a single-level accessor so callers do not traverse tree directly.

fortran
subroutine get_block_layout(self, tree, code, coordinates)

Arguments

NameTypeIntentAttributesDescription
selfclass(maps_object)inThe maps.
treetype(tree_object)inTree (sibling realm component, threaded in).
codeinteger(kind=I8P)outoptionalBlock Morton codes [blocks_number].
coordinatesinteger(kind=I4P)outoptionalBlock coordinates IJKL [4,blocks_number].

Call graph

initialize ​

Initialize maps.

fortran
subroutine initialize(self, tree, verbose)

Arguments

NameTypeIntentAttributesDescription
selfclass(maps_object)inoutThe maps.
treetype(tree_object)inoutTree (sibling realm component, threaded in).
verboselogicalinoptionalTrigger verbose output.

Call graph

make_comm_local_maps ​

Make communication/local maps.

   comm_map_send     = [ 17, 511, 92, 3, 54, 56, 11, 12...] (block index).
                          |   |       |  ||       |
   comm_map_send_ptr = [  0,  1,  3,  4,  4, 6, (8)]        (pointer to comm_map_send)
   comm_map_recv     = [ 23, 4, 51, 69, 145, 2, 72, 16, 6]  (block index).
                         |       |  ||          |       |
   comm_map_recv_prt = [ 0,  2,  3,  3,  6, 8, (9)]         (pointer to comm_map_recv)
fortran
subroutine make_comm_local_maps(self, tree)

Arguments

NameTypeIntentAttributesDescription
selfclass(maps_object)inoutThe maps.
treetype(tree_object)inoutTree (sibling realm component, threaded in).

Call graph

make_comm_local_maps_ghost ​

Make communication/local maps of ghost cells.

fortran
subroutine make_comm_local_maps_ghost(self, tree, grid, nv)

Arguments

NameTypeIntentAttributesDescription
selfclass(maps_object)inoutThe maps.
treetype(tree_object)inTree (sibling realm component, threaded in).
gridtype(grid_object)inGrid (sibling realm component, threaded in).
nvinteger(kind=I4P)inNumber of field variables.

Call graph

mpi_gather_nodes_data ​

Gather nodes data status between MPI processes.

fortran
subroutine mpi_gather_nodes_data(self, tree, node_member)

Arguments

NameTypeIntentAttributesDescription
selfclass(maps_object)inoutThe maps.
treetype(tree_object)inTree (sibling realm component, threaded in).
node_membercharacter(len=*)inNode member to be shared.

Call graph

save_local_map ​

Save local map.

fortran
subroutine save_local_map(self, file_name)

Arguments

NameTypeIntentAttributesDescription
selfclass(maps_object)inThe maps.
file_namecharacter(len=*)inOutput file name.

make_local_maps_bc ​

Make local maps of boundary conditions.

fortran
subroutine make_local_maps_bc(self, tree, grid, verbose)

Arguments

NameTypeIntentAttributesDescription
selfclass(maps_object)inoutThe maps.
treetype(tree_object)inTree (sibling realm component, threaded in).
gridtype(grid_object)inGrid (sibling realm component, threaded in).
verboselogicalinoptionalFlag to activate verbose mode.

Call graph

alloc_comm_local_maps_ghost ​

Allocate communication/local maps of ghost cells, local_map_ghost, comm_map_send_ghost, comm_map_recv_ghost.

fortran
subroutine alloc_comm_local_maps_ghost(self, tree, grid, nv)

Arguments

NameTypeIntentAttributesDescription
selfclass(maps_object)inoutThe maps.
treetype(tree_object)inTree (sibling realm component, threaded in).
gridtype(grid_object)inGrid (sibling realm component, threaded in).
nvinteger(kind=I4P)inNumber of field variables.

Call graph

count_bc_numbers ​

Count faces/edges/corners BC numbers.

fortran
subroutine count_bc_numbers(self, tree, fec_bc_faces_number, fec_bc_edges_number, fec_bc_corners_number)

Arguments

NameTypeIntentAttributesDescription
selfclass(maps_object)inoutThe maps.
treetype(tree_object)inTree (sibling realm component, threaded in).
fec_bc_faces_numberinteger(kind=I4P)outBC faces number.
fec_bc_edges_numberinteger(kind=I4P)outBC edges number.
fec_bc_corners_numberinteger(kind=I4P)outBC corners number.

Call graph

make_comm_map_recv_ghost_cell ​

Make communication receive map of ghost cells in cell order.

Coarse->fine octant clipping (issue #21 N3.5): out-of-slab octants of the widened donor range are skipped WITHOUT advancing recv_ctr — the sender applies the identical predicate on the identical walk order, so the packed buffer holds kept octants only and positions stay in lockstep.

fortran
subroutine make_comm_map_recv_ghost_cell(self, nv, nijk, ngc)

Arguments

NameTypeIntentAttributesDescription
selfclass(maps_object)inoutThe maps.
nvinteger(kind=I4P)inNumber of field variables.
nijkinteger(kind=I4P)inBlock interior cell counts [ni,nj,nk].
ngcinteger(kind=I4P)inGhost cells number (octant clip bound).

Call graph

make_comm_map_send_ghost_cell ​

Make communication send map of ghost cells in cell order.

Column 8 (issue #21 N1) carries the packed coarse->fine interpolation metadata (octant sub-position + shifted anchor positions, see seam_meta_pack) on "sending to finer" rows; 0 elsewhere. Pack-side interpolation (G5): the donor rank owns footprint and metadata; the recv map stays a plain buffer unpack. Consumers gate on the flag column (7), never on the metadata value.

Coarse->fine octant clipping (issue #21 N3.5): the "sending to finer" ranges are in the RECEIVER's frame (fec/portion of the receiver, see populate_comm_local_maps_ghost), so the sender evaluates the receiver's fine index 2*i + delta + c and skips out-of-slab octants with the identical predicate and walk order as the receive side — buffer positions stay in lockstep without shipping discarded values.

fortran
subroutine make_comm_map_send_ghost_cell(self, nv, nijk, ngc)

Arguments

NameTypeIntentAttributesDescription
selfclass(maps_object)inoutThe maps.
nvinteger(kind=I4P)inNumber of field variables.
nijkinteger(kind=I4P)inBlock interior cell counts [ni,nj,nk].
ngcinteger(kind=I4P)inGhost cells number (octant clip bound).

Call graph

make_local_map_ghost_cell ​

Make local map of ghost cells in cell order.

Column 10 (issue #21 N1) carries the packed coarse->fine interpolation metadata (octant sub-position + shifted anchor positions, see seam_meta_pack) on "receiving from coarser" rows; 0 elsewhere. Consumers gate on the flag column (9), never on the metadata value.

Coarse->fine octant clipping (issue #21 N3.5): the widened donor range ((ngc+1)/2 coarse layers, see ijk_mmd_ghost) generates one fine octant per donor pair that falls outside the ghost slab for odd ngc; count and fill loops skip it with the same predicate (fine index within [1-ngc, nijk+ngc] per direction).

fortran
subroutine make_local_map_ghost_cell(self, nijk, ngc)

Arguments

NameTypeIntentAttributesDescription
selfclass(maps_object)inoutThe maps.
nijkinteger(kind=I4P)inBlock interior cell counts [ni,nj,nk].
ngcinteger(kind=I4P)inGhost cells number (octant clip bound).

Call graph

dedupe_last_writer ​

Remove duplicate-receiver rows from a ghost-cell map, keeping the LAST row per receiver cell (issue #22 F1).

Ghost-cell maps can carry several rows writing the SAME ghost cell (overlapping face/edge/corner fec regions). The CPU consumers process rows sequentially, so the last writer wins deterministically; the GPU consumers execute rows under !$acc parallel loop independent, so duplicate writers RACE. On uniform grids the duplicates agree in value (benign); at a 2:1 coarse-fine seam they disagree (different donors/levels) — observed as run-to-run nondeterministic seam divergences on FNL. Making last-writer-wins explicit at build time removes the race structurally: CPU results are bit-identical (that row was winning anyway), GPU becomes deterministic and CPU-equal, and both backends do less work. Rows for one receiver cell always appear as CONTIGUOUS runs of stride rows (stride = 1 for the cell-level local map, nv for the per-variable MPI recv map, whose do v=1,nv loop is innermost in every build branch) — so the survivor test is last_row(cell) - row < stride, and the winner table is keyed on the CELL only (no nv factor in its size).

fortran
subroutine dedupe_last_writer(map, cb, ci, cj, ck, stride, ngc)

Arguments

NameTypeIntentAttributesDescription
mapinteger(kind=I8P)inoutallocatableGhost-cell map (rows compacted in place).
cbinteger(kind=I4P)inColumn of the receiver block index.
ciinteger(kind=I4P)inColumn of the receiver i index.
cjinteger(kind=I4P)inColumn of the receiver j index.
ckinteger(kind=I4P)inColumn of the receiver k index.
strideinteger(kind=I4P)inRows per receiver cell (1 = cell-level map, nv = per-variable map).
ngcinteger(kind=I4P)inGhost cells number (index offset for the key).

Call graph

populate_comm_local_maps_ghost ​

Populate communication/local maps of ghost cells, local_map_ghost, comm_map_send_ghost, comm_map_recv_ghost.

fortran
subroutine populate_comm_local_maps_ghost(self, tree, grid)

Arguments

NameTypeIntentAttributesDescription
selfclass(maps_object)inoutThe maps.
treetype(tree_object)inTree (sibling realm component, threaded in).
gridtype(grid_object)inGrid (sibling realm component, threaded in).

Call graph

populate_local_map_bc_crown ​

Populate map of BC cells in crown order.

fortran
subroutine populate_local_map_bc_crown(local_map_bc, local_map_bc_crown, c_crown)

Arguments

NameTypeIntentAttributesDescription
local_map_bcinteger(kind=I8P)inLocal map for BC ghost cells.
local_map_bc_crowninteger(kind=I8P)inoutLocal map for face BC ghost cells, crown order.
c_crowninteger(kind=I4P)inoutCounter.

Call graph

set_local_map_bc ​

Set data into faces/edges/corners local map BC.

fortran
subroutine set_local_map_bc(fec, block_index, neighbor_bc_fec, ijk_min_max_delta, fec_bc_type, local_map_bc)

Arguments

NameTypeIntentAttributesDescription
fecinteger(kind=I4P)inCurrent fec.
block_indexinteger(kind=I8P)inBlock index in field blocks array.
neighbor_bc_fecinteger(kind=I8P)inNeighbors fec for BC.
ijk_min_max_deltainteger(kind=I8P)inIJK min/max/delta.
fec_bc_typeinteger(kind=I8P)inBC type.
local_map_bcinteger(kind=I8P)inoutLocal map BC data.

Call graph

make_restricted_ghost_maps ​

Make self the ghost-cell maps of parent restricted to the receiving ghost cells flagged in keep (#156 L2).

The local rows (local_map_ghost_cell) and the MPI rows (comm_map_{send,recv}_ghost_cell, one per cell and variable) whose receiving cell is flagged are kept, in their order, with their donors, flags and metadata, so a ghost update through self gives every flagged cell the value the update through parent gives (bitwise) and leaves every other ghost cell untouched. The receiver alone knows its mask: each rank flags the slots of its receive buffer and sends them back to the senders (one exchange), and both sides renumber the kept slots in buffer order, segment by segment, so the compacted send and receive buffers stay matched. The seam settings and the refinement ratio are copied; the boundary-condition and inter-realm maps are not (they stay unallocated). Collective (every rank calls it, with or without flagged cells).

fortran
subroutine make_restricted_ghost_maps(self, parent, ngc, keep)

Arguments

NameTypeIntentAttributesDescription
selfclass(maps_object)inoutThe restricted maps (built here).
parenttype(maps_object)inThe realm's full maps.
ngcinteger(kind=I4P)inGhost cells number.
keeplogicalinReceiving ghost cells to fill [nb, i, j, k].

Call graph

destroy_restricted ​

Free the arrays make_restricted_ghost_maps builds.

fortran
subroutine destroy_restricted(maps)

Arguments

NameTypeIntentAttributesDescription
mapstype(maps_object)inoutThe restricted maps.

Call graph

Functions ​

restriction_meta ​

Return the meta column of a fine->coarse restriction row (issue #68 C1, C3): 0 under the mean; under the 6-point Lagrange or the WENO the packed per-direction codes of seam_restriction_code (the footprint shifted inside the donor block) and the regime, or 0, the mean, for a row whose fine pair is not inside the donor block (counted in seam_restriction_fallbacks). The restriction rows are told from the other kinds by their flag column (8), never by the meta.

Returns: integer(kind=I8P)

fortran
function restriction_meta(self, first, nijk, r) result(meta)

Arguments

NameTypeIntentAttributesDescription
selfclass(maps_object)inoutThe maps.
firstinteger(kind=I4P)inFirst fine cell of the restricted pair per direction (donor index).
nijkinteger(kind=I4P)inBlock interior cell counts [ni,nj,nk].
rinteger(kind=I4P)inRefinement ratio per direction.

Call graph

ijk_mmd ​

Return IJK min/max/delta.

Returns: integer(kind=I8P)

fortran
function ijk_mmd(self, grid, fec, neighbor_bc_fec) result(ijk_min_max_delta)

Arguments

NameTypeIntentAttributesDescription
selfclass(maps_object)inThe maps.
gridtype(grid_object)inGrid (sibling realm component, threaded in).
fecinteger(kind=I4P)inCurrent fec number.
neighbor_bc_fecinteger(kind=I4P)inNeighbors fec for BC.

Call graph

ijk_mmd_ghost ​

Return IJK min/max/delta, ghost maps.

Returns: integer(kind=I8P)

fortran
function ijk_mmd_ghost(self, grid, fec, portion) result(ijk_min_max_delta)

Arguments

NameTypeIntentAttributesDescription
selfclass(maps_object)inThe maps.
gridtype(grid_object)inGrid (sibling realm component, threaded in).
fecinteger(kind=I4P)inCurrent fec number.
portioninteger(kind=I8P)inCurrent portion.

Call graph

bc_cells_number ​

Return BC cells number.

Returns: integer(kind=I4P)

fortran
function bc_cells_number(local_map_bc) result(cells_number)

Arguments

NameTypeIntentAttributesDescription
local_map_bcinteger(kind=I8P)inLocal map for BC ghost cells.

Call graph