Mesh

GEMPIC.OneDGridType
TwoDGrid( xmin, xmax, nx, ymin, ymax, ny )

Simple structure to store mesh data from 2 dimensions

source
GEMPIC.TwoDGridType
TwoDGrid( dimx, nx, dimy, ny)

Generate a cartesians mesh on rectangle dimxx dimy with nx x ny points

  • nx : indices are in [1:nx]
  • ny : indices are in [1:ny]
  • dimx = xmax - xmin
  • dimy = ymax - ymin
  • x, y : node positions
  • dx, dy : step size
source
GEMPIC.get_cell_and_offsetMethod
get_cell_and_offset( mesh, x )

Get cell and offset

We compute the cell indices where the particle is and its relative normalized position inside the cell

source