FigureSaver#

class fridom.framework.modules.figure_saver.FigureSaver(filename: str, model_time: float, plotter: ModelPlotter, dpi: int = 256)[source]#

Bases: Module

Saves a figure created by a Plotter module to a file.

Description#

This module saves a figure created by a Plotter module to a file at a specified model time. The figure is saved in the ‘figures’ directory, if it does not exist, it is created.

Parameters#

thumbnail_pathstr

The path to the file where the figure should be saved.

model_timefloat

The model time at which the figure should be saved.

plotterModelPlotter

The Plotter module that creates the figure.

dpiint

The resolution of the figure in dots per inch.

__init__(filename: str, model_time: float, plotter: ModelPlotter, dpi: int = 256)[source]#

Methods

__init__(filename, model_time, plotter[, dpi])

disable()

Enabling the module means that it will be executed at each time step.

enable()

Enabling the module means that it will be executed at each time step.

is_enabled()

Return whether the module is enabled or not.

reset()

Stop and start the module.

setup(mset)

Start the module

start()

Start the module

stop()

Stop the module

update(mz)

Update the module

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.

mset

The model settings

name

required_halo

Examples using fridom.framework.modules.FigureSaver#

Rayleigh-Taylor Instability

Rayleigh-Taylor Instability

Rayleigh-Bénard Convection

Rayleigh-Bénard Convection

Barotropic Instability

Barotropic Instability
update(mz: ModelState) ModelState[source]#

Update the module

Description#

This method is called by the model at each time step. Child classes should overwrite this method to update the module. Make sure to decorate the method with the @module_method decorator.

Parameters#

mzfr.ModelState

The model state at the current time step.

Returns#

fr.ModelState

The updated model state.

log_level: fr.config.LogLevel | None#
timer: fr.timing_module.TimingModule | None#