jaxfluids.stencils.reconstruction package

Submodules

jaxfluids.stencils.reconstruction.central_fourth_order module

class jaxfluids.stencils.reconstruction.central_fourth_order.CentralFourthOrderReconstruction(nh: int, inactive_axis: List, offset: int)[source]

Bases: SpatialReconstruction

4th order stencil for reconstruction at the cell face

x

| | | |
i-1 | i | i+1 | i+2 |
| | | |
reconstruct_xi(buffer: Array, axis: int, **kwargs) Array[source]

Reconstruction of buffer quantity along axis specified by axis.

Parameters:
  • buffer (jnp.ndarray) – Buffer that will be reconstructed

  • axis (int) – Spatial axis along which values are reconstructed

  • j (int) – integer which specifies whether to calculate reconstruction left (j=0) or right (j=1) of an interface

  • dx (float, optional) – cell size, defaults to None

Returns:

Buffer with cell face reconstructed values

Return type:

jnp.ndarray

jaxfluids.stencils.reconstruction.central_second_order module

class jaxfluids.stencils.reconstruction.central_second_order.CentralSecondOrderReconstruction(nh: int, inactive_axis: List, offset: int)[source]

Bases: SpatialReconstruction

2nd order stencil for reconstruction at the cell face

x

| |
i | i+1 |
| |
reconstruct_xi(buffer: Array, axis: int, **kwargs) Array[source]

Reconstruction of buffer quantity along axis specified by axis.

Parameters:
  • buffer (jnp.ndarray) – Buffer that will be reconstructed

  • axis (int) – Spatial axis along which values are reconstructed

  • j (int) – integer which specifies whether to calculate reconstruction left (j=0) or right (j=1) of an interface

  • dx (float, optional) – cell size, defaults to None

Returns:

Buffer with cell face reconstructed values

Return type:

jnp.ndarray

jaxfluids.stencils.reconstruction.teno5 module

class jaxfluids.stencils.reconstruction.teno5.TENO5(nh: int, inactive_axis: List)[source]

Bases: SpatialReconstruction

Fu et al. - 2016 - A family of high-order targeted ENO schemes for compressible-fluid simulations

reconstruct_xi(buffer: Array, axis: int, j: int, dx: float | None = None, **kwargs) Array[source]

Reconstruction of buffer quantity along axis specified by axis.

Parameters:
  • buffer (jnp.ndarray) – Buffer that will be reconstructed

  • axis (int) – Spatial axis along which values are reconstructed

  • j (int) – integer which specifies whether to calculate reconstruction left (j=0) or right (j=1) of an interface

  • dx (float, optional) – cell size, defaults to None

Returns:

Buffer with cell face reconstructed values

Return type:

jnp.ndarray

set_slices_stencil() None[source]

Sets slice objects used in eigendecomposition for flux-splitting scheme. In the flux-splitting scheme, each n-point stencil has to be separately accessible as each stencil is transformed into characteristic space.

jaxfluids.stencils.reconstruction.weno1_js module

class jaxfluids.stencils.reconstruction.weno1_js.WENO1(nh: int, inactive_axis: List)[source]

Bases: SpatialReconstruction

reconstruct_xi(buffer: Array, axis: int, j: int, dx=None, **kwargs) Array[source]

Reconstruction of buffer quantity along axis specified by axis.

Parameters:
  • buffer (jnp.ndarray) – Buffer that will be reconstructed

  • axis (int) – Spatial axis along which values are reconstructed

  • j (int) – integer which specifies whether to calculate reconstruction left (j=0) or right (j=1) of an interface

  • dx (float, optional) – cell size, defaults to None

Returns:

Buffer with cell face reconstructed values

Return type:

jnp.ndarray

set_slices_stencil() None[source]

Sets slice objects used in eigendecomposition for flux-splitting scheme. In the flux-splitting scheme, each n-point stencil has to be separately accessible as each stencil is transformed into characteristic space.

jaxfluids.stencils.reconstruction.weno3_fp module

class jaxfluids.stencils.reconstruction.weno3_fp.WENO3FP(nh: int, inactive_axis: List)[source]

Bases: SpatialReconstruction

Gande et al. - 2020 - Modified third and fifth order WENO schemes for inviscid compressible flows

reconstruct_xi(buffer: Array, axis: int, j: int, dx: float | None = None, **kwargs) Array[source]

Reconstruction of buffer quantity along axis specified by axis.

Parameters:
  • buffer (jnp.ndarray) – Buffer that will be reconstructed

  • axis (int) – Spatial axis along which values are reconstructed

  • j (int) – integer which specifies whether to calculate reconstruction left (j=0) or right (j=1) of an interface

  • dx (float, optional) – cell size, defaults to None

Returns:

Buffer with cell face reconstructed values

Return type:

jnp.ndarray

set_slices_stencil() None[source]

Sets slice objects used in eigendecomposition for flux-splitting scheme. In the flux-splitting scheme, each n-point stencil has to be separately accessible as each stencil is transformed into characteristic space.

jaxfluids.stencils.reconstruction.weno3_js module

class jaxfluids.stencils.reconstruction.weno3_js.WENO3(nh: int, inactive_axis: List)[source]

Bases: SpatialReconstruction

WENO3-JS

reconstruct_xi(buffer: Array, axis: int, j: int, dx: float | None = None, **kwargs) Array[source]

Reconstruction of buffer quantity along axis specified by axis.

Parameters:
  • buffer (jnp.ndarray) – Buffer that will be reconstructed

  • axis (int) – Spatial axis along which values are reconstructed

  • j (int) – integer which specifies whether to calculate reconstruction left (j=0) or right (j=1) of an interface

  • dx (float, optional) – cell size, defaults to None

Returns:

Buffer with cell face reconstructed values

Return type:

jnp.ndarray

set_slices_stencil() None[source]

Sets slice objects used in eigendecomposition for flux-splitting scheme. In the flux-splitting scheme, each n-point stencil has to be separately accessible as each stencil is transformed into characteristic space.

jaxfluids.stencils.reconstruction.weno3_n module

class jaxfluids.stencils.reconstruction.weno3_n.WENO3N(nh: int, inactive_axis: List)[source]

Bases: SpatialReconstruction

Xiaoshuai et al. - 2015 - A high-resolution hybrid scheme for hyperbolic conservation laws

reconstruct_xi(buffer: Array, axis: int, j: int, dx: float | None = None, **kwargs) Array[source]

Reconstruction of buffer quantity along axis specified by axis.

Parameters:
  • buffer (jnp.ndarray) – Buffer that will be reconstructed

  • axis (int) – Spatial axis along which values are reconstructed

  • j (int) – integer which specifies whether to calculate reconstruction left (j=0) or right (j=1) of an interface

  • dx (float, optional) – cell size, defaults to None

Returns:

Buffer with cell face reconstructed values

Return type:

jnp.ndarray

set_slices_stencil() None[source]

Sets slice objects used in eigendecomposition for flux-splitting scheme. In the flux-splitting scheme, each n-point stencil has to be separately accessible as each stencil is transformed into characteristic space.

jaxfluids.stencils.reconstruction.weno3_nn_opt1 module

class jaxfluids.stencils.reconstruction.weno3_nn_opt1.WENO3NNOPT1(nh: int, inactive_axis: List)[source]

Bases: SpatialReconstruction

Bezgin et al. - 2021 -

reconstruct_xi(buffer: Array, axis: int, j: int, dx: float | None = None, **kwargs) Array[source]

Reconstruction of buffer quantity along axis specified by axis.

Parameters:
  • buffer (jnp.ndarray) – Buffer that will be reconstructed

  • axis (int) – Spatial axis along which values are reconstructed

  • j (int) – integer which specifies whether to calculate reconstruction left (j=0) or right (j=1) of an interface

  • dx (float, optional) – cell size, defaults to None

Returns:

Buffer with cell face reconstructed values

Return type:

jnp.ndarray

set_slices_stencil() None[source]

Sets slice objects used in eigendecomposition for flux-splitting scheme. In the flux-splitting scheme, each n-point stencil has to be separately accessible as each stencil is transformed into characteristic space.

jaxfluids.stencils.reconstruction.weno3_nn_opt2 module

class jaxfluids.stencils.reconstruction.weno3_nn_opt2.WENO3NNOPT2(nh: int, inactive_axis: List)[source]

Bases: SpatialReconstruction

reconstruct_xi(buffer: Array, axis: int, j: int, dx: float | None = None, **kwargs) Array[source]

Reconstruction of buffer quantity along axis specified by axis.

Parameters:
  • buffer (jnp.ndarray) – Buffer that will be reconstructed

  • axis (int) – Spatial axis along which values are reconstructed

  • j (int) – integer which specifies whether to calculate reconstruction left (j=0) or right (j=1) of an interface

  • dx (float, optional) – cell size, defaults to None

Returns:

Buffer with cell face reconstructed values

Return type:

jnp.ndarray

set_slices_stencil() None[source]

Sets slice objects used in eigendecomposition for flux-splitting scheme. In the flux-splitting scheme, each n-point stencil has to be separately accessible as each stencil is transformed into characteristic space.

jaxfluids.stencils.reconstruction.weno3_z module

class jaxfluids.stencils.reconstruction.weno3_z.WENO3Z(nh: int, inactive_axis: List)[source]

Bases: SpatialReconstruction

Don and Borges - 2013 - Accuracy of the WENO conservative FD schemes

reconstruct_xi(buffer: Array, axis: int, j: int, dx: float | None = None, **kwargs) Array[source]

Reconstruction of buffer quantity along axis specified by axis.

Parameters:
  • buffer (jnp.ndarray) – Buffer that will be reconstructed

  • axis (int) – Spatial axis along which values are reconstructed

  • j (int) – integer which specifies whether to calculate reconstruction left (j=0) or right (j=1) of an interface

  • dx (float, optional) – cell size, defaults to None

Returns:

Buffer with cell face reconstructed values

Return type:

jnp.ndarray

set_slices_stencil() None[source]

Sets slice objects used in eigendecomposition for flux-splitting scheme. In the flux-splitting scheme, each n-point stencil has to be separately accessible as each stencil is transformed into characteristic space.

jaxfluids.stencils.reconstruction.weno5_js module

class jaxfluids.stencils.reconstruction.weno5_js.WENO5(nh: int, inactive_axis: List)[source]

Bases: SpatialReconstruction

reconstruct_xi(buffer: Array, axis: int, j: int, dx: float | None = None, **kwargs) Array[source]

Reconstruction of buffer quantity along axis specified by axis.

Parameters:
  • buffer (jnp.ndarray) – Buffer that will be reconstructed

  • axis (int) – Spatial axis along which values are reconstructed

  • j (int) – integer which specifies whether to calculate reconstruction left (j=0) or right (j=1) of an interface

  • dx (float, optional) – cell size, defaults to None

Returns:

Buffer with cell face reconstructed values

Return type:

jnp.ndarray

set_slices_stencil() None[source]

Sets slice objects used in eigendecomposition for flux-splitting scheme. In the flux-splitting scheme, each n-point stencil has to be separately accessible as each stencil is transformed into characteristic space.

jaxfluids.stencils.reconstruction.weno5_z module

class jaxfluids.stencils.reconstruction.weno5_z.WENO5Z(nh: int, inactive_axis: List)[source]

Bases: SpatialReconstruction

Borges et al. - 2008 - An improved WENO scheme for hyperbolic conservation laws

reconstruct_xi(buffer: Array, axis: int, j: int, dx: float | None = None, **kwargs) Array[source]

Reconstruction of buffer quantity along axis specified by axis.

Parameters:
  • buffer (jnp.ndarray) – Buffer that will be reconstructed

  • axis (int) – Spatial axis along which values are reconstructed

  • j (int) – integer which specifies whether to calculate reconstruction left (j=0) or right (j=1) of an interface

  • dx (float, optional) – cell size, defaults to None

Returns:

Buffer with cell face reconstructed values

Return type:

jnp.ndarray

set_slices_stencil() None[source]

Sets slice objects used in eigendecomposition for flux-splitting scheme. In the flux-splitting scheme, each n-point stencil has to be separately accessible as each stencil is transformed into characteristic space.

jaxfluids.stencils.reconstruction.weno6_cu module

class jaxfluids.stencils.reconstruction.weno6_cu.WENO6CU(nh: int, inactive_axis: List)[source]

Bases: SpatialReconstruction

Hu et al. - 2010 - An adaptive central-upwind WENO scheme

reconstruct_xi(buffer: Array, axis: int, j: int, dx: float | None = None, **kwargs) Array[source]

Reconstruction of buffer quantity along axis specified by axis.

Parameters:
  • buffer (jnp.ndarray) – Buffer that will be reconstructed

  • axis (int) – Spatial axis along which values are reconstructed

  • j (int) – integer which specifies whether to calculate reconstruction left (j=0) or right (j=1) of an interface

  • dx (float, optional) – cell size, defaults to None

Returns:

Buffer with cell face reconstructed values

Return type:

jnp.ndarray

set_slices_stencil() None[source]

Sets slice objects used in eigendecomposition for flux-splitting scheme. In the flux-splitting scheme, each n-point stencil has to be separately accessible as each stencil is transformed into characteristic space.

jaxfluids.stencils.reconstruction.weno6_cum1 module

class jaxfluids.stencils.reconstruction.weno6_cum1.WENO6CUM1(nh: int, inactive_axis: List)[source]

Bases: SpatialReconstruction

Hu et al. - 2011 - Scale separation for implicit large eddy simulation

reconstruct_xi(buffer: Array, axis: int, j: int, dx: float, **kwargs) Array[source]

Reconstruction of buffer quantity along axis specified by axis.

Parameters:
  • buffer (jnp.ndarray) – Buffer that will be reconstructed

  • axis (int) – Spatial axis along which values are reconstructed

  • j (int) – integer which specifies whether to calculate reconstruction left (j=0) or right (j=1) of an interface

  • dx (float, optional) – cell size, defaults to None

Returns:

Buffer with cell face reconstructed values

Return type:

jnp.ndarray

set_slices_stencil() None[source]

Sets slice objects used in eigendecomposition for flux-splitting scheme. In the flux-splitting scheme, each n-point stencil has to be separately accessible as each stencil is transformed into characteristic space.

jaxfluids.stencils.reconstruction.weno6_cum2 module

class jaxfluids.stencils.reconstruction.weno6_cum2.WENO6CUM2(nh: int, inactive_axis: List)[source]

Bases: SpatialReconstruction

Hu et al. - 2011 - Scale separation for implicit large eddy simulation

reconstruct_xi(buffer: Array, axis: int, j: int, dx: float, **kwargs) Array[source]

Reconstruction of buffer quantity along axis specified by axis.

Parameters:
  • buffer (jnp.ndarray) – Buffer that will be reconstructed

  • axis (int) – Spatial axis along which values are reconstructed

  • j (int) – integer which specifies whether to calculate reconstruction left (j=0) or right (j=1) of an interface

  • dx (float, optional) – cell size, defaults to None

Returns:

Buffer with cell face reconstructed values

Return type:

jnp.ndarray

set_slices_stencil() None[source]

Sets slice objects used in eigendecomposition for flux-splitting scheme. In the flux-splitting scheme, each n-point stencil has to be separately accessible as each stencil is transformed into characteristic space.

jaxfluids.stencils.reconstruction.weno6_cumd module

class jaxfluids.stencils.reconstruction.weno6_cumd.WENO6CUMD(nh: int, inactive_axis: List)[source]

Bases: SpatialReconstruction

Hu et al. - 2010 - An adaptive central-upwind WENO scheme

reconstruct_xi(buffer: Array, axis: int, j: int, dx: float, **kwargs) Array[source]

Reconstruction of buffer quantity along axis specified by axis.

Parameters:
  • buffer (jnp.ndarray) – Buffer that will be reconstructed

  • axis (int) – Spatial axis along which values are reconstructed

  • j (int) – integer which specifies whether to calculate reconstruction left (j=0) or right (j=1) of an interface

  • dx (float, optional) – cell size, defaults to None

Returns:

Buffer with cell face reconstructed values

Return type:

jnp.ndarray

set_slices_stencil() None[source]

Sets slice objects used in eigendecomposition for flux-splitting scheme. In the flux-splitting scheme, each n-point stencil has to be separately accessible as each stencil is transformed into characteristic space.

jaxfluids.stencils.reconstruction.weno7_js module

class jaxfluids.stencils.reconstruction.weno7_js.WENO7(nh: int, inactive_axis: List)[source]

Bases: SpatialReconstruction

Balsara & Shu - 2000 -

reconstruct_xi(buffer: Array, axis: int, j: int, dx: float | None = None, **kwargs) Array[source]

Reconstruction of buffer quantity along axis specified by axis.

Parameters:
  • buffer (jnp.ndarray) – Buffer that will be reconstructed

  • axis (int) – Spatial axis along which values are reconstructed

  • j (int) – integer which specifies whether to calculate reconstruction left (j=0) or right (j=1) of an interface

  • dx (float, optional) – cell size, defaults to None

Returns:

Buffer with cell face reconstructed values

Return type:

jnp.ndarray

set_slices_stencil() None[source]

Sets slice objects used in eigendecomposition for flux-splitting scheme. In the flux-splitting scheme, each n-point stencil has to be separately accessible as each stencil is transformed into characteristic space.

jaxfluids.stencils.reconstruction.weno9_js module

class jaxfluids.stencils.reconstruction.weno9_js.WENO9(nh: int, inactive_axis: List)[source]

Bases: SpatialReconstruction

Balsara & Shu - 2000 -

reconstruct_xi(buffer: Array, axis: int, j: int, dx: float | None = None, **kwargs) Array[source]

Reconstruction of buffer quantity along axis specified by axis.

Parameters:
  • buffer (jnp.ndarray) – Buffer that will be reconstructed

  • axis (int) – Spatial axis along which values are reconstructed

  • j (int) – integer which specifies whether to calculate reconstruction left (j=0) or right (j=1) of an interface

  • dx (float, optional) – cell size, defaults to None

Returns:

Buffer with cell face reconstructed values

Return type:

jnp.ndarray

set_slices_stencil() None[source]

Sets slice objects used in eigendecomposition for flux-splitting scheme. In the flux-splitting scheme, each n-point stencil has to be separately accessible as each stencil is transformed into characteristic space.

Module contents