InterpolationModule#

class fridom.framework.grid.InterpolationModule[source]#

Bases: Module

The base class for interpolation methods.

Description#

An interpolation module is a class that interpolates a field from one position to another. For example, from the cell face to the cell center.

__init__() None#

Methods

__init__()

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.

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.

mset

The model settings.

name

required_halo

The required halo points for this module.

name = 'Interpolation Module'#
abstract interpolate(f: ScalarField, destination: Position) ScalarField[source]#

Interpolate the field to the destination position.

Parameters#

ffr.ScalarField

The field to interpolate.

destinationfr.grid.Position

The position to interpolate to.

Returns#

fr.ScalarField

The interpolated field.