KratosMultiphysics
KRATOS Multiphysics (Kratos) is a framework for building parallel, multi-disciplinary simulation software, aiming at modularity, extensibility, and high performance. Kratos is written in C++, and counts with an extensive Python interface.
Public Member Functions | List of all members
orchestrator.Orchestrator Class Reference

Base class for multistage orchestrators. More...

Inheritance diagram for orchestrator.Orchestrator:
Collaboration diagram for orchestrator.Orchestrator:

Public Member Functions

None __init__ (self, Project project)
 Constructs a multistage orchestrator instance. More...
 
None Run (self)
 Main function that runs the complete multistage simulation. More...
 
None CheckStageSettings (self, str stage_name)
 Check the settings for the given stage name. More...
 
AnalysisStage CreateStage (self, str stage_name)
 This method creates a stage instance. More...
 
def RunCurrentStagePreprocess (self, str stage_name, Optional[Dict] data=None)
 This function executes the preprocess of current stage. More...
 
def RunCurrentStagePostprocess (self, str stage_name, Optional[Dict] data=None)
 This function executes the postprocessing of current stage. More...
 
Project GetProject (self)
 Returns the project. More...
 

Detailed Description

Base class for multistage orchestrators.

This class is intended to serve as base for al the Kratos multistage orchestrators.
The purpose of orchestrators is to define the workflow of the multistage simulations.
This includes deciding when and how to save and load (aka restart) the simulation.
Run() method must be implemented in derived classes (see SequentialOrchestrator).

Member variables:
__project -- Current multistage simulation project container

Constructor & Destructor Documentation

◆ __init__()

None orchestrator.Orchestrator.__init__ (   self,
Project  project 
)

Constructs a multistage orchestrator instance.

Member Function Documentation

◆ CheckStageSettings()

None orchestrator.Orchestrator.CheckStageSettings (   self,
str  stage_name 
)

Check the settings for the given stage name.

    This methods performs the check of the given stage name settings.
    Note that the Check() method of the stage instance is intentionally not called in here.
    This is due to the fact that the Check() of the stage instance is to be called within its Initialize() method.

◆ CreateStage()

AnalysisStage orchestrator.Orchestrator.CreateStage (   self,
str  stage_name 
)

This method creates a stage instance.

    Given a stage name, this method creates the corresponding stage instance from the "analysis_stage" registry entry in the settings.
    The stage instance is to be created from the registry. If not registered, it tries to use "analysis_stage" as Python module.

◆ GetProject()

Project orchestrator.Orchestrator.GetProject (   self)

Returns the project.

◆ Run()

None orchestrator.Orchestrator.Run (   self)

Main function that runs the complete multistage simulation.

◆ RunCurrentStagePostprocess()

def orchestrator.Orchestrator.RunCurrentStagePostprocess (   self,
str  stage_name,
Optional[Dict]   data = None 
)

This function executes the postprocessing of current stage.

    Note that the stage postprocess deliberately involves operations only.

    Keyword arguments:
    data -- Custom data argument to be used in derived classes

◆ RunCurrentStagePreprocess()

def orchestrator.Orchestrator.RunCurrentStagePreprocess (   self,
str  stage_name,
Optional[Dict]   data = None 
)

This function executes the preprocess of current stage.

    Note that the stage preprocess involves the execution of modelers and operations.

    Keyword arguments:
    data -- Custom data argument to be used in derived classes

The documentation for this class was generated from the following file: