Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New slicing backend (nearest neighbors interpolation) for use with moving mesh #182

Merged
merged 23 commits into from
Mar 12, 2024
Merged
Show file tree
Hide file tree
Changes from 8 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
6 changes: 5 additions & 1 deletion docs/source/visualisation/slice.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ The :mod:`swiftsimio.visualisation.slice` sub-module provides an interface
to render SWIFT data onto a slice. This takes your 3D data and finds the 3D
density at fixed z-position, slicing through the box.

This effectively solves the equation:
The default :code:`"sph"` backend effectively solves the equation:

:math:`\tilde{A}_i = \sum_j A_j W_{ij, 3D}`

Expand All @@ -14,6 +14,10 @@ with :math:`\tilde{A}_i` the smoothed quantity in pixel :math:`i`, and
Here we use the Wendland-C2 kernel. Note that here we take the kernel
at a fixed z-position.

There is also an alternative :code:`"nearest_neighbors"` backend, which uses
nearest-neighbor interpolation to compute the densities at each pixel.
This backend is more suited for use with moving-mesh hydrodynamics schemes.

The primary function here is
:meth:`swiftsimio.visualisation.slice.slice_gas`, which allows you to
create a gas slice of any field. See the example below.
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ requires = ["setuptools>=61.0"]
build-backend = "setuptools.build_meta"

[tool.setuptools]
packages = ["swiftsimio", "swiftsimio.initial_conditions", "swiftsimio.metadata", "swiftsimio.metadata.cosmology", "swiftsimio.metadata.metadata", "swiftsimio.metadata.particle", "swiftsimio.metadata.unit", "swiftsimio.metadata.writer", "swiftsimio.visualisation", "swiftsimio.visualisation.projection_backends", "swiftsimio.visualisation.tools"]
packages = ["swiftsimio", "swiftsimio.initial_conditions", "swiftsimio.metadata", "swiftsimio.metadata.cosmology", "swiftsimio.metadata.metadata", "swiftsimio.metadata.particle", "swiftsimio.metadata.unit", "swiftsimio.metadata.writer", "swiftsimio.visualisation", "swiftsimio.visualisation.projection_backends", "swiftsimio.visualisation.slice_backends", "swiftsimio.visualisation.tools"]

[project]
name = "swiftsimio"
Expand Down
Loading
Loading