InterWENO#

class fridom.framework.grid.cartesian.weno_interpolation.InterWENO(order: int = 5, eps: float = 1e-10)[source]#

Bases: InterENO

WENO interpolation module.

Description#

TODO

Parameters#

orderint

Order of the WENO interpolation (must be odd), default is 5.

epsfloat

Small value to avoid division by zero, default is 1e-10.

__init__(order: int = 5, eps: float = 1e-10) None[source]#

Methods

__init__([order, eps])

compute_beta_coeffs(stencil_size)

Coefficients that are used to compute the smoothness indicators.

compute_d_coeffs(stencil_size)

Compute the coefficients d_i for the WENO reconstruction.

compute_polynomial_coefficients_cell_average(...)

Polynomial coefficients for the ENO interpolation for cell averages.

compute_polynomial_coefficients_pointwise(...)

Polynomial coefficients for the ENO interpolation for pointwise values.

compute_smoothness_indicators(f, axis)

Compute the smoothness indicators for each stencil.

compute_start_of_stencil(f, axis, destination)

Compute the start of the stencil for the ENO interpolation.

disable()

Disable the module.

enable()

Enable the module.

interpolate(f, destination)

Interpolate the field to the destination position.

is_enabled()

Whether the module is enabled or not.

reconstruct(f, destination)

Reconstruct the field at the destination points using WENO interpolation.

reset()

Stop and start the module.

setup(mset[, setup_mode])

Set the module up.

start()

Start the module.

stop()

Stop the module.

update(mz)

Update the model state.

Attributes

diff_module

The differentiation module to be used by this module.

grid

The grid of the model settings.

info

Return a dictionary with information about the time stepper.

interp_module

The interpolation module to be used by this module.

is_setup

Whether the module is set up.

max_implementation_order

mset

The model settings.

name

required_halo

The required halo points for this module.

name = 'WENO Interpolation'#
max_implementation_order = 5#
compute_d_coeffs(stencil_size: int) np.ndarray[source]#

Compute the coefficients d_i for the WENO reconstruction.

compute_beta_coeffs(stencil_size: int) tuple[np.ndarray][source]#

Coefficients that are used to compute the smoothness indicators.

reconstruct(f: ScalarField, destination: Position) tuple[ScalarField][source]#

Reconstruct the field at the destination points using WENO interpolation.

Parameters#

ffr.ScalarField

The field to be reconstructed.

destinationfr.grid.Position

The position where the field is to be reconstructed. (Can only reconstuct in one dimension at a time)

Returns#

tuple[fr.ScalarField]

Left and right biased reconstructed fields. (Should be combined with a flux limiter to get the final reconstructed field)

compute_smoothness_indicators(f: fr.ScalarField, axis: int) list[np.ndarray][source]#

Compute the smoothness indicators for each stencil.