Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/01_cloud_in_cell_density.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""Cloud-in-cell density in 1D
"""Cloud-in-cell density

Deposit a Maxwellian cloud of markers on a 1D grid and compare the density with the exact profile.

Expand Down
2 changes: 1 addition & 1 deletion examples/02_beam_density_2d.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""A beam's density in 2D
"""Beam density in 2D

Deposit a sheared, tilted Gaussian beam on a 2D grid, then smooth the deposit.

Expand Down
4 changes: 2 additions & 2 deletions examples/04_deposit_gather_adjoint.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""Deposit and gather are transposes
"""Adjoint deposit and gather

The scatter of marker values and the gather of a field use the same weights, so they are adjoint.
Deposit and gather are transposes: the scatter of marker values and the gather of a field use the same weights, so they are adjoint.

For any field $g$ on the nodes and charges $q_i$ at positions $x_i$,
$\\sum_i q_i\\, g(x_i) = \\sum_n g_n \\rho_n$ with $\\rho$ the deposit of the charges. That is
Expand Down
4 changes: 2 additions & 2 deletions examples/05_prescribed_electric_field.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""An electric field from a prescribed potential
"""Prescribed electric field

Build $E = -\\nabla\\phi$ on a grid from a potential given as a function, here a three-electrode lens.
An electric field from a prescribed potential: build $E = -\\nabla\\phi$ on a grid from a potential given as a function, here a three-electrode lens.

`electric_field_from_potential` evaluates the potential on the nodes and differentiates it
with second-order central differences. The lens has three cylinders, the middle one at
Expand Down
4 changes: 2 additions & 2 deletions examples/06_vector_operations.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""Vector fields: the E x B drift
"""E x B drift

Combine fields with arithmetic, `gradient`, `cross`, `dot` and `magnitude`: the drift velocity of a magnetized plasma.
Vector fields: combine fields with arithmetic, `gradient`, `cross`, `dot` and `magnitude`: the drift velocity of a magnetized plasma.

A potential hill $\\phi = \\phi_0 e^{-r^2/w^2}$ in a uniform magnetic field $B \\hat z$ makes
the guiding centres drift with $v_E = E \\times B / B^2$, along the equipotentials. The
Expand Down
2 changes: 1 addition & 1 deletion examples/08_periodic_seam.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""A periodic axis
"""Periodic axis

On a periodic axis the last node neighbours the first: deposits and gathers wrap across the seam.

Expand Down
4 changes: 2 additions & 2 deletions examples/11_test_particles.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""Test particles in a fixed field
"""Test particles

Push charged particles through a field on a grid with a leapfrog scheme, gathering the field every step.
Test particles in a fixed field: push charged particles through a field on a grid with a leapfrog scheme, gathering the field every step.

This is the loop of a test-particle code: `gather` gives the electric field at
all markers at once, from the compiled gather. The field is that of a 2D potential well,
Expand Down
2 changes: 1 addition & 1 deletion tutorials/kernels.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"id": "0",
"metadata": {},
"source": [
"# The kernels\n",
"# Kernels\n",
"\n",
"The compiled gather and scatter kernels behind `Field`: their versions, how one is chosen, and calling them directly.\n",
"\n",
Expand Down
Loading