GridFire v0.7.6rc4.0 General Purpose Nuclear Network

Loading...
Searching...
No Matches
Classes | Functions
gridfire::io::gen Namespace Reference

Namespace for generative input/output functionalities. More...

## Classes
struct | PyFunctionDef
| Structure representing a Python function definition. More...

## Functions
PyFunctionDef | exportReactionToPy (const reaction::Reaction &reaction)
| Exports a reaction to a Python function definition.
std::string | exportEngineToPy (engine::scratch::StateBlob &ctx, engine::DynamicEngine &engine)
| Exports a dynamic engine to a Python script.
void | exportEngineToPy (engine::scratch::StateBlob &ctx, const engine::DynamicEngine &engine, const std::string &fileName)
| Exports a dynamic engine to a Python file.
std::string | exportEngineToPy (engine::scratch::StateBlob &ctx, const engine::DynamicEngine &engine)

## Detailed Description

Namespace for generative input/output functionalities.

This namespace contains functions and structures related to exporting reactions and engines to Python code. It provides tools to convert internal representations of reactions and engines into Python functions and scripts that can be used for further analysis or integration with Python-based workflows.

## Function Documentation

## ◆ exportEngineToPy() [1/3]

std::string gridfire::io::gen::exportEngineToPy | ( | engine::scratch::StateBlob & | ctx,
|  | const engine::DynamicEngine & | engine )

## ◆ exportEngineToPy() [2/3]

void gridfire::io::gen::exportEngineToPy | ( | engine::scratch::StateBlob & | ctx,
|  | const engine::DynamicEngine & | engine,
|  | const std::string & | fileName )

Exports a dynamic engine to a Python file.

Parameters

  ctx |
  engine | The dynamic engine to export.
  fileName | The name of the file to write the Python script to.

This function writes the Python script representation of the given dynamic engine to the specified file.

## ◆ exportEngineToPy() [3/3]

std::string gridfire::io::gen::exportEngineToPy | ( | engine::scratch::StateBlob & | ctx,
|  | engine::DynamicEngine & | engine )

Exports a dynamic engine to a Python script.

Parameters

  engine | The dynamic engine to export.

Returns
  A string containing the Python script representation of the engine.

This function converts the given dynamic engine into a Python script that can be used to recreate the engine's functionality in Python.

## ◆ exportReactionToPy()

PyFunctionDef gridfire::io::gen::exportReactionToPy | ( | const reaction::Reaction & | reaction | ) |

Exports a reaction to a Python function definition.

Parameters

  reaction | The reaction to export.

Returns
  A PyFunctionDef structure containing the Python function representation of the reaction.

This function converts the given reaction into a Python function definition, including the necessary code and module requirements.