bloc.boulder_plugins.register#

Main registration function for all Boulder plugins from Bloc.

Functions#

bloc_mechanism_path_resolver(mechanism_name)

Resolve mechanism paths using Bloc's mechanism discovery system.

extract_mechanism_from_bloc_config(config)

Extract mechanism from Boulder's standard format.

bloc_config_mechanism_hook(converter, config)

Post-build hook to update converter mechanism from Bloc config.

register_plugins(plugins)

Register all Boulder plugins from Bloc.

Module Contents#

bloc.boulder_plugins.register.bloc_mechanism_path_resolver(mechanism_name)#

Resolve mechanism paths using Bloc’s mechanism discovery system.

This function uses Bloc’s get_mechanism_path utility which searches: 1. Absolute/relative paths from working directory 2. Relative paths from calling script’s folder 3. Bloc’s /data/mechanisms directory 4. Cantera’s /data directory

Args:

mechanism_name: Name or path of the mechanism file

Returns:

str

Return type:

Absolute path to the resolved mechanism file

Raises:

FileNotFoundError

bloc.boulder_plugins.register.extract_mechanism_from_bloc_config(config)#

Extract mechanism from Boulder’s standard format.

Args:

config: Configuration dictionary

Returns:

str

Return type:

Mechanism name/path, defaults to "gri30.yaml" if not found

Raises:

ValueError

bloc.boulder_plugins.register.bloc_config_mechanism_hook(converter, config)#

Post-build hook to update converter mechanism from Bloc config.

This hook extracts the mechanism from Bloc’s custom STONE format and updates the converter if needed.

Args:

converter: DualCanteraConverter instance config: Configuration dictionary

bloc.boulder_plugins.register.register_plugins(plugins)#

Register all Boulder plugins from Bloc.

This is the main entry point called by Boulder’s plugin discovery system. It registers both reactor builders and output pane plugins.

Args:

plugins: BoulderPlugins instance to register plugins with