Skip to content

PIConGPU domain definitions

f-schmitt-zih edited this page May 13, 2014 · 19 revisions

You are here: Home > Developer Documentation > PIConGPU domain definitions


Current naming scheme

This page describes the internal naming scheme for domain and window offsets and sizes in PIConGPU as described in this issue.

Selections

  • domain = contiguous volume on one or all GPUs
  • window = any part of a domain

Selection members

member type notes
.size uint size of an object
.offset int offset of an object to its next higher hierarchy
  • offsets are exclusive and always relative to the element that is above it in the hierarchy

Naming Hierarchy

  • local = the object is located on the current ("my") GPU, no guards
  • global = the currently simulated volume over all GPUs, no guards
  • total = takes parts into account that are not in the global volume, e.g. previous areas that have been gone due to the sliding window

Resulting semantics

  • global:
    • globalDomain.size = size of currently simulation volume on all GPUs
    • globalDomain.offset = offset caused due to slides: offset to the totalDomain
    • globalWindow.size = size of the current/selected moving window (cutting away areas of the globalDomain that are before/after the window)
    • globalWindow.offset = offset of moving window from the first GPU: offset to the globalDomain
  • local:
    • localDomain.size = size of my GPU
    • localDomain.offset = beginning of my local domain in the global Domain
    • localWindow.size = size of the volume of the moving window on my GPU
    • localWindow.offset = offset of my moving window part from the start of the global window

Special use cases

  • My GPU is not contained in the moving window.
    • localWindow.size == 0
    • localWindow.offset == undefined
  • An interface, lets say the gasProfiles, may needs an inclusive domain offset like
    • localDomain.offset+globalDomain.offset (1)
    • how to name the result (1) in the interface?
    • suggestion: localDomainToTotal = (1)
    • note: usually, as defined above, localDomain means localDomainToGlobal because global is the next higher hierarchy.

Moving Window

PIConGPU uses a moving window when started with the -m command line parameter. It enables simulations that use a moving laser pulse to focus on the pulse for an infinite amount of timesteps while using a fixed simulation grid size. The moving window selects only a subvolume (in y-direction) of the complete global domain for simulation (the y-size of one GPU is subtracted). During the simulation, GPUs slide from the top to the bottom of the simulation grid as the moving window progresses. The following image illustrates this behavior:

moving_window.png

The moving window is implemented as a Window selection (see Current naming scheme above). Developers can chose to apply algorithms either on the window covered by the moving window or on the window covering complete global domain. In the first case, use MovingWindow::getInstance().getWindow(currentStep) to obtain a window for the current moving window. In the second case, use MovingWindow::getInstance().getDomainAsWindow(currentStep) to obtain a window for the complete global (and local) domain.

Note: For simulations started without -m, the moving window is always equivilant to the global domain.

Old naming scheme (deprecated)

  • domainSize: size of the simulation grid for a GPU

  • domainOffset: offset of the simulation grid of a GPU within the total simulation grid

  • globalDomainSize: size of the currently computed part of the simulation grid (moving window)

  • globalDomainOffset: offset of the currently computed part of the simulation grid (moving window) within the total simulation grid

  • localDomainOffset: offset of the simulation grid of a GPU from the start of the currently computed part (moving window). 0 for all GPUs for which domainOffset > globalDomainOffset

In the below image, the currently computed part of the simulation grid (moving window) is marked as a hatched area. Note that for simulations which do not use moving window, the currently computed part of the simulation grid always spans the total simulation grid.

Clone this wiki locally