fluidsim_core.output.base

Output API

class fluidsim_core.output.base.SimReprMakerCore(sim)[source]

Bases: object

Code to create strings to represent a simulation

make_representations()[source]

Generate a unique name and summary for the simulation run

class fluidsim_core.output.base.OutputCore(sim)[source]

Bases: ABC

Base Output class

SimReprMaker

alias of SimReprMakerCore

abstract static _complete_info_solver(info_solver)[source]

Complete the ParamContainer info_solver. More specialized output classes may be assigned as follows:

classes = info_solver.classes.Output.classes
classes._set_child(
    "PrintStdOut",
    attribs={
        "module_name": "package.module",
        "class_name": "MyPrintStdOut",
    },
)
abstract static _complete_params_with_default(params, info_solver)[source]

This static method is used to complete the params container.

abstract __init__(sim)[source]

Initializes the instance attributes and child output classes.

Note

This class relies on a boolean parameter params.NEW_DIR_RESULTS.

sim

The simulation class

oper

An alias towards the Operators object

params

The tree of parameters for output-related classes

_has_to_save

Determines whether to save output files on-the-fly

name_solver

Alias for solver short-name

path_run

Full path of the output directory for this specific simulation

_init_path_run()[source]

Initialize a unique path for the simulation.

Returns:
str
_init_sim_repr_maker()[source]

Create a list of strings to make the run name.

Returns:
fluidsim_core.output.base.SimReprMakerCore
_init_name_run()[source]

Initialize the name_run and summary_simul attributes by calling fluidsim_core.output.base.SimReprMakerCore.make_representations

abstract post_init()[source]

Execute once the sim object is injected with all child classes. Typically used to print descriptive initialization messages.

_save_info_solver_params_xml(replace=False, comment='')[source]

Save files with information on the solver and on the run.

Classes

OutputCore(sim)

Base Output class

SimReprMakerCore(sim)

Code to create strings to represent a simulation